main
mjs 63 lines 1.53 KB
Raw
1 import process from "node:process"
2 import antfu from "@antfu/eslint-config"
3
4 const isProduction = process.env.NODE_ENV === "production"
5
6 export default antfu(
7 {
8 vue: true,
9 typescript: true,
10 javascript: true,
11 jsx: true,
12
13 stylistic: {
14 indent: "tab",
15 quotes: "double"
16 },
17 rules: {
18 "e18e/ban-dependencies": ["error", { allowed: ["axios", "lodash", "depcheck", "fs-extra"] }],
19 "antfu/if-newline": "off",
20 "pnpm/yaml-enforce-settings": isProduction ? "error" : "off",
21 "style/operator-linebreak": "off",
22 "style/arrow-parens": "off",
23 "style/brace-style": "off",
24 "style/indent-binary-ops": "off",
25 "style/indent": "off",
26 "style/member-delimiter-style": "off",
27 "style/quotes": "off",
28 "style/quote-props": "off",
29 "style/eol-last": "off",
30 "style/no-mixed-spaces-and-tabs": "off",
31 "style/comma-dangle": [
32 "error",
33 {
34 arrays: "never",
35 objects: "never",
36 imports: "never",
37 exports: "never",
38 functions: "never"
39 }
40 ]
41 }
42 },
43 {
44 files: ["**/*.vue"],
45 rules: {
46 "vue/block-order": [
47 "error",
48 {
49 order: ["template", "script", "style"]
50 }
51 ],
52 "vue/component-name-in-template-casing": "off",
53 "vue/custom-event-name-casing": "off",
54 "vue/html-self-closing": "off",
55 "vue/singleline-html-element-content-newline": "off",
56 "vue/comma-dangle": "off",
57 "vue/quote-props": "off",
58 "vue/one-component-per-file": "off",
59 "vue/v-bind-style": ["error", "shorthand", { sameNameShorthand: "always" }],
60 "vue/prefer-true-attribute-shorthand": "error"
61 }
62 }
63 )