-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
eslint.config.js
51 lines (50 loc) · 1.23 KB
/
eslint.config.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
// @ts-check
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
import pluginNode from 'eslint-plugin-n'
export default createConfigForNuxt({
features: {
stylistic: true,
tooling: true,
},
dirs: {
src: ['./src', './client'],
},
})
.override('nuxt/typescript/rules', {
rules: {
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': true,
},
],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
// TODO: Discuss if we want to enable this
'@typescript-eslint/no-explicit-any': 'off',
},
})
.override('nuxt/vue/rules', {
rules: {
'vue/multi-word-component-names': 'off',
'vue/no-v-html': 'off',
},
})
.append({
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
},
})
.append({
plugins: {
node: pluginNode,
},
rules: {
'node/handle-callback-err': ['error', '^(err|error)$'],
'node/no-deprecated-api': 'error',
'node/no-exports-assign': 'error',
'node/no-new-require': 'error',
'node/no-path-concat': 'error',
'node/process-exit-as-throw': 'error',
},
})