-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.cjs
60 lines (60 loc) · 1.63 KB
/
.eslintrc.cjs
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
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
env: {
jquery: true,
es6: true,
},
overrides: [
{
files: ['./**/index.ts'],
plugins: ['sort-exports'],
rules: {
'sort-exports/sort-exports': ['warn', {sortDir: 'asc', sortExportKindFirst: 'type'}],
},
},
{
files: ['./**/*.vue'],
extends: ['@myparcel-eslint/eslint-config-prettier-typescript-vue', '@myparcel-eslint/eslint-config-import'],
rules: {
'@typescript-eslint/no-misused-promises': 'off',
'import/first': 'off',
'vue/no-empty-component-block': 'off',
'vue/no-undef-components': [
'error',
{
ignorePatterns: ['^Pdk(?:\\w)+$'],
},
],
},
},
{
files: ['./**/*.ts', './**/*.tsx'],
extends: ['@myparcel-eslint/eslint-config-prettier-typescript', '@myparcel-eslint/eslint-config-import'],
rules: {
'class-methods-use-this': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-misused-promises': 'off',
},
},
{
files: ['*.js', '*.cjs', '*.mjs'],
parserOptions: {
sourceType: 'module',
},
extends: [
'@myparcel-eslint/eslint-config-node',
'@myparcel-eslint/eslint-config-esnext',
'@myparcel-eslint/eslint-config-prettier',
],
},
{
files: ['./**/*.spec.*', './**/*.test.*', './**/__tests__/**'],
rules: {
'@typescript-eslint/no-magic-numbers': 'off',
'max-len': 'off',
'max-lines-per-function': 'off',
},
},
],
};