@autofleet/lint 1.0.0 → 1.0.1-beta-a82d4d55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +213 -0
- package/.oxlintrc.json +6 -242
- package/.prettierignore +28 -0
- package/.prettierrc.json +10 -0
- package/README.md +284 -192
- package/RULES.md +180 -350
- package/bin/eslint.js +27 -0
- package/bin/oxlint.js +17 -0
- package/bin/prettier.js +17 -0
- package/package.json +33 -21
- package/.oxfmtrc.json +0 -22
- package/MIGRATION_GAPS.md +0 -299
- package/bin/oxfmt.cjs +0 -43
- package/bin/oxlint.cjs +0 -44
- package/bin/postinstall.cjs +0 -87
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"env": {
|
|
4
|
+
"node": true,
|
|
5
|
+
"jest": true,
|
|
6
|
+
"es2022": true
|
|
7
|
+
},
|
|
8
|
+
"extends": [
|
|
9
|
+
"airbnb-base",
|
|
10
|
+
"airbnb-typescript/base",
|
|
11
|
+
"plugin:@typescript-eslint/recommended",
|
|
12
|
+
"plugin:unicorn/recommended",
|
|
13
|
+
"plugin:prettier/recommended"
|
|
14
|
+
],
|
|
15
|
+
"rules": {
|
|
16
|
+
"import/extensions": [
|
|
17
|
+
"error",
|
|
18
|
+
"ignorePackages",
|
|
19
|
+
{
|
|
20
|
+
"js": "never",
|
|
21
|
+
"ts": "never"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"@typescript-eslint/no-unused-vars": [
|
|
25
|
+
"error",
|
|
26
|
+
{
|
|
27
|
+
"argsIgnorePattern": "^_",
|
|
28
|
+
"varsIgnorePattern": "^_"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
32
|
+
"@typescript-eslint/camelcase": "off",
|
|
33
|
+
"import/prefer-default-export": "off",
|
|
34
|
+
"max-len": "off",
|
|
35
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
36
|
+
"@typescript-eslint/no-explicit-any": "error",
|
|
37
|
+
"@typescript-eslint/no-floating-promises": "error",
|
|
38
|
+
"@typescript-eslint/await-thenable": "error",
|
|
39
|
+
"@typescript-eslint/no-misused-promises": [
|
|
40
|
+
"error",
|
|
41
|
+
{
|
|
42
|
+
"checksVoidReturn": false
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"@typescript-eslint/require-await": "warn",
|
|
46
|
+
"@typescript-eslint/naming-convention": [
|
|
47
|
+
"warn",
|
|
48
|
+
{
|
|
49
|
+
"selector": "default",
|
|
50
|
+
"format": ["camelCase"],
|
|
51
|
+
"leadingUnderscore": "allow",
|
|
52
|
+
"trailingUnderscore": "allow"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"selector": "variable",
|
|
56
|
+
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
|
|
57
|
+
"leadingUnderscore": "allow"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"selector": "typeLike",
|
|
61
|
+
"format": ["PascalCase"]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"selector": "enumMember",
|
|
65
|
+
"format": ["UPPER_CASE", "PascalCase"]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"selector": "property",
|
|
69
|
+
"format": null
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"no-console": "error",
|
|
73
|
+
"no-debugger": "error",
|
|
74
|
+
"prefer-const": "error",
|
|
75
|
+
"no-var": "error",
|
|
76
|
+
"eqeqeq": ["error", "always", { "null": "ignore" }],
|
|
77
|
+
"curly": ["error", "all"],
|
|
78
|
+
"no-async-promise-executor": "error",
|
|
79
|
+
"prefer-promise-reject-errors": "error",
|
|
80
|
+
"import/no-duplicates": "error",
|
|
81
|
+
"import/order": [
|
|
82
|
+
"warn",
|
|
83
|
+
{
|
|
84
|
+
"groups": [
|
|
85
|
+
"builtin",
|
|
86
|
+
"external",
|
|
87
|
+
"internal",
|
|
88
|
+
"parent",
|
|
89
|
+
"sibling",
|
|
90
|
+
"index"
|
|
91
|
+
],
|
|
92
|
+
"newlines-between": "never",
|
|
93
|
+
"alphabetize": {
|
|
94
|
+
"order": "asc",
|
|
95
|
+
"caseInsensitive": true
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"no-restricted-syntax": [
|
|
100
|
+
"error",
|
|
101
|
+
{
|
|
102
|
+
"selector": "ForInStatement",
|
|
103
|
+
"message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"selector": "LabeledStatement",
|
|
107
|
+
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"selector": "WithStatement",
|
|
111
|
+
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"unicorn/filename-case": "off",
|
|
115
|
+
"unicorn/prevent-abbreviations": "off",
|
|
116
|
+
"unicorn/no-null": "off",
|
|
117
|
+
"unicorn/prefer-module": "off",
|
|
118
|
+
"unicorn/prefer-top-level-await": "off",
|
|
119
|
+
"unicorn/no-array-reduce": "off",
|
|
120
|
+
"unicorn/no-array-for-each": "off",
|
|
121
|
+
"unicorn/prefer-spread": "warn",
|
|
122
|
+
"unicorn/prefer-node-protocol": "error",
|
|
123
|
+
"unicorn/prefer-ternary": "warn",
|
|
124
|
+
"unicorn/consistent-function-scoping": "warn",
|
|
125
|
+
"unicorn/no-useless-undefined": "warn",
|
|
126
|
+
"unicorn/prefer-array-some": "error",
|
|
127
|
+
"unicorn/prefer-array-find": "error",
|
|
128
|
+
"unicorn/prefer-includes": "error",
|
|
129
|
+
"unicorn/prefer-string-starts-ends-with": "error",
|
|
130
|
+
"unicorn/throw-new-error": "error",
|
|
131
|
+
"unicorn/error-message": "error",
|
|
132
|
+
"unicorn/no-instanceof-array": "error",
|
|
133
|
+
"unicorn/prefer-default-parameters": "warn",
|
|
134
|
+
"unicorn/prefer-optional-catch-binding": "error"
|
|
135
|
+
},
|
|
136
|
+
"overrides": [
|
|
137
|
+
{
|
|
138
|
+
"files": ["src/**.js", "**/*.js"],
|
|
139
|
+
"rules": {
|
|
140
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
141
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
142
|
+
"@typescript-eslint/camelcase": "off"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"files": ["*.test.ts", "**/*.test.ts", "*.spec.ts", "**/*.spec.ts"],
|
|
147
|
+
"rules": {
|
|
148
|
+
"global-require": "off",
|
|
149
|
+
"no-console": "error",
|
|
150
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
151
|
+
"no-restricted-imports": [
|
|
152
|
+
"error",
|
|
153
|
+
{
|
|
154
|
+
"patterns": [
|
|
155
|
+
{
|
|
156
|
+
"group": ["**/*.test", "**/*.spec"],
|
|
157
|
+
"message": "Importing test files from other test files can cause tests to run multiple times"
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"no-restricted-syntax": [
|
|
163
|
+
"error",
|
|
164
|
+
{
|
|
165
|
+
"selector": "ExportNamedDeclaration",
|
|
166
|
+
"message": "Exporting from test files is not allowed, this is usually a mistake that can cause tests to run multiple times"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"selector": "ExportDefaultDeclaration",
|
|
170
|
+
"message": "Exporting default from test files is not allowed, this is usually a mistake that can cause tests to run multiple times"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"selector": "ForInStatement",
|
|
174
|
+
"message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"selector": "LabeledStatement",
|
|
178
|
+
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"selector": "WithStatement",
|
|
182
|
+
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"parser": "@typescript-eslint/parser",
|
|
189
|
+
"parserOptions": {
|
|
190
|
+
"project": "./tsconfig.json",
|
|
191
|
+
"sourceType": "module"
|
|
192
|
+
},
|
|
193
|
+
"ignorePatterns": ["dist/*", "node_modules/", "jest.config.js", "migrations/*", "**/mock.ts"],
|
|
194
|
+
"plugins": ["@typescript-eslint", "unicorn"],
|
|
195
|
+
"settings": {
|
|
196
|
+
"import/extensions": [
|
|
197
|
+
"error",
|
|
198
|
+
"ignorePackages",
|
|
199
|
+
{
|
|
200
|
+
"js": "never",
|
|
201
|
+
"ts": "never"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"import/parsers": {
|
|
205
|
+
"@typescript-eslint/parser": [".ts"]
|
|
206
|
+
},
|
|
207
|
+
"import/resolver": {
|
|
208
|
+
"node": {
|
|
209
|
+
"extensions": [".js", ".ts", ".json"]
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
package/.oxlintrc.json
CHANGED
|
@@ -1,255 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
3
|
-
"env": {
|
|
4
|
-
"node": true,
|
|
5
|
-
"jest": true,
|
|
6
|
-
"es2022": true
|
|
7
|
-
},
|
|
8
|
-
"globals": {},
|
|
2
|
+
"$schema": "https://oxc.rs/schema/oxlintrc.json",
|
|
9
3
|
"rules": {
|
|
10
|
-
|
|
11
|
-
"eqeqeq": "error",
|
|
12
|
-
"curly": "error",
|
|
13
|
-
"no-console": "error",
|
|
14
|
-
"no-debugger": "error",
|
|
15
|
-
"prefer-const": "error",
|
|
16
|
-
"no-var": "error",
|
|
17
|
-
"no-async-promise-executor": "error",
|
|
18
|
-
"prefer-promise-reject-errors": "error",
|
|
19
|
-
"no-await-in-loop": "warn",
|
|
20
|
-
"no-constant-condition": "warn",
|
|
21
|
-
"no-control-regex": "error",
|
|
22
|
-
"no-duplicate-case": "error",
|
|
23
|
-
"no-empty": "warn",
|
|
24
|
-
"no-ex-assign": "error",
|
|
25
|
-
"no-extra-boolean-cast": "warn",
|
|
26
|
-
"no-func-assign": "error",
|
|
27
|
-
"no-inner-declarations": "error",
|
|
28
|
-
"no-invalid-regexp": "error",
|
|
29
|
-
"no-irregular-whitespace": "error",
|
|
30
|
-
"no-loss-of-precision": "error",
|
|
31
|
-
"no-misleading-character-class": "error",
|
|
32
|
-
"no-prototype-builtins": "warn",
|
|
33
|
-
"no-regex-spaces": "error",
|
|
34
|
-
"no-self-assign": "error",
|
|
35
|
-
"no-self-compare": "error",
|
|
36
|
-
"no-setter-return": "error",
|
|
37
|
-
"no-sparse-arrays": "error",
|
|
38
|
-
"no-this-before-super": "error",
|
|
39
|
-
"no-unreachable": "error",
|
|
40
|
-
"no-unsafe-finally": "error",
|
|
41
|
-
"no-unsafe-negation": "error",
|
|
42
|
-
"no-unsafe-optional-chaining": "error",
|
|
43
|
-
"no-unused-labels": "error",
|
|
44
|
-
"no-unused-vars": "error",
|
|
45
|
-
"no-useless-catch": "warn",
|
|
46
|
-
"no-useless-escape": "warn",
|
|
47
|
-
"no-with": "error",
|
|
48
|
-
"require-await": "warn",
|
|
49
|
-
"use-isnan": "error",
|
|
50
|
-
"valid-typeof": "error",
|
|
51
|
-
"no-unused-private-class-members": "warn",
|
|
52
|
-
"no-useless-backreference": "error",
|
|
53
|
-
"no-useless-call": "warn",
|
|
54
|
-
"no-useless-constructor": "warn",
|
|
55
|
-
"no-useless-rename": "warn",
|
|
56
|
-
"no-throw-literal": "error",
|
|
57
|
-
"no-return-assign": "warn",
|
|
58
|
-
"no-sequences": "error",
|
|
59
|
-
"no-multi-assign": "warn",
|
|
60
|
-
"no-nested-ternary": "warn",
|
|
61
|
-
"no-param-reassign": "warn",
|
|
62
|
-
"operator-assignment": "warn",
|
|
63
|
-
"prefer-destructuring": "warn",
|
|
64
|
-
"prefer-exponentiation-operator": "warn",
|
|
65
|
-
"prefer-object-spread": "warn",
|
|
66
|
-
"prefer-rest-params": "warn",
|
|
67
|
-
"prefer-spread": "warn",
|
|
68
|
-
"prefer-template": "warn",
|
|
69
|
-
"no-const-assign": "error",
|
|
70
|
-
"no-dupe-keys": "error",
|
|
4
|
+
"no-unused-vars": "warn",
|
|
71
5
|
"no-import-assign": "error",
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"typescript/no-explicit-any": "warn",
|
|
75
|
-
"typescript/no-unused-vars": "error",
|
|
76
|
-
"typescript/no-floating-promises": "error",
|
|
77
|
-
"typescript/await-thenable": "error",
|
|
78
|
-
"typescript/no-misused-promises": "error",
|
|
79
|
-
"typescript/require-await": "warn",
|
|
80
|
-
"typescript/ban-types": "warn",
|
|
81
|
-
"typescript/no-array-delete": "error",
|
|
82
|
-
"typescript/no-duplicate-enum-values": "error",
|
|
83
|
-
"typescript/no-empty-interface": "warn",
|
|
84
|
-
"typescript/no-extraneous-class": "warn",
|
|
85
|
-
"typescript/no-for-in-array": "error",
|
|
86
|
-
"typescript/no-implied-eval": "error",
|
|
87
|
-
"typescript/no-misused-new": "error",
|
|
88
|
-
"typescript/no-namespace": "warn",
|
|
89
|
-
"typescript/no-non-null-assertion": "warn",
|
|
90
|
-
"typescript/no-this-alias": "warn",
|
|
91
|
-
"typescript/no-unnecessary-type-assertion": "warn",
|
|
92
|
-
"typescript/no-unnecessary-type-constraint": "warn",
|
|
93
|
-
"typescript/no-unsafe-argument": "warn",
|
|
94
|
-
"typescript/no-unsafe-assignment": "warn",
|
|
95
|
-
"typescript/no-unsafe-call": "warn",
|
|
96
|
-
"typescript/no-unsafe-member-access": "warn",
|
|
97
|
-
"typescript/no-unsafe-return": "warn",
|
|
98
|
-
"typescript/prefer-as-const": "warn",
|
|
99
|
-
"typescript/prefer-for-of": "warn",
|
|
100
|
-
"typescript/prefer-function-type": "warn",
|
|
101
|
-
"typescript/prefer-includes": "warn",
|
|
102
|
-
"typescript/prefer-nullish-coalescing": "warn",
|
|
103
|
-
"typescript/prefer-optional-chain": "warn",
|
|
104
|
-
"typescript/prefer-ts-expect-error": "warn",
|
|
105
|
-
"typescript/no-var-requires": "off",
|
|
106
|
-
"typescript/consistent-type-imports": "warn",
|
|
107
|
-
"typescript/no-import-type-side-effects": "error",
|
|
108
|
-
"typescript/adjacent-overload-signatures": "warn",
|
|
109
|
-
"typescript/array-type": "warn",
|
|
110
|
-
"typescript/consistent-type-definitions": "warn",
|
|
111
|
-
"typescript/no-base-to-string": "warn",
|
|
112
|
-
"typescript/no-confusing-non-null-assertion": "warn",
|
|
113
|
-
"typescript/no-duplicate-type-constituents": "warn",
|
|
114
|
-
"typescript/no-extra-non-null-assertion": "error",
|
|
115
|
-
"typescript/no-unnecessary-boolean-literal-compare": "warn",
|
|
116
|
-
"typescript/prefer-literal-enum-member": "warn",
|
|
117
|
-
"typescript/prefer-namespace-keyword": "warn",
|
|
118
|
-
"typescript/prefer-return-this-type": "warn",
|
|
119
|
-
"typescript/consistent-type-assertions": ["error", { "assertionStyle": "as" }],
|
|
120
|
-
|
|
121
|
-
// Unicorn rules (migrated from .eslintrc.json)
|
|
122
|
-
"unicorn/prefer-node-protocol": "error",
|
|
123
|
-
"unicorn/prefer-array-some": "error",
|
|
124
|
-
"unicorn/prefer-array-find": "error",
|
|
125
|
-
"unicorn/prefer-includes": "error",
|
|
126
|
-
"unicorn/prefer-string-starts-ends-with": "error",
|
|
127
|
-
"unicorn/throw-new-error": "error",
|
|
128
|
-
"unicorn/error-message": "error",
|
|
129
|
-
"unicorn/no-instanceof-array": "error",
|
|
130
|
-
"unicorn/prefer-default-parameters": "warn",
|
|
131
|
-
"unicorn/prefer-optional-catch-binding": "error",
|
|
132
|
-
"unicorn/no-thenable": "error",
|
|
133
|
-
"unicorn/prefer-spread": "warn",
|
|
134
|
-
"unicorn/prefer-ternary": "warn",
|
|
135
|
-
"unicorn/consistent-function-scoping": "warn",
|
|
136
|
-
"unicorn/no-useless-undefined": "warn",
|
|
137
|
-
"unicorn/no-nested-ternary": "warn",
|
|
138
|
-
"unicorn/prefer-at": "warn",
|
|
139
|
-
"unicorn/prefer-array-flat-map": "warn",
|
|
140
|
-
"unicorn/prefer-array-index-of": "warn",
|
|
141
|
-
"unicorn/prefer-set-has": "warn",
|
|
142
|
-
"unicorn/prefer-string-slice": "warn",
|
|
143
|
-
"unicorn/prefer-string-replace-all": "warn",
|
|
144
|
-
"unicorn/prefer-string-trim-start-end": "warn",
|
|
145
|
-
"unicorn/prefer-math-min-max": "warn",
|
|
146
|
-
"unicorn/prefer-number-properties": "warn",
|
|
147
|
-
"unicorn/prefer-object-from-entries": "warn",
|
|
148
|
-
"unicorn/number-literal-case": "warn",
|
|
149
|
-
"unicorn/no-lonely-if": "warn",
|
|
150
|
-
"unicorn/no-useless-spread": "warn",
|
|
6
|
+
"no-debugger": "error",
|
|
7
|
+
"unicorn/no-thenable": "warn",
|
|
151
8
|
"unicorn/no-useless-fallback-in-spread": "warn",
|
|
152
|
-
"unicorn/no-
|
|
153
|
-
"unicorn/no-useless-promise-resolve-reject": "warn",
|
|
154
|
-
"unicorn/prefer-modern-math-apis": "warn",
|
|
155
|
-
"unicorn/prefer-native-coercion-functions": "warn",
|
|
156
|
-
"unicorn/prefer-add-event-listener": "warn",
|
|
157
|
-
"unicorn/prefer-dom-node-append": "warn",
|
|
158
|
-
"unicorn/prefer-dom-node-remove": "warn",
|
|
159
|
-
"unicorn/prefer-dom-node-text-content": "warn",
|
|
160
|
-
"unicorn/prefer-query-selector": "warn",
|
|
161
|
-
"unicorn/prefer-reflect-apply": "warn",
|
|
162
|
-
"unicorn/prefer-regexp-test": "warn",
|
|
163
|
-
"unicorn/prefer-prototype-methods": "warn",
|
|
164
|
-
"unicorn/prefer-code-point": "warn",
|
|
165
|
-
"unicorn/prefer-date-now": "warn",
|
|
166
|
-
"unicorn/prefer-array-flat": "warn",
|
|
167
|
-
"unicorn/escape-case": "warn",
|
|
168
|
-
"unicorn/new-for-builtins": "error",
|
|
169
|
-
"unicorn/no-console-spaces": "warn",
|
|
170
|
-
"unicorn/no-hex-escape": "warn",
|
|
171
|
-
"unicorn/no-instanceof-builtins": "error",
|
|
172
|
-
"unicorn/no-new-array": "warn",
|
|
173
|
-
"unicorn/no-new-buffer": "error",
|
|
174
|
-
"unicorn/no-typeof-undefined": "warn",
|
|
175
|
-
"unicorn/no-unreadable-array-destructuring": "warn",
|
|
176
|
-
"unicorn/no-unreadable-iife": "warn",
|
|
177
|
-
"unicorn/consistent-empty-array-spread": "warn",
|
|
178
|
-
"unicorn/prefer-structured-clone": "warn",
|
|
179
|
-
"unicorn/prefer-type-error": "warn",
|
|
180
|
-
"unicorn/relative-url-style": "warn",
|
|
181
|
-
"unicorn/require-array-join-separator": "warn",
|
|
182
|
-
"unicorn/require-number-to-fixed-digits-argument": "warn",
|
|
183
|
-
|
|
184
|
-
// Import rules
|
|
185
|
-
"import/no-duplicates": "error",
|
|
186
|
-
"import/no-self-import": "error",
|
|
187
|
-
"import/no-cycle": "warn",
|
|
188
|
-
"import/named": "error",
|
|
189
|
-
"import/namespace": "error",
|
|
190
|
-
"import/default": "error",
|
|
191
|
-
"import/no-named-as-default": "warn",
|
|
192
|
-
"import/no-named-as-default-member": "warn",
|
|
193
|
-
|
|
194
|
-
// Jest rules
|
|
195
|
-
"jest/expect-expect": "warn",
|
|
196
|
-
"jest/no-alias-methods": "warn",
|
|
197
|
-
"jest/no-commented-out-tests": "warn",
|
|
198
|
-
"jest/no-conditional-expect": "error",
|
|
199
|
-
"jest/no-disabled-tests": "warn",
|
|
200
|
-
"jest/no-focused-tests": "error",
|
|
201
|
-
"jest/no-identical-title": "error",
|
|
202
|
-
"jest/no-jasmine-globals": "error",
|
|
203
|
-
"jest/no-mocks-import": "error",
|
|
204
|
-
"jest/no-standalone-expect": "error",
|
|
205
|
-
"jest/no-test-prefixes": "warn",
|
|
206
|
-
"jest/valid-describe-callback": "error",
|
|
207
|
-
"jest/valid-expect": "error",
|
|
208
|
-
"jest/valid-title": "warn",
|
|
209
|
-
"jest/prefer-hooks-on-top": "warn",
|
|
210
|
-
"jest/prefer-spy-on": "warn",
|
|
211
|
-
"jest/prefer-todo": "warn",
|
|
212
|
-
|
|
213
|
-
// OXC custom rules
|
|
214
|
-
"oxc/approx-constant": "warn",
|
|
215
|
-
"oxc/bad-array-method-on-arguments": "error",
|
|
216
|
-
"oxc/bad-bitwise-operator": "error",
|
|
217
|
-
"oxc/bad-char-at-comparison": "error",
|
|
218
|
-
"oxc/bad-comparison-sequence": "error",
|
|
219
|
-
"oxc/bad-min-max-func": "error",
|
|
220
|
-
"oxc/bad-object-literal-comparison": "error",
|
|
221
|
-
"oxc/bad-replace-all-arg": "error",
|
|
222
|
-
"oxc/const-comparisons": "error",
|
|
223
|
-
"oxc/double-comparisons": "error",
|
|
224
|
-
"oxc/erasing-op": "warn",
|
|
225
|
-
"oxc/misrefactored-assign-op": "error",
|
|
226
|
-
"oxc/missing-throw": "error",
|
|
227
|
-
"oxc/no-accumulating-spread": "warn",
|
|
228
|
-
"oxc/number-arg-out-of-range": "error",
|
|
229
|
-
"oxc/only-used-in-recursion": "warn",
|
|
230
|
-
"oxc/uninvoked-array-callback": "error"
|
|
9
|
+
"unicorn/no-single-promise-in-promise-methods": "warn"
|
|
231
10
|
},
|
|
232
|
-
"overrides": [
|
|
233
|
-
{
|
|
234
|
-
"files": ["**/validations/**/*.ts", "**/*validation*.ts"],
|
|
235
|
-
"rules": {
|
|
236
|
-
"unicorn/no-thenable": "off"
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"files": ["bin/*.cjs"],
|
|
241
|
-
"rules": {
|
|
242
|
-
"no-console": "off"
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
],
|
|
246
11
|
"ignorePatterns": [
|
|
247
12
|
"dist",
|
|
248
13
|
"build",
|
|
249
14
|
"node_modules",
|
|
250
15
|
"coverage",
|
|
251
16
|
"*.config.js",
|
|
252
|
-
"
|
|
253
|
-
"**/mock.ts"
|
|
17
|
+
"migrations"
|
|
254
18
|
]
|
|
255
19
|
}
|
package/.prettierignore
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Build output
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
|
|
8
|
+
# Coverage
|
|
9
|
+
coverage/
|
|
10
|
+
|
|
11
|
+
# Logs
|
|
12
|
+
*.log
|
|
13
|
+
npm-debug.log*
|
|
14
|
+
|
|
15
|
+
# Environment files
|
|
16
|
+
.env
|
|
17
|
+
.env.*
|
|
18
|
+
|
|
19
|
+
# Generated files
|
|
20
|
+
migrations/
|
|
21
|
+
*.generated.*
|
|
22
|
+
|
|
23
|
+
# Test snapshots
|
|
24
|
+
*.snap
|
|
25
|
+
|
|
26
|
+
# Config files that shouldn't be formatted
|
|
27
|
+
package-lock.json
|
|
28
|
+
tsconfig*.json
|