-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
41 lines (40 loc) · 997 Bytes
/
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
import globals from 'globals';
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import pluginVue from 'eslint-plugin-vue';
import pluginJest from 'eslint-plugin-jest';
export default [
js.configs.recommended,
...pluginVue.configs['flat/recommended'],
eslintConfigPrettier,
{
ignores: ['dist/**/*'],
},
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.es2023,
...globals.browser,
...globals.node,
},
},
rules: {
// override/add rules settings here, such as:
// 'vue/no-unused-vars': 'error'
},
},
{
files: ['**/*.spec.js', '**/*.test.js'],
plugins: { jest: pluginJest },
languageOptions: {
globals: pluginJest.environments.globals.globals,
},
},
{
// HACK: https://github.com/vuejs/eslint-plugin-vue/issues/1355
files: ['**/*.html'],
rules: { 'vue/comment-directive': 'off' },
},
];