-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
87 lines (81 loc) · 2.55 KB
/
Copy patheslint.config.js
File metadata and controls
87 lines (81 loc) · 2.55 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
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginVue from 'eslint-plugin-vue';
import vueTsConfig from '@vue/eslint-config-typescript';
export default tseslint.config(
{
ignores: [
'dist/**',
'coverage/**',
'node_modules/**',
'docs/.vitepress/dist/**',
'docs/.vitepress/cache/**',
// Generated by FormKit, ~100k of theme tokens — not hand-maintained.
'formkit.theme.ts',
],
},
js.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs['flat/recommended'],
...vueTsConfig(),
{
rules: {
// The public API intentionally surfaces `any` in a few resolver/schema
// seams where FormKit's own types bottom out. Surface these as warnings
// so they stay visible without blocking CI.
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
// Components are registered under their multi-word Craft* names via the
// library entrypoint; SFC filenames are already the source of truth.
'vue/multi-word-component-names': 'off',
// The four rules below each flag a genuine pre-existing defect (see the
// sites listed in the PR that introduced this config). Fixing them
// changes runtime behaviour, so they are warnings for now — triage and
// fix them, then promote these back to 'error'.
'vue/require-v-for-key': 'warn', // CraftEditorBlueprintsList.vue:3
'vue/no-use-v-if-with-v-for': 'warn', // CraftFrame.vue:16,22,30,36
'vue/no-dupe-keys': 'warn', // CraftIframe.vue:84
'vue/no-mutating-props': 'warn', // CraftNodeStatic.vue:145
},
},
{
// Build/docs scripts run in Node, not the browser bundle.
files: [
'*.config.{js,ts}',
'docs/**/*.{js,ts}',
'docs/.vitepress/**/*.{js,ts}',
],
languageOptions: {
globals: {
__dirname: 'readonly',
__filename: 'readonly',
console: 'readonly',
module: 'writable',
process: 'readonly',
require: 'readonly',
},
},
},
{
files: ['tests/**/*.{ts,js,vue}'],
languageOptions: {
globals: {
describe: 'readonly',
it: 'readonly',
expect: 'readonly',
vi: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
},
},
},
);