forked from uber/react-global-hooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (56 loc) · 1.69 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* eslint-env node */
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'airbnb-typescript',
'prettier',
'prettier/@typescript-eslint',
'prettier/react',
],
plugins: ['react-hooks', 'jest', '@typescript-eslint'],
parser: '@typescript-eslint/parser',
env: {
browser: true,
node: true,
es6: true,
jest: true,
'jest/globals': true,
},
rules: {
'@typescript-eslint/naming-convention': 'off',
'react/jsx-props-no-spreading': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [
'error',
{ extensions: ['.js', '.jsx', '.tsx'] },
],
'@typescript-eslint/explicit-function-return-type': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['warn'],
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'import/prefer-default-export': 'off',
'no-plusplus': 'off',
'no-underscore-dangle': 'off',
'camelcase': ['warn', { 'allow': ['LazyState_NotAHook', 'LazyStateRedux_NotAHook'] }],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'@typescript-eslint/camelcase': ['warn', { 'allow': ['LazyState_NotAHook', 'LazyStateRedux_NotAHook'] }],
'@typescript-eslint/ban-ts-ignore': 'off',
'react/prop-types': 'off',
},
overrides: [
{
files: [ '__tests__' ],
rules: {
'eslint-disable global-require': 'off',
'@typescript-eslint/no-var-requires': 'off',
'import/no-extraneous-dependencies': ["error", { "devDependencies": true }],
},
},
],
};