-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
48 lines (44 loc) · 1.06 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
const OFF = 0;
const WARN = 1;
const ERROR = 2;
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: [
'prettier',
'unused-imports',
'no-relative-import-paths',
'simple-import-sort',
],
extends: [
'next/core-web-vitals',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js', '**/*.png', '*.js'],
rules: {
'prettier/prettier': WARN,
'import/prefer-default-export': OFF,
'import/order': OFF,
'import/no-default-export': ERROR,
'class-methods-use-this': OFF,
'unused-imports/no-unused-imports': WARN,
'no-relative-import-paths/no-relative-import-paths': [
WARN,
{ rootDir: 'src' },
],
'simple-import-sort/imports': WARN,
'simple-import-sort/exports': WARN,
},
};