-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
46 lines (46 loc) · 1.29 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
module.exports = {
extends: ['next/core-web-vitals', 'next', 'prettier', 'eslint:recommended'],
env: {
jest: true,
amd: true,
es6: true,
},
globals: {
after: true,
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'next/core-web-vitals',
'next',
'prettier',
'plugin:@typescript-eslint/recommended',
],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@next/next/no-server-import-in-page': 'off',
// Following ruleset allows us to use underscore as a marker for unused variables without tripping ESLint warnings
'no-unused-vars': 'off', // must disable the base rule as it can report incorrect errors
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
},
],
plugins: ['eslint-plugin-prettier'],
rules: {
'no-console': 'error',
'no-shadow-restricted-names': 'off',
'no-prototype-builtins': 'off',
'prettier/prettier': 'error',
},
};