-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy patheslint.config.js
115 lines (109 loc) · 2.55 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import vueI18n from "@intlify/eslint-plugin-vue-i18n";
import pluginMocha from "eslint-plugin-mocha";
import pluginCypress from "eslint-plugin-cypress/flat";
import pluginVue from "eslint-plugin-vue";
import js from "@eslint/js";
import json from "@eslint/json";
import globals from "globals";
import vueParser from "vue-eslint-parser";
import eslintConfigPrettier from "eslint-config-prettier";
export default [
pluginMocha.configs.flat.recommended,
pluginCypress.configs.recommended,
...vueI18n.configs["flat/recommended"],
js.configs.recommended,
...pluginVue.configs["flat/recommended"],
eslintConfigPrettier,
{
ignores: [
"node_modules/",
"vendor/",
"app/",
"coverage/",
"public/",
"docs/",
"storage/",
"tests/Backend/Fixtures/Locales/",
"resources/custom/",
"cypress.config.js",
"vite.config.js",
"vite.config.common.js",
"vite.config.coverage.js",
"postcss.config.js",
"eslint.config.js",
"tailwind.config.js",
],
},
{
settings: {
"vue-i18n": {
localeDir: {
pattern: "./tests/Backend/Fixtures/Locales/*.json",
localeKey: "file",
},
messageSyntaxVersion: "^9.0.0",
},
},
rules: {
"@intlify/vue-i18n/no-html-messages": "error",
"@intlify/vue-i18n/no-raw-text": [
"error",
{
ignoreNodes: ["raw-text"],
},
],
"@intlify/vue-i18n/no-missing-keys": "error",
"@intlify/vue-i18n/key-format-style": [
"warn",
"snake_case",
{
splitByDots: true,
},
],
"@intlify/vue-i18n/no-v-html": "error",
},
},
{
files: ["**/*.js", "**/*.vue"],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
Atomics: "readonly",
SharedArrayBuffer: "readonly",
expect: "readonly",
},
parser: vueParser,
ecmaVersion: 2022,
sourceType: "module",
},
rules: {
"vue/multi-word-component-names": "off",
"vue/no-v-text-v-html-on-component": "warn",
"vue/valid-v-slot": [
"error",
{
allowModifiers: true,
},
],
"vue/custom-event-name-casing": ["error"],
"mocha/no-exclusive-tests": "error",
"mocha/no-skipped-tests": "error",
},
},
{
plugins: {
json,
},
},
{
// files: ['**/*.json'],
// language: 'json/json',
},
{
files: ["**/*.cy.js"],
rules: {
"no-unused-expressions": "off",
},
},
];