-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
57 lines (56 loc) · 1.42 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
45
46
47
48
49
50
51
52
53
54
55
56
57
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
export default createConfigForNuxt(
// your custom flat configs go here, for example:
{
// .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts
files: [
'**/*.vue',
'**/*.js',
'**/*.jsx',
'**/*.cjs',
'**/*.mjs',
'**/*.ts',
'**/*.tsx',
'**/*.cts',
'**/*.mts',
],
extends: ['@nuxt/eslint-config', 'prettier'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
},
linterOptions: {
reportUnusedDisableDirectives: 'off',
},
globals: {
definePage: 'readonly',
},
},
{
ignores: ['**/public/'],
},
// {
// ...
// }
)
.override('nuxt/typescript/rules', {
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/triple-slash-reference': 'off',
},
})
.override('nuxt/vue/rules', {
// These pages are not used directly by users so they can have one-word names.
files: [
'**/pages/**/*.{js,ts,vue}',
'**/layouts/**/*.{js,ts,vue}',
'**/app.{js,ts,vue}',
'**/error.{js,ts,vue}',
],
rules: {
'vue/multi-word-component-names': 'off',
'vue/html-self-closing': 'off',
},
})