-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
54 lines (53 loc) · 1.63 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
import antfu from "@antfu/eslint-config";
// import a11y from "eslint-plugin-vue-a11y";
import a11y from "eslint-plugin-vuejs-accessibility";
export default antfu(
{
plugins: {
"vuejs-accessibility": a11y,
},
ignores: [
".vscode/settings.json",
".vscode/settings.json/**",
"src/assets/locales/*.json",
"src/assets/locales/*.json/**",
"public/**/*",
],
// ...pluginVueA11y.configs["flat/recommended"],
rules: {
...a11y.configs.recommended.rules,
"ts/semi": "off",
"curly": ["error", "all"],
"no-console": "off",
"no-alert": "off",
// "no-shadow": ["error", { builtinGlobals: true }],
"no-shadow": "off",
"vue/html-self-closing": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"style/max-len": ["error", { code: 120, tabWidth: 2 }],
"style/semi": ["error", "always"],
"style/indent": 2, // 4, or 'tab'
"style/quotes": ["error", "double"],
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
"vuejs-accessibility/label-has-for": ["error", { required: { every: ["nesting"] } }],
"vuejs-accessibility/anchor-has-content": "off",
},
},
{
ignores: ["public/**/*", "src/utils/bibleStructure.js"],
},
// {
// files: ["**/*.ts", "**/*.vue"],
// ignores: ["**/*.json"],
// ...pluginVueA11y.configs["flat/recommended"],
// rules: {},
// },
{
files: ["**/*.json", "**/*.md"],
ignores: ["public/**/*.json"],
rules: {
"style/max-len": ["error", { code: 600, tabWidth: 2 }],
},
},
);