This repository has been archived by the owner on Aug 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
94 lines (94 loc) · 2.71 KB
/
.eslintrc.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
const aliases = []
module.exports = {
parser: '@typescript-eslint/parser',
env: {
commonjs: true,
browser: true,
es6: true,
node: true,
'vitest-globals/env': true,
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'airbnb/base', 'plugin:prettier/recommended'],
plugins: ['@typescript-eslint', 'prettier', 'vitest', 'vitest-globals', 'formatjs', 'unused-imports'],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/consistent-type-imports': 'warn',
'arrow-body-style': 'off',
'no-empty': 'off',
'unused-imports/no-unused-vars': 'warn',
'@typescript-eslint/ban-types': 'warn',
camelcase: 'off',
'global-require': 'off',
'no-empty-pattern': 'warn',
'no-debugger': 'off',
'no-unused-vars': 'off',
'no-plusplus': 'off',
'no-undef': 'error',
'no-continue': 'off',
'no-shadow': 'off',
'no-underscore-dangle': 'off',
'no-use-before-define': 'off',
'no-unused-expressions': 'off',
'class-methods-use-this': 'off',
'default-param-last': 'off',
'no-restricted-exports': 'off',
'no-constructor-return': 'off',
'unused-imports/no-unused-imports': 'error',
'import/prefer-default-export': 'off',
'import/no-dynamic-require': 'off',
'import/extensions': [
'error',
'ignorePackages',
{
js: 'ignorePackages',
jsx: 'ignorePackages',
ts: 'ignorePackages',
tsx: 'ignorePackages',
},
],
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
'import/order': [
'error',
{
'newlines-between': 'always',
groups: ['builtin', 'external', 'internal', 'index', 'sibling', 'parent', 'object', 'type'],
pathGroups: [
{
pattern: '@kubb/**',
group: 'external',
position: 'after',
},
{
pattern: aliases.length ? `+(${aliases.join('|')})/**` : '',
group: 'internal',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
},
],
},
settings: {
'import/resolver': {
node: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
},
react: {
version: 'detect',
},
},
ignorePatterns: ['*.scss.d.ts', '*rc.js', '*.config.js', '**/types/**', '**/es/**', '**/lib/**', '**/umd/**'],
}