-
Notifications
You must be signed in to change notification settings - Fork 41
/
eslint.config.js
58 lines (57 loc) · 1.62 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
52
53
54
55
56
57
58
// @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', './docs'],
},
})
.override('nuxt/typescript/rules', {
rules: {
'@typescript-eslint/no-empty-object-type': ['off'],
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': 'allow-with-description',
},
],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
// TODO: Discuss if we want to enable this
'@typescript-eslint/no-invalid-void-type': 'off',
// 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',
'vue/require-default-prop': 'off',
'vue/no-multiple-template-root': 'off',
// NOTE: Disable this style rules if stylistic is not enabled
'vue/max-attributes-per-line': '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',
},
})