2022-05-01 14:07:22 +00:00
|
|
|
module.exports = {
|
|
|
|
parser: '@typescript-eslint/parser',
|
2022-05-16 09:23:59 +00:00
|
|
|
plugins: ['@typescript-eslint', 'react-hooks', 'simple-import-sort', 'prettier'],
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:react/recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
'plugin:prettier/recommended',
|
|
|
|
],
|
2022-05-01 16:15:13 +00:00
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ['*.ts', '*.tsx', '.js', '.jsx'],
|
|
|
|
parserOptions: {
|
2022-06-10 13:57:49 +00:00
|
|
|
project: ['./tsconfig.json'],
|
2022-06-10 14:33:31 +00:00
|
|
|
tsconfigRootDir: __dirname,
|
2022-05-16 09:23:59 +00:00
|
|
|
sourceType: 'module',
|
2022-05-01 16:15:13 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2022-05-01 14:07:22 +00:00
|
|
|
settings: {
|
2022-05-16 09:23:59 +00:00
|
|
|
'react': {
|
2022-05-01 14:07:22 +00:00
|
|
|
version: 'detect',
|
|
|
|
},
|
2022-05-16 09:23:59 +00:00
|
|
|
'import/resolver': {
|
|
|
|
node: {
|
|
|
|
paths: ['src'],
|
|
|
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
|
|
},
|
|
|
|
},
|
2022-05-01 14:07:22 +00:00
|
|
|
},
|
|
|
|
env: {
|
|
|
|
es6: true,
|
|
|
|
browser: true,
|
|
|
|
node: true,
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
'func-names': 0,
|
|
|
|
'no-shadow': 0,
|
|
|
|
'@typescript-eslint/no-shadow': 0,
|
|
|
|
'@typescript-eslint/no-unused-vars': [0, { argsIgnorePattern: '^_' }],
|
|
|
|
'@typescript-eslint/no-use-before-define': 0,
|
|
|
|
'@typescript-eslint/ban-ts-ignore': 0,
|
|
|
|
'@typescript-eslint/no-empty-function': 0,
|
|
|
|
'@typescript-eslint/ban-ts-comment': 0,
|
|
|
|
'@typescript-eslint/no-var-requires': 0,
|
|
|
|
'@typescript-eslint/no-explicit-any': 0,
|
|
|
|
'@typescript-eslint/no-this-alias': 0,
|
|
|
|
'@typescript-eslint/explicit-module-boundary-types': 0,
|
|
|
|
'@typescript-eslint/ban-types': 0,
|
|
|
|
'react-hooks/rules-of-hooks': 2,
|
2022-05-04 06:50:58 +00:00
|
|
|
'react-hooks/exhaustive-deps': 2,
|
2022-05-01 14:07:22 +00:00
|
|
|
'testing-library/no-unnecessary-act': 0,
|
2022-05-16 09:23:59 +00:00
|
|
|
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
|
|
|
|
'react/react-in-jsx-scope': 'off',
|
|
|
|
'react/prop-types': 'off',
|
|
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
|
|
'simple-import-sort/imports': 'error',
|
|
|
|
'simple-import-sort/exports': 'error',
|
2022-05-01 14:07:22 +00:00
|
|
|
},
|
|
|
|
ignorePatterns: ['dist/', 'node_modules', 'scripts', 'examples'],
|
|
|
|
};
|