generated from resir014/nextjs-typescript-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
44 lines (39 loc) · 1.14 KB
/
eslint.config.mjs
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
import { config as defaultConfig } from '@epic-web/config/eslint'
import simpleImportSort from 'eslint-plugin-simple-import-sort'
const vitestFiles = ['app/**/__tests__/**/*', 'app/**/*.{spec,test}.*']
const testFiles = ['**/tests/**', ...vitestFiles]
const appFiles = ['app/**']
export default [
...defaultConfig,
{
plugins: {
'simple-import-sort': simpleImportSort,
},
rules: {
'no-console': 'off',
'@typescript-eslint/no-floating-promises': 'off', // we don't want to enforce this
'jsx-a11y/alt-text': 'off', // it's not smart enough
'jsx-a11y/media-has-caption': 'off',
'no-unused-private-class-members': 'off',
'prefer-object-has-own': 'off',
'import/newline-after-import': 'warn',
'simple-import-sort/exports': 'warn',
// this one isn't smart enough for our "@/" imports
'import/order': 'off',
'sort-imports': 'off',
'simple-import-sort/imports': [
'warn',
{
groups: [
['^.+\\.s?css$'],
['^\\u0000'],
['^react$', '^react-dom$'],
['^~', '^@/'],
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
],
},
],
},
},
]