-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
37 lines (36 loc) · 1.44 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
import js from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'
export default [
js.configs.recommended,
...pluginVue.configs['flat/essential'],
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
_: 'readonly',
__: 'readonly',
Statamic: 'readonly',
BardToolbarButton: 'readonly',
},
},
rules: {
'comma-spacing': ['error', { 'before': false, 'after': true }],
'comma-style': ['error', 'last'],
'eol-last': ['error', 'always'],
'func-call-spacing': ['error', 'never'],
'key-spacing': ['error', { 'mode': 'minimum', 'beforeColon': false, 'afterColon': true }],
'keyword-spacing': ['error', { 'before': true, 'after': true }],
'linebreak-style': ['error', 'unix'],
'lines-between-class-members': ['error', 'always'],
'no-console': ['warn', { 'allow': ['warn', 'error'] }],
'no-empty-function': 'error',
'no-multiple-empty-lines': ['error', { 'max': 2 }],
'no-var': 'error',
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', { 'named': 'never', 'anonymous': 'always', 'asyncArrow': 'always' }],
},
},
]