-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
70 lines (68 loc) · 2.03 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import js from '@eslint/js'
import path from 'path'
import { fileURLToPath } from 'url'
import { FlatCompat } from '@eslint/eslintrc'
import eslintProgressDisplay from './eslint-progress-display.js'
import vueParser from 'vue-eslint-parser'
import globals from 'globals'
import pluginVue from 'eslint-plugin-vue'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const eslintrc = new FlatCompat({
baseDirectory: __dirname,
})
export default [
...eslintrc.extends('plugin:tailwindcss/recommended'),
...eslintrc.extends('plugin:promise/recommended'),
...eslintrc.extends('plugin:n/recommended'),
...pluginVue.configs['flat/recommended'],
js.configs.recommended,
{
ignores: ['public/**/*.*', 'vendor/**/*.*'],
},
{
plugins: {
'eslintProgressDisplay': {
rules: { showProgress: eslintProgressDisplay }
}
},
rules: {
'eslintProgressDisplay/showProgress': 1,
quotes: ['error', 'single'],
indent: ['error', 2],
semi: ['error', 'never'],
'comma-dangle': ['error', 'always-multiline'],
'eol-last': ['error', 'always'],
'object-curly-spacing': ['error', 'always'],
'tailwindcss/classnames-order': 'off',
'tailwindcss/no-custom-classname': 'off',
'n/no-missing-import': 'off',
'n/no-extraneous-import': 'off',
'no-undef': 'off',
'no-void': ['error', { allowAsStatement: true }],
'no-unused-vars': 'off',
'no-return-await': 'off',
},
linterOptions: {
reportUnusedDisableDirectives: true,
},
},
{
files: ['**/*.vue'],
languageOptions: {
parser: vueParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: globals.node,
},
},
rules: {
'vue/multi-word-component-names': 'off',
'vue/first-attribute-linebreak': 'off',
'vue/max-attributes-per-line': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/padding-line-between-blocks': ['error', 'always'],
}
},
]