generated from joeyfigaro/tsup-lib-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.mjs
79 lines (79 loc) · 1.83 KB
/
.eslintrc.mjs
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
export default {
env: {
browser: true,
es6: true,
},
extends: ['plugin:@typescript-eslint/recommended', 'prettier'],
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
plugins: ['import', '@typescript-eslint'],
rules: {
quotes: [2, 'single', { avoidEscape: true }],
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unused-vars': [
'error',
{ varsIgnorePattern: '^[_]*$', ignoreRestSiblings: true },
],
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-explicit-any': 0,
'no-use-before-define': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
},
{
selector: 'function',
format: ['camelCase', 'PascalCase'],
},
{
selector: 'typeLike',
format: ['PascalCase', 'UPPER_CASE'],
},
{
selector: 'enum',
format: ['PascalCase', 'UPPER_CASE'],
},
],
'import/export': 2,
'import/named': 'off',
'import/default': 'off',
'import/namespace': 'off',
'import/prefer-default-export': 'off',
'import/order': [
'error',
{
groups: ['external', 'builtin'],
},
],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts'],
},
},
},
overrides: [
{
files: ['**/*.d.ts'],
rules: {
'@typescript-eslint/ban-types': [
'error',
{
types: {
Function: false,
},
extendDefaults: true,
},
],
},
},
],
};