-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
51 lines (48 loc) · 1.13 KB
/
eslint.config.js
File metadata and controls
51 lines (48 loc) · 1.13 KB
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
import js from '@eslint/js';
import vue from 'eslint-plugin-vue';
import globals from 'globals'
const vueConfigs = [...vue.configs["flat/recommended"], {
rules: {
'vue/html-indent': 'off',
'vue/max-attributes-per-line': 'off',
'vue/html-self-closing': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/attributes-order': 'off',
'vue/require-prop-types': 'off',
'vue/require-default-prop': 'off',
'vue/block-order': ['error', { order: ['script', 'template', 'style'] }],
},
}];
export default [
{
ignores: ['dist', 'dist-demos', 'dist-full', 'src/libs', 'vite.config.js'],
},
...vueConfigs,
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: globals.browser,
},
plugins: {
vue
},
rules: {
...js.configs.recommended.rules,
'no-use-before-define': [
'error',
{
functions: false,
classes: true,
variables: true,
},
],
},
},
];