-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
50 lines (46 loc) · 1.43 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
// @see https://github.com/eslint/eslintrc
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import path from "path";
import { fileURLToPath } from "url";
// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
resolvePluginsRelativeTo: __dirname,
recommendedConfig: js.configs.recommended,
});
export default [
...compat.config({
env: {
browser: true,
es2022: true
},
parserOptions: {
'parser': '@babel/eslint-parser',
'sourceType': 'module',
'ecmaVersion': "latest",
'requireConfigFile': false
},
extends: [
// add more generic rulesets here
'eslint:recommended',
'plugin:vue/vue3-recommended',
'plugin:compat/recommended',
],
plugins: [
'compat'
],
rules: {
strict: [0],
'prefer-spread': [0],
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
'no-undef': 'off',
'no-unused-vars': 'off',
'no-prototype-builtins': 'off',
'vue/no-multiple-template-root': 'off'
},
})
];