forked from betaflight/betaflight-configurator
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.config.js
47 lines (46 loc) · 1.31 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
import { defineConfig } from "eslint-define-config";
import vuePlugin from "eslint-plugin-vue";
import prettierPlugin from "eslint-plugin-prettier";
import vueParser from "vue-eslint-parser";
export default defineConfig([
{
files: ["**/*.js", "**/*.vue"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
ol: "readonly",
wNumb: "readonly",
ConfigStorage: "readonly",
// globals for vite
__APP_PRODUCTNAME__: "readonly",
__APP_VERSION__: "readonly",
__APP_REVISION__: "readonly",
},
},
plugins: {
vue: vuePlugin,
prettier: prettierPlugin,
},
rules: {
"no-var": "error",
"prefer-template": "error",
"comma-dangle": ["error", "always-multiline"],
indent: [
"error",
4,
{
SwitchCase: 1,
},
],
},
ignores: ["dist/", "*.json", "*.html", "*.less", "*.css", "package.json"],
},
{
files: ["**/*.vue"],
languageOptions: {
parser: vueParser,
},
processor: "vue/vue",
},
]);