-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.cjs
54 lines (53 loc) · 1.66 KB
/
eslint.config.cjs
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
// https://eslint.style/rules?filter=disallow
// https://github.com/antfu/eslint-config
// https://prettier.io/docs/en/options
const stylisticPlugin = require('@stylistic/eslint-plugin');
const prettier = require('prettier');
const { FlatCompat } = require('@eslint/eslintrc');
module.exports = {
files: ['**/*.jsx', '**/*.js', '**/*.cjs', '**/*.mjs', '**/*.vue'],
plugins: {
'@stylistic': stylisticPlugin,
prettier: prettier,
},
rules: {
'@stylistic/array-bracket-newline': [
'error',
{
multiline: true,
},
],
'@stylistic/array-bracket-spacing': ['error', 'never'],
'@stylistic/array-element-newline': ['error', 'consistent'],
'@stylistic/arrow-parens': ['error', 'always'],
'@stylistic/comma-dangle': [
'error',
{
arrays: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
imports: 'always-multiline',
objects: 'only-multiline',
},
],
'@stylistic/brace-style': 'error',
'@stylistic/disallowMultipleVarDecl': 0,
'@stylistic/indent': [
'error',
4,
{
ignoredNodes: ['SwitchCase'],
},
],
'@stylistic/linebreak-style': ['error', 'unix'],
'@stylistic/maximumLineLength': 0,
'@stylistic/no-console': 0,
'@stylistic/quotes': ['error', 'single'],
'@stylistic/semi': ['error', 'always'],
// ,
// "vue/html-indent": [
// "warn",
// 4
// ]
},
};