Skip to content

Commit

Permalink
feat: add new more restrictive rules (#16)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Add new rules for array-callback-return, no-debugger, no-alert,
newline-before-return, @typescript-eslint/no-unused-vars,
@typescript-eslint/no-floating-promises, no-constant-binary-expression and no-console
  • Loading branch information
mfeltscher authored Oct 16, 2023
1 parent 737763c commit 52fa585
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ module.exports = {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/no-floating-promises': ['error'],
'no-constant-binary-expression': 'error',
'array-callback-return': 'error',
'no-debugger': 'error',
'no-alert': 'error',
'no-console': ['error', { allow: ['info', 'warn', 'error', 'trace', 'time', 'timeEnd'] }],
'newline-before-return': 'error',
'prettier/prettier': [
'error',
{
Expand Down
4 changes: 2 additions & 2 deletions .eslintrc.react.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
rules: {
'react/react-in-jsx-scope': 'off',
'react/prop-types': 0,
'react/display-name': 0,
'react/prop-types': 'off',
'react/display-name': 'off',
'react/forbid-component-props': ['warn', { forbid: ['style', 'className'] }],
},
parserOptions: {
Expand Down

0 comments on commit 52fa585

Please sign in to comment.