-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
64 lines (64 loc) · 2 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
61
62
63
64
module.exports = {
root: true,
overrides: [
{
files: ['**/index.ts'],
plugins: ['sort-exports'],
rules: {
'sort-exports/sort-exports': ['warn', {sortDir: 'asc', sortExportKindFirst: 'type'}],
},
},
{
extends: ['@myparcel-eslint/eslint-config-prettier-typescript-vue', '@myparcel-eslint/eslint-config-import'],
files: ['**/*.vue'],
rules: {
'@typescript-eslint/no-misused-promises': 'off',
// Disabled because import messes with multiple component blocks, like when using script setup and inheritAttrs.
'import/first': 'off',
'vue/html-self-closing': 'off',
'vue/no-bare-strings-in-template': 'off',
// Disabled because @typescript-eslint freaks out when there is no component block
'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: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'class-methods-use-this': 'off',
},
},
{
files: ['**/*.js', '**/*.mjs'],
parserOptions: {
sourceType: 'module',
},
},
{
files: ['**/*.js', '**/*.cjs', '**/*.mjs'],
extends: [
'@myparcel-eslint/eslint-config-node',
'@myparcel-eslint/eslint-config-esnext',
'@myparcel-eslint/eslint-config-prettier',
'@myparcel-eslint/eslint-config-import',
],
},
{
files: ['**/*.spec.*', '**/*.test.*', '**/__tests__/**', '**/*Test.*'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-magic-numbers': 'off',
'max-len': 'off',
'max-lines-per-function': 'off',
},
},
],
};