-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
35 lines (34 loc) · 1.09 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
import pluginVue from "eslint-plugin-vue";
import vueTsEslintConfig from "@vue/eslint-config-typescript";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
export default [
...pluginVue.configs["flat/recommended"],
...vueTsEslintConfig({
extends: ["strictTypeChecked"],
}),
{
files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.vue"],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"vue/multi-word-component-names": "off",
"@typescript-eslint/restrict-template-expressions": [
"error",
{
allowNumber: true,
allowBoolean: true,
},
],
},
},
{
files: ["tests/**/*.test.ts"],
rules: {
// .to.be.empty, .to.be.true, etc. are valid Vitest assertions.
"@typescript-eslint/no-unused-expressions": "off",
// Complains about { rerender } in tests, which is okay.
"@typescript-eslint/unbound-method": "off",
},
},
eslintPluginPrettierRecommended,
];