-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy patheslint.config.js
33 lines (32 loc) · 982 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
32
33
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: {
'vue/multi-word-component-names': 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-empty': 'warn',
'no-unused-vars': 'warn',
'brace-style': ['warn', 'stroustrup']
}
}
]