-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.cjs
84 lines (80 loc) · 1.76 KB
/
.eslintrc.cjs
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
const {
getDefaultIgnorePatterns,
} = require('./config/eslint/helpers/getDefaultIgnorePatterns.cjs');
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: [
'turbo',
'./config/eslint/bases/javascript.cjs',
'./config/eslint/bases/typescript.cjs',
'./config/eslint/bases/regexp.cjs',
'./config/eslint/bases/jest.cjs',
'./config/eslint/bases/react.cjs',
'./config/eslint/bases/rtl.cjs',
'./config/eslint/bases/unicorn.cjs',
'./config/eslint/bases/prettier.cjs',
],
ignorePatterns: [
...getDefaultIgnorePatterns(),
'.next',
'.out',
'**/__registry__',
],
env: {
browser: true,
es6: true,
jest: true,
node: true,
webextensions: false,
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
node: {
moduleDirectory: ['node_modules'],
typescript: {
alwaysTryTypes: true,
},
},
typescript: {},
},
react: { version: 'detect' },
},
rules: {},
overrides: [
{
files: ['**/*.spec.*'],
extends: ['./config/eslint/bases/prettier.cjs'],
rules: {
'react/jsx-key': 'off',
'import/no-relative-packages': 'off',
'import/no-unresolved': 'off',
},
},
{
files: ['**/*.test.*', '**/*.spec.*', '**/*.fixture.*'],
env: {
jest: true,
},
rules: {
'@typescript-eslint/no-unused-vars': 'off',
// 'react-hooks/rules-of-hooks': 'off',
'no-restricted-imports': [
'error',
{
paths: [],
},
],
},
},
{
files: '**/*.mdx',
rules: {
'prettier/prettier': 'off',
},
},
],
};