2020-03-17 12:52:33 +03:00
|
|
|
module.exports = {
|
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
},
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
extends: ['plugin:react/recommended', 'plugin:@typescript-eslint/recommended'],
|
|
|
|
parserOptions: {
|
|
|
|
project: 'tsconfig.json',
|
|
|
|
sourceType: 'module',
|
2020-03-17 14:18:23 +03:00
|
|
|
createDefaultProgram: true,
|
2020-03-17 12:52:33 +03:00
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
react: {
|
|
|
|
version: 'detect',
|
|
|
|
},
|
|
|
|
},
|
2022-01-05 18:11:05 +03:00
|
|
|
plugins: ['react', 'react-hooks', '@typescript-eslint', 'import'],
|
2020-03-17 12:52:33 +03:00
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
2020-07-25 20:14:11 +03:00
|
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
2020-03-17 12:52:33 +03:00
|
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
|
|
'@typescript-eslint/no-use-before-define': 'off',
|
|
|
|
'@typescript-eslint/interface-name-prefix': 'off',
|
|
|
|
'@typescript-eslint/no-inferrable-types': 'off',
|
2020-03-17 13:01:32 +03:00
|
|
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
2020-03-17 14:36:33 +03:00
|
|
|
'@typescript-eslint/ban-ts-ignore': 'off',
|
2020-07-25 20:14:11 +03:00
|
|
|
'@typescript-eslint/ban-types': ['error', { types: { object: false }, extendDefaults: true }],
|
|
|
|
'@typescript-eslint/no-var-requires': 'off',
|
2020-03-17 13:01:32 +03:00
|
|
|
|
2020-03-17 12:52:33 +03:00
|
|
|
'react/prop-types': 'off',
|
2022-01-05 18:11:05 +03:00
|
|
|
'react-hooks/rules-of-hooks': 'error',
|
|
|
|
'react-hooks/exhaustive-deps': 'warn',
|
2020-03-17 12:52:33 +03:00
|
|
|
|
|
|
|
'import/no-extraneous-dependencies': 'error',
|
|
|
|
'import/no-internal-modules': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
allow: [
|
|
|
|
'prismjs/**',
|
|
|
|
'perfect-scrollbar/**',
|
|
|
|
'react-dom/*',
|
|
|
|
'core-js/**',
|
|
|
|
'memoize-one/**',
|
2020-03-17 14:18:23 +03:00
|
|
|
'unfetch/**',
|
|
|
|
'raf/polyfill',
|
|
|
|
'**/fixtures/**', // for tests
|
2020-03-17 12:52:33 +03:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
};
|