-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy patheslint.config.mjs
86 lines (82 loc) · 2.94 KB
/
eslint.config.mjs
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
import eslint from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import pluginVue from 'eslint-plugin-vue';
import vueParser from "vue-eslint-parser";
import eslintConfigPrettier from "eslint-config-prettier";
export default [
{
files: ["src/**/*.{vue,ts}"],
},
{
ignores: ['dist', 'build', 'node_modules', 'functions', 'holidays', 'patch', 'tailwind.config.js', "batchCustomer", "postcss.config.js", "batch", "vue.config.js", "vue.config.js", "zipcodeJP", "vite.config.js", "eslint.config.mjs", "postcss.config.cjs"],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs['flat/essential'],
{
plugins: {
'typescript-eslint': tseslint.plugin,
},
languageOptions: {
parserOptions: {
parser: tseslint.parser,
project: './tsconfig.json',
extraFileExtensions: ['.vue'],
sourceType: 'module',
},
globals: globals.browser,
},
rules: {
//indent: ["error", 2],
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^__",
varsIgnorePattern: "^__",
caughtErrorsIgnorePattern: "^__",
},
],
"@typescript-eslint/no-explicit-any": "off", // warn
"@typescript-eslint/no-unused-expressions": "off",
// "@typescript-eslint/no-unnecessary-type-assertion": "error",
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
"no-unreachable": "error",
"vue/no-unused-vars": "error",
"vue/no-reserved-component-names": "error",
"vue/multi-word-component-names": "off",
"vue/v-bind-style": "error",
"vue/require-default-prop": "off",
"vue/require-prop-types": "error",
"vue/no-mutating-props": "off", // warn
"vue/no-undef-properties": "error",
"no-undef": "off", // warn TODO
"no-irregular-whitespace": "off",
"@typescript-eslint/ban-ts-comment": "off", // TODO
"vue/attribute-hyphenation": "off",
"vue/v-on-event-hyphenation": "off",
"accessor-pairs": "error",
"no-duplicate-imports": "error",
// "no-type-assertion/no-type-assertion": "warn",
"no-unreachable": "error",
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
"vue/require-explicit-emits": "error",
"vue/no-unused-properties": "error",
"@typescript-eslint/no-shadow": "warn",
"no-eq-null": "error",
"no-use-before-define": "error",
"no-empty-function": "error",
"no-negated-condition": "error",
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"no-useless-return": "error",
"array-callback-return": "error",
"require-await": "error",
"eqeqeq": "error",
"init-declarations": "error",
},
},
eslintConfigPrettier,
];