-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.overrides.js
106 lines (101 loc) · 2.63 KB
/
.eslintrc.overrides.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
const filenames = {
files: ['*.*'],
plugins: ['unicorn'],
rules: {
'unicorn/filename-case': [
2,
{
case: 'kebabCase',
},
],
},
};
const react = {
files: ['*.jsx', '*.tsx'],
extends: ['airbnb', 'airbnb/hooks', 'next', 'prettier'],
rules: {
'react/require-default-props': 0,
'react/jsx-filename-extension': 0,
'react/jsx-props-no-spreading': 0,
'react/prop-types': 0,
'react/boolean-prop-naming': 2,
'react/jsx-boolean-value': 2,
'react/jsx-handler-names': 2,
'react/jsx-no-useless-fragment': 2,
'@next/next/no-html-link-for-pages': [2, './client/src/pages/'],
},
};
const typescript = {
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
plugins: [],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
extends: [
'plugin:import/typescript',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
rules: {
'no-void': 0,
'no-use-before-define': 0,
'implicit-arrow-linebreak': 0,
'operator-linebreak': 0,
'@typescript-eslint/no-use-before-define': 2,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
},
};
const imports = {
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
rules: {
'import/no-extraneous-dependencies': [2, {}],
'import/no-default-export': 2,
'import/prefer-default-export': 0,
'no-restricted-imports': [
2,
{
name: 'uuid',
message: 'Importing directly from `uuid` is now deprecated. Please import from `uuid/[version]` instead.',
},
],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
mjs: 'never',
ts: 'never',
tsx: 'never',
},
],
},
};
const jest = {
files: ['*.test.ts', '*.test.tsx', '*.test.js', '*.test.jsx'],
extends: [
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:jest-dom/recommended',
// 'plugin:testing-library/recommended',
],
rules: {
'@typescript-eslint/ban-ts-comment': 0,
'jest/lowercase-name': [1, { ignore: ['describe'] }],
'jest/expect-expect': [
1,
{
assertFunctionNames: ['expect', 'expectObservable'],
},
],
},
};
module.exports = [react, filenames, typescript, imports, jest];