-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
52 lines (52 loc) · 1.39 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
module.exports = {
root: true,
extends: ['plugin:@typescript-eslint/recommended', 'next/core-web-vitals', 'prettier'],
plugins: ['simple-import-sort'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
rules: {
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
/**
* import style
*/
// no default export
'import/prefer-default-export': 'off',
// 'import/no-default-export': 'error',
// import sort
'sort-imports': 'off',
'import/order': 'off',
'simple-import-sort/imports': [
'error',
{
groups: [['^\\u0000'], ['^'], ['^@?\\w'], ['^@(js|image)(/.*|$)'], ['^\\.']],
},
],
'simple-import-sort/exports': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
{
selector: 'function',
format: ['camelCase', 'PascalCase'],
},
{
selector: 'variable',
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
},
],
},
};