-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
53 lines (47 loc) · 1.3 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
import stylisticPlugin from '@stylistic/eslint-plugin'
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort'
import tailwindCssPlugin from 'eslint-plugin-tailwindcss'
import withNuxt from './.nuxt/eslint.config.mjs'
// To debug this configuration file, run: `npx @eslint/config-inspector`.
export default withNuxt([
...tailwindCssPlugin.configs['flat/recommended'],
// Adds a set of default rules to format the code.
{
plugins: {
'@stylistic': stylisticPlugin
}
},
// Configures the sort order of imports.
{
plugins: {
'simple-import-sort': eslintPluginSimpleImportSort
},
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error'
}
},
// TypeScript,
{
rules: {
// Disabled to allow defining one event per line with repeated types on components
// like `WlButton`, which then allows for proper code completion in the IDE.
'@typescript-eslint/unified-signatures': 'off'
}
},
// TailwindCSS
{
rules: {
'tailwindcss/no-custom-classname': [
'error',
{
whitelist: ['wl\\-[-\\w]+']
}
]
}
}
])
.override('nuxt/typescript/rules', {
// Ignores the submodules (like the React project).
ignores: ['submodules/**']
})