-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy patheslint.config.mjs
80 lines (79 loc) · 1.93 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
import tailwind from 'eslint-plugin-tailwindcss'
// import sonarjs from 'eslint-plugin-sonarjs'
// Run `npx @eslint/config-inspector` to inspect the resolved config interactively
export default createConfigForNuxt(
{
features: {
// Rules for module authors
tooling: true,
},
dirs: {
src: ['./playground'],
},
},
[
...tailwind.configs['flat/recommended'],
// sonarjs.configs.recommended
],
)
.override('nuxt/vue/rules', {
rules: {
'vue/no-v-html': 0,
'vue/multi-word-component-names': 'off',
'vue/no-empty-component-block': 'error',
'vue/padding-line-between-blocks': 'error',
'vue/no-v-for-template-key-on-child': 'error',
'vue/prefer-true-attribute-shorthand': 'error',
'vue/component-api-style': 'error',
'vue/block-lang': [
'error',
{
script: {
lang: 'ts',
},
},
],
'vue/block-order': [
'error',
{
order: [['script', 'template'], 'style'],
},
],
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
},
},
],
},
})
.override('nuxt/typescript/rules', {
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
},
})
.override('tailwindcss:rules', {
rules: {
'tailwindcss/classnames-order': 'off',
'tailwindcss/no-custom-classname': [
'error',
{
whitelist: ['bk-grid-overlay', 'bk-drop-element'],
},
],
},
})
.overrideRules({
'sonarjs/pluginRules-of-hooks': ['off'],
'sonarjs/no-duplicate-string': [
'error',
{
ignoreStrings:
'block:translate,block:edit,entity:edit,entity:translate,dragging:end,block:append,dragging:start',
},
],
})