-
Notifications
You must be signed in to change notification settings - Fork 13
/
.eslintrc.js
68 lines (68 loc) · 1.89 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
64
65
66
67
68
/* eslint-env node */
module.exports = {
root: true,
env: {
browser: true,
node: true,
es2020: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:react/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'next',
'plugin:prettier/recommended',
],
plugins: ['import', 'react', 'react-hooks', '@typescript-eslint'],
ignorePatterns: [
'.eslintrc.js',
'next.config.js',
'postcss.config.js',
'tailwind.config.js',
'components/ui',
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {},
},
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 11,
sourceType: 'module',
},
rules: {
// 'React' must be in scope when using JSX react/react-in-jsx-scope`
// 'react/react-in-jsx-scope': 'warn',
// No default export found in imported module "react-dom/client".
// 'import/default': 'warn',
// Using exported name ... as identifier for default export.
// 'import/no-named-as-default': 'warn',
// ... is not defined.
'no-undef': 'error',
// Unable to resolve path to module ...
'import/no-unresolved': 'warn',
// ... is defined but never used.
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
// Unexpected any. Specify a different type.
'@typescript-eslint/no-explicit-any': 'off',
// Using `<img>` could result in slower LCP and higher bandwidth.
'@next/next/no-img-element': 'off',
// ... is never reassigned. Use 'const' instead.
'prefer-const': 'warn',
// Don't use `{}` as a type.
'@typescript-eslint/ban-types': 'warn',
},
}