-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy patheslint.config.js
55 lines (54 loc) · 1.49 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
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import vuelint from 'eslint-plugin-vue'
import prettierRecommended from 'eslint-plugin-prettier/recommended'
import prettierConfig from 'eslint-config-prettier'
export default tseslint.config(
{ ignores: ['lib/**', 'dist/**', 'types/**'] },
eslint.configs.recommended,
tseslint.configs.recommended,
prettierRecommended,
...vuelint.configs['flat/recommended'],
{
files: ['**/*.{ts,js,vue}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
parser: tseslint.parser,
},
},
rules: {
'no-console': 'error',
'no-debugger': 'error',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
quotes: ['error', 'single'],
semi: ['error', 'never'],
'vue/multi-word-component-names': 'off',
'no-restricted-imports': [
'error',
{
paths: [
{ name: 'lodash', message: 'Use lodash-unified instead.' },
{ name: 'lodash-es', message: 'Use lodash-unified instead.' },
],
patterns: [
{
group: ['lodash/*', 'lodash-es/*'],
message: 'Use lodash-unified instead.',
},
],
},
],
},
},
{
files: ['build/**/*.ts', 'demo/**/*.vue', 'docs/**/*.vue'],
rules: {
'no-console': 'off',
'no-debugger': 'off',
},
},
prettierConfig,
)