-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnext.mjs
More file actions
44 lines (39 loc) · 946 Bytes
/
next.mjs
File metadata and controls
44 lines (39 loc) · 946 Bytes
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 nextPlugin from '@next/eslint-plugin-next'
import { COMMON_SORT_GROUPS, JAVASCRIPT_FILES, TYPESCRIPT_FILES } from '../constants.mjs'
import react from './react.mjs'
export default [
...react,
{
name: 'prefer-code-style/next/rules',
files: [...JAVASCRIPT_FILES, ...TYPESCRIPT_FILES],
plugins: {
'@next/next': nextPlugin,
},
rules: {
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs['core-web-vitals'].rules,
'@next/next/no-img-element': 'off',
'simple-import-sort/imports': [
1,
{
groups: [
['^react'],
['^next', '^@next', '^@?\\w'],
['^(~|@)(/.*|$)'],
...COMMON_SORT_GROUPS,
],
},
],
},
},
{
name: 'prefer-code-style/next/ignores',
ignores: [
'public/**',
'next-env.d.ts',
'.next/**',
'dist/**',
'build/**',
],
},
]