Skip to content

Commit

Permalink
feat(eslint): update javascript rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ModyQyW committed Aug 9, 2024
1 parent dc514f2 commit febaaa1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/eslint/configs/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,18 @@ export function javascript(options: JavaScriptOptions = {}): Config[] {
// https://eslint.org/docs/latest/rules/no-lonely-if
// Comes with https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v55.0.0/docs/rules/no-lonely-if.md.
'no-lonely-if': 'error',
// https://eslint.org/docs/latest/rules/no-shadow
'no-shadow': 'warn',
// https://eslint.org/docs/latest/rules/no-use-before-define
'no-use-before-define': 'warn',
// https://eslint.org/docs/latest/rules/no-var
'no-var': 'error',
// https://eslint.org/docs/latest/rules/prefer-const
'prefer-const': 'error',
// https://eslint.org/docs/latest/rules/prefer-rest-params
'prefer-rest-params': 'error',
// https://eslint.org/docs/latest/rules/prefer-spread
'prefer-spread': 'error',

...rules,
},
Expand Down

0 comments on commit febaaa1

Please sign in to comment.