-
-
Notifications
You must be signed in to change notification settings - Fork 168
/
eslint.config.js
31 lines (30 loc) · 954 Bytes
/
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
import globals from 'globals'
import pluginJs from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'
import importPlugin from 'eslint-plugin-import'
import nPlugin from 'eslint-plugin-n'
import promisePlugin from 'eslint-plugin-promise'
import standard from 'eslint-config-standard'
export default [
{ files: ['**/*.{js,mjs,cjs,vue}'] },
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
{
name: 'standard',
rules: standard.rules,
plugins: {
import: importPlugin,
n: nPlugin,
promise: promisePlugin
}
},
...pluginVue.configs['flat/essential'],
{
rules: {
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'vue/multi-word-component-names': 'off'
}
}
]