-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy patheslint.config.mjs
More file actions
99 lines (98 loc) · 3.01 KB
/
eslint.config.mjs
File metadata and controls
99 lines (98 loc) · 3.01 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import js from '@eslint/js';
import tsParser from '@typescript-eslint/parser';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginBetterTailwindcss from 'eslint-plugin-better-tailwindcss';
import importx from 'eslint-plugin-import-x';
import pinia from 'eslint-plugin-pinia';
import vue from 'eslint-plugin-vue';
import { globalIgnores } from 'eslint/config';
import globals from 'globals';
import ts from 'typescript-eslint';
import vueParser from 'vue-eslint-parser';
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigFile} */
export default [
js.configs.recommended,
...ts.configs.recommended,
importx.flatConfigs.recommended,
importx.flatConfigs.typescript,
...vue.configs['flat/recommended'],
pinia.configs['recommended-flat'],
{
plugins: {
'better-tailwindcss': eslintPluginBetterTailwindcss,
},
rules: {
...eslintPluginBetterTailwindcss.configs['recommended-warn'].rules,
...eslintPluginBetterTailwindcss.configs['recommended-error'].rules,
'better-tailwindcss/enforce-consistent-line-wrapping': ['warn', { preferSingleLine: true, printWidth: 120 }],
'better-tailwindcss/no-unregistered-classes': [
'warn',
{
ignore: [
'TH-*',
'extension_container',
'extensionsMenuExtensionButton',
'fa-*',
'flex-container',
'flexGap5',
'inline-drawer-*',
'interactable',
'list-*',
'menu_button*',
'popup',
'qr--button',
'qr--buttons',
'text_pole',
'note-link-span',
],
},
],
},
settings: {
'better-tailwindcss': {
entryPoint: 'src/global.css',
tailwindConfig: 'tailwind.config.js',
},
},
},
{
languageOptions: {
parser: vueParser,
parserOptions: {
parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module',
},
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
},
},
rules: {
'handle-callback-err': 'off',
'import-x/no-console': 'off',
'import-x/no-cycle': 'error',
'import-x/no-dynamic-require': 'warn',
'import-x/no-nodejs-modules': 'warn',
'no-dupe-class-members': 'off',
'no-empty-function': 'off',
'no-floating-decimal': 'error',
'no-lonely-if': 'error',
'no-multi-spaces': 'error',
'no-redeclare': 'off',
'no-shadow': 'off',
'no-undef': 'off',
'no-unused-vars': 'off',
'no-var': 'error',
'pinia/require-setup-store-properties-export': 'off',
'prefer-const': 'warn',
'vue/multi-word-component-names': 'off',
yoda: 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
},
eslintConfigPrettier,
globalIgnores(['dist/**', 'node_modules/**', 'eslint.config.mjs', 'postcss.config.js', 'vite.config.ts']),
];