-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade packages. Use node 12+ (#75)
- Loading branch information
Showing
12 changed files
with
810 additions
and
618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,17 @@ | ||
module.exports = { | ||
extends: [ | ||
'airbnb-typescript', | ||
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin | ||
'prettier/react', | ||
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier | ||
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
plugins: ['react-hooks'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: './tsconfig.eslint.json', | ||
}, | ||
plugins: ['react-hooks', '@typescript-eslint'], | ||
extends: ['plugin:@typescript-eslint/recommended', 'prettier'], | ||
rules: { | ||
// Too restrictive, writing ugly code to defend against a very unlikely scenario: https://eslint.org/docs/rules/no-prototype-builtins | ||
'no-prototype-builtins': 'off', | ||
// https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html | ||
'import/prefer-default-export': 'off', | ||
'import/no-default-export': 'error', | ||
// Too restrictive: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md | ||
'react/destructuring-assignment': 'off', | ||
// No jsx extension: https://github.com/facebook/create-react-app/issues/87#issuecomment-234627904 | ||
'react/jsx-filename-extension': 'off', | ||
// Use function hoisting to improve code readability | ||
'no-use-before-define': ['error', { functions: false, classes: true, variables: true }], | ||
'@typescript-eslint/no-use-before-define': [ | ||
'error', | ||
{ functions: false, classes: true, variables: true, typedefs: true }, | ||
], | ||
// If we can delete it - we should delete it: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md | ||
'@typescript-eslint/no-unused-vars': 'error', | ||
//Too restrictive: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
// The Rules of Hooks: https://reactjs.org/docs/hooks-rules.html | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
// https://github.com/typescript-eslint/typescript-eslint/issues/420 | ||
'no-useless-constructor': 'off', | ||
'@typescript-eslint/no-useless-constructor': 'error', | ||
// We use any and warnings are becoming distracting | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
// We use underscore dangle, especially in tests | ||
'no-underscore-dangle': 'off', | ||
// let useEffect return either nothing or a callback | ||
'consistent-return': 'off', | ||
// we use typescript, so no default props | ||
'react/require-default-props': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": [ | ||
".eslintrc.js", | ||
"**/*.js", | ||
"**/*.jsx", | ||
"**/*.ts", | ||
"**/*.tsx" | ||
], | ||
"exclude": [ | ||
// do not exclude anything that we want to lint | ||
] | ||
} |
Oops, something went wrong.