-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
39 lines (39 loc) · 1.21 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
module.exports = {
extends: ['next/core-web-vitals', 'plugin:prettier/recommended', 'plugin:mdx/recommended'],
plugins: ['unused-imports', 'simple-import-sort'],
rules: {
// https://github.com/sweepline/eslint-plugin-unused-imports
'no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{ vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' },
],
// https://github.com/lydell/eslint-plugin-simple-import-sort
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
// https://nextjs.org/docs/basic-features/eslint
'react-hooks/exhaustive-deps': 0,
'react/display-name': 0,
'@next/next/no-img-element': 0,
},
overrides: [
{
files: ['**/*.{ts,tsx}'],
parser: '@typescript-eslint/parser',
rules: {
'@typescript-eslint/no-unused-vars': 'off',
'simple-import-sort/imports': [
'error',
{
groups: [['^\\u0000'], ['^@?\\w'], ['^~/'], ['^\\.']],
},
],
},
parserOptions: {
tsconfigRootDir: __dirname,
project: ['tsconfig.json'],
},
},
],
};