-
Notifications
You must be signed in to change notification settings - Fork 470
Expand file tree
/
Copy path.eslintrc.js
More file actions
49 lines (49 loc) · 1.44 KB
/
Copy path.eslintrc.js
File metadata and controls
49 lines (49 loc) · 1.44 KB
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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['simple-import-sort', '@typescript-eslint', 'prettier'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
extends: [
'next',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
rules: {
'@typescript-eslint/no-unsafe-type-assertion': 'error',
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/no-empty-function': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-function-type': 'warn',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'react/display-name': 'off',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
'no-console': ['error', { allow: ['warn', 'error'] }],
},
overrides: [
{
files: ['**/*.js', '**/*.ts', '**/*.tsx'],
rules: {
'simple-import-sort/imports': [
'error',
{
groups: [
['^react$', '^next', '^[a-z]', '^@'],
['^@/'],
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
['^.+\\.s?css$'],
['^\\u0000'],
],
},
],
},
},
],
};