Skip to content

Commit

Permalink
Enable new ESLint rules (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Skelton authored Apr 1, 2022
1 parent 417aebe commit 199c091
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .changeset/slow-avocados-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'eslint-config-widen': minor
---

Enable a number of new ESLint rules:

- [camelcase](https://eslint.org/docs/rules/camelcase)
- [default-param-last](https://eslint.org/docs/rules/default-param-last)
- [dot-notation](https://eslint.org/docs/rules/dot-notation)
- [no-console](https://eslint.org/docs/rules/no-console)
- [no-else-return](https://eslint.org/docs/rules/no-else-return)
- [no-empty](https://eslint.org/docs/rules/no-empty)
- [no-param-reassign](https://eslint.org/docs/rules/no-param-reassign)
- [no-return-await](https://eslint.org/docs/rules/no-return-await)
- [no-template-curly-in-string](https://eslint.org/docs/rules/no-template-curly-in-string)
- [no-unneeded-ternary](https://eslint.org/docs/rules/no-unneeded-ternary)
- [no-useless-computed-key](https://eslint.org/docs/rules/no-useless-computed-key)
- [require-await](https://eslint.org/docs/rules/require-await)
12 changes: 11 additions & 1 deletion packages/eslint-config-widen/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,25 @@ export = {
},
plugins: ['widen'],
rules: {
camelcase: 'warn',
'default-param-last': 'error',
'dot-notation': 'error',
eqeqeq: [
'error',
'always',
{
null: 'ignore',
},
],
'no-console': 'off',
'no-console': ['error', { allow: ['error'] }],
'no-dupe-args': 'error',
'no-duplicate-imports': 'error',
'no-else-return': 'error',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-extra-bind': 'error',
'no-param-reassign': 'error',
'no-return-await': 'error',
'no-template-curly-in-string': 'error',
'no-unneeded-ternary': 'error',
'no-unused-expressions': 'off',
'no-unused-vars': [
Expand All @@ -32,6 +40,7 @@ export = {
varsIgnorePattern: '^_',
},
],
'no-useless-computed-key': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'prefer-const': [
Expand All @@ -40,6 +49,7 @@ export = {
destructuring: 'all',
},
],
'require-await': 'error',
'sort/exports': [
'warn',
{
Expand Down

0 comments on commit 199c091

Please sign in to comment.