think/.eslintrc.client.js

46 lines
1.4 KiB
JavaScript
Raw Normal View History

2022-05-01 22:07:22 +08:00
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'react-hooks'],
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
2022-05-02 00:15:13 +08:00
overrides: [
{
files: ['*.ts', '*.tsx', '.js', '.jsx'],
parserOptions: {
project: ['./packages/client/tsconfig.json'],
},
},
],
2022-05-01 22:07:22 +08:00
settings: {
react: {
version: 'detect',
},
},
env: {
es6: true,
browser: true,
node: true,
},
rules: {
'func-names': 0,
'no-shadow': 0,
'@typescript-eslint/no-shadow': 0,
'@typescript-eslint/explicit-function-return-type': 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 14:50:58 +08:00
'react-hooks/exhaustive-deps': 2,
2022-05-01 22:07:22 +08:00
'react/prop-types': 0,
'testing-library/no-unnecessary-act': 0,
'react/react-in-jsx-scope': 0,
},
ignorePatterns: ['dist/', 'node_modules', 'scripts', 'examples'],
};