-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
53 lines (53 loc) · 1.73 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
53
module.exports = {
extends: ['next', 'next/core-web-vitals'],
plugins: ['@typescript-eslint', 'simple-import-sort'],
overrides: [
{
files: ['*.ts', '*.tsx'], // Your TypeScript files extension
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'], // Specify it only for TypeScript files
},
},
],
rules: {
'no-restricted-imports': ['error', '@mui/material', '@mui/icons-material'], // Enforce tree shaking
'no-console': 'off',
'@typescript-eslint/comma-dangle': 'off',
'import/newline-after-import': ['error', { count: 1 }],
'object-curly-newline': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-props-no-spreading': 'off',
'import/no-extraneous-dependencies': 'off',
'react/prop-types': 'off',
'implicit-arrow-linebreak': 0,
'function-paren-newline': 0,
'@typescript-eslint/no-unused-vars': 1,
'no-confusing-arrow': 0,
'operator-linebreak': 0,
'arrow-body-style': 0,
'react/no-unescaped-entities': 0,
'react/require-default-props': 0,
'react/no-unused-prop-types': 0,
'simple-import-sort/imports': [
'error',
{
groups: [
// Packages `next` / `react` related packages come first.
['^next', '^react'],
// MUI imports
['^(@mui)(/.*|$)'],
// Other packages come after.
['^@', '^\\w'],
// Parent imports. Put `..` last.
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
// Other relative imports. Put same-folder imports and `.` last.
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
// Style imports.
['^.+\\.?(css)$'],
],
},
],
},
parser: '@typescript-eslint/parser',
}