2021-01-17 12:54:49 -08:00
|
|
|
module.exports = {
|
|
|
|
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
|
|
|
|
extends: [
|
|
|
|
'react-app',
|
|
|
|
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
|
|
|
|
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
|
|
|
|
'plugin:jest/recommended',
|
|
|
|
'airbnb-typescript',
|
|
|
|
'airbnb/hooks',
|
|
|
|
'prettier',
|
|
|
|
'plugin:prettier/recommended',
|
|
|
|
],
|
|
|
|
parserOptions: {
|
2021-05-28 02:23:09 +08:00
|
|
|
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
|
2021-01-17 12:54:49 -08:00
|
|
|
sourceType: 'module', // Allows for the use of imports
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true, // Allows for the parsing of JSX
|
|
|
|
},
|
|
|
|
project: './tsconfig.json',
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
eqeqeq: ['error', 'always'],
|
2021-05-28 02:23:09 +08:00
|
|
|
'react/destructuring-assignment': 'off',
|
|
|
|
'no-console': 'off',
|
2021-01-17 12:54:49 -08:00
|
|
|
'no-debugger': 'warn',
|
|
|
|
'require-await': 'warn',
|
|
|
|
'import/prefer-default-export': 'off', // TODO: remove this lint rule
|
2021-02-05 14:21:04 -08:00
|
|
|
'import/extensions': 'off',
|
2021-01-17 12:54:49 -08:00
|
|
|
'react/jsx-props-no-spreading': 'off',
|
2021-01-25 13:29:23 -08:00
|
|
|
'no-plusplus': 'off',
|
2021-02-05 14:21:04 -08:00
|
|
|
'no-prototype-builtins': 'off',
|
2021-01-25 13:29:23 -08:00
|
|
|
'react/require-default-props': 'off',
|
2021-03-05 17:05:03 -08:00
|
|
|
'no-underscore-dangle': 'off',
|
2021-01-25 13:29:23 -08:00
|
|
|
'@typescript-eslint/no-unused-vars': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
varsIgnorePattern: '^_',
|
|
|
|
argsIgnorePattern: '^_',
|
|
|
|
},
|
|
|
|
],
|
2021-03-09 23:14:52 -08:00
|
|
|
'@typescript-eslint/no-empty-interface': 'off',
|
2021-05-11 15:41:42 -07:00
|
|
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
|
|
"@typescript-eslint/no-explicit-any": 'off',
|
2021-05-28 02:23:09 +08:00
|
|
|
"import/no-extraneous-dependencies": 'off'
|
2021-01-17 12:54:49 -08:00
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
react: {
|
|
|
|
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|