-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
63 lines (63 loc) · 1.64 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
57
58
59
60
61
62
63
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'next/core-web-vitals',
'plugin:react/recommended',
'airbnb',
'eslint-config-prettier',
'plugin:prettier/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 18,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
rules: {
'react/jsx-filename-extension': [1, { extensions: ['.ts', '.tsx'] }],
'react/react-in-jsx-scope': 'off',
'react/function-component-definition': 'off',
'react/jsx-props-no-spreading': 'off',
'no-nested-ternary': 'off',
'no-restricted-syntax': 'off',
'consistent-return': 'off',
'default-param-last': 'off',
'react/require-default-props': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'@next/next/no-img-element': 'off',
'import/no-extraneous-dependencies': 'off',
'react/button-has-type': 'off',
'import/prefer-default-export': 'off',
'import/extensions': [
'error',
'ignorePackages',
{ ts: 'never', tsx: 'never' },
],
'react-hooks/rules-of-hooks': 'off',
'@next/next/google-font-display': 'off',
'@next/next/no-page-custom-font': 'off',
'@typescript-eslint/no-unused-vars': [2, { args: 'none' }],
'no-param-reassign': 'off',
'react/prop-types': 'off',
},
globals: {
React: true,
google: true,
mount: true,
mountWithRouter: true,
shallow: true,
shallowWithRouter: true,
context: true,
expect: true,
jsdom: true,
JSX: true,
},
};