@andrewt03/eslint-typescript-rules 0.0.18 → 0.0.19
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/dist/index.d.mts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +63 -7
- package/dist/index.mjs +59 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -22,6 +22,15 @@ declare const TYPESCRIPT_ESLINT_CONFIG_RULES: ConfigRules;
|
|
|
22
22
|
* @tutorial [Unicorn-Reference](https://github.com/sindresorhus/eslint-plugin-unicorn/tree/main?tab=readme-ov-file)
|
|
23
23
|
*/
|
|
24
24
|
declare const UNICORN_ESLINT_CONFIG_RULES: ConfigRules;
|
|
25
|
-
declare const
|
|
25
|
+
declare const CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES: ConfigRules;
|
|
26
|
+
declare const CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES: ConfigRules;
|
|
27
|
+
/**
|
|
28
|
+
* @tutorial [Angular-ESLint-Reference](https://www.npmjs.com/package/@angular-eslint/eslint-plugin)
|
|
29
|
+
*/
|
|
30
|
+
declare const ANGULAR_ESLINT_CONFIG_RULES: ConfigRules;
|
|
31
|
+
/**
|
|
32
|
+
* @tutorial [React-ESLint-Reference](https://google.com)
|
|
33
|
+
*/
|
|
34
|
+
declare const REACT_ESLINT_CONFIG_RULES: ConfigRules;
|
|
26
35
|
|
|
27
|
-
export { type ConfigRules,
|
|
36
|
+
export { ANGULAR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES, type ConfigRules, REACT_ESLINT_CONFIG_RULES, STANDARD_ESLINT_CONFIG_RULES, TYPESCRIPT_ESLINT_CONFIG_RULES, UNICORN_ESLINT_CONFIG_RULES };
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,15 @@ declare const TYPESCRIPT_ESLINT_CONFIG_RULES: ConfigRules;
|
|
|
22
22
|
* @tutorial [Unicorn-Reference](https://github.com/sindresorhus/eslint-plugin-unicorn/tree/main?tab=readme-ov-file)
|
|
23
23
|
*/
|
|
24
24
|
declare const UNICORN_ESLINT_CONFIG_RULES: ConfigRules;
|
|
25
|
-
declare const
|
|
25
|
+
declare const CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES: ConfigRules;
|
|
26
|
+
declare const CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES: ConfigRules;
|
|
27
|
+
/**
|
|
28
|
+
* @tutorial [Angular-ESLint-Reference](https://www.npmjs.com/package/@angular-eslint/eslint-plugin)
|
|
29
|
+
*/
|
|
30
|
+
declare const ANGULAR_ESLINT_CONFIG_RULES: ConfigRules;
|
|
31
|
+
/**
|
|
32
|
+
* @tutorial [React-ESLint-Reference](https://google.com)
|
|
33
|
+
*/
|
|
34
|
+
declare const REACT_ESLINT_CONFIG_RULES: ConfigRules;
|
|
26
35
|
|
|
27
|
-
export { type ConfigRules,
|
|
36
|
+
export { ANGULAR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES, type ConfigRules, REACT_ESLINT_CONFIG_RULES, STANDARD_ESLINT_CONFIG_RULES, TYPESCRIPT_ESLINT_CONFIG_RULES, UNICORN_ESLINT_CONFIG_RULES };
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
|
|
23
|
+
ANGULAR_ESLINT_CONFIG_RULES: () => ANGULAR_ESLINT_CONFIG_RULES,
|
|
24
|
+
CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES: () => CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES,
|
|
25
|
+
CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES: () => CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES,
|
|
26
|
+
REACT_ESLINT_CONFIG_RULES: () => REACT_ESLINT_CONFIG_RULES,
|
|
24
27
|
STANDARD_ESLINT_CONFIG_RULES: () => STANDARD_ESLINT_CONFIG_RULES,
|
|
25
28
|
TYPESCRIPT_ESLINT_CONFIG_RULES: () => TYPESCRIPT_ESLINT_CONFIG_RULES,
|
|
26
29
|
UNICORN_ESLINT_CONFIG_RULES: () => UNICORN_ESLINT_CONFIG_RULES
|
|
@@ -30,10 +33,6 @@ module.exports = __toCommonJS(index_exports);
|
|
|
30
33
|
// src/eslint-rules/eslint.rules.ts
|
|
31
34
|
var STANDARD_ESLINT_CONFIG_RULES = {
|
|
32
35
|
semi: "error",
|
|
33
|
-
"no-console": "warn",
|
|
34
|
-
// FE - Warn, BE - Error
|
|
35
|
-
"no-debugger": "warn",
|
|
36
|
-
// FE - Warn, BE - Error
|
|
37
36
|
"no-var": "error",
|
|
38
37
|
"no-void": "error",
|
|
39
38
|
"prefer-const": "error",
|
|
@@ -254,13 +253,70 @@ var UNICORN_ESLINT_CONFIG_RULES = {
|
|
|
254
253
|
"unicorn/empty-brace-spaces": "error",
|
|
255
254
|
"unicorn/require-number-to-fixed-digits-argument": "error"
|
|
256
255
|
};
|
|
257
|
-
var
|
|
256
|
+
var CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES = {
|
|
258
257
|
"no-console": "error",
|
|
259
258
|
"no-debugger": "error"
|
|
260
259
|
};
|
|
260
|
+
var CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES = {
|
|
261
|
+
"no-console": "error",
|
|
262
|
+
"no-debugger": "error"
|
|
263
|
+
};
|
|
264
|
+
var ANGULAR_ESLINT_CONFIG_RULES = {
|
|
265
|
+
"@angular-eslint/contextual-lifecycle": "error",
|
|
266
|
+
"@angular-eslint/no-async-lifecycle-method": "error",
|
|
267
|
+
"@angular-eslint/no-attribute-decorator": "error",
|
|
268
|
+
"@angular-eslint/sort-lifecycle-methods": "error",
|
|
269
|
+
"@angular-eslint/component-class-suffix": [
|
|
270
|
+
"error",
|
|
271
|
+
{
|
|
272
|
+
suffixes: ["Component"]
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"@angular-eslint/component-selector": [
|
|
276
|
+
"warn",
|
|
277
|
+
{
|
|
278
|
+
type: "element",
|
|
279
|
+
prefix: "app",
|
|
280
|
+
style: "kebab-case"
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"@angular-eslint/directive-class-suffix": [
|
|
284
|
+
"error",
|
|
285
|
+
{
|
|
286
|
+
suffixes: ["Directive"]
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
"@angular-eslint/directive-selector": [
|
|
290
|
+
"warn",
|
|
291
|
+
{
|
|
292
|
+
type: "attribute",
|
|
293
|
+
prefix: "app",
|
|
294
|
+
style: "camelCase"
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
"@angular-eslint/consistent-component-styles": "error",
|
|
298
|
+
"@angular-eslint/no-conflicting-lifecycle": "error",
|
|
299
|
+
"@angular-eslint/no-duplicates-in-metadata-arrays": "error",
|
|
300
|
+
"@angular-eslint/no-empty-lifecycle-method": "error",
|
|
301
|
+
"@angular-eslint/no-input-rename": "error",
|
|
302
|
+
"@angular-eslint/no-inputs-metadata-property": "error",
|
|
303
|
+
"@angular-eslint/no-lifecycle-call": "error",
|
|
304
|
+
"@angular-eslint/no-output-rename": "error",
|
|
305
|
+
"@angular-eslint/no-pipe-impure": "error",
|
|
306
|
+
"@angular-eslint/prefer-output-readonly": "error",
|
|
307
|
+
"@angular-eslint/prefer-standalone": "error",
|
|
308
|
+
"@angular-eslint/use-component-selector": "error",
|
|
309
|
+
"@angular-eslint/use-lifecycle-interface": "error",
|
|
310
|
+
"@angular-eslint/relative-url-prefix": "error",
|
|
311
|
+
"@angular-eslint/use-pipe-transform-interface": "error"
|
|
312
|
+
};
|
|
313
|
+
var REACT_ESLINT_CONFIG_RULES = {};
|
|
261
314
|
// Annotate the CommonJS export names for ESM import in node:
|
|
262
315
|
0 && (module.exports = {
|
|
263
|
-
|
|
316
|
+
ANGULAR_ESLINT_CONFIG_RULES,
|
|
317
|
+
CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES,
|
|
318
|
+
CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES,
|
|
319
|
+
REACT_ESLINT_CONFIG_RULES,
|
|
264
320
|
STANDARD_ESLINT_CONFIG_RULES,
|
|
265
321
|
TYPESCRIPT_ESLINT_CONFIG_RULES,
|
|
266
322
|
UNICORN_ESLINT_CONFIG_RULES
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
// src/eslint-rules/eslint.rules.ts
|
|
2
2
|
var STANDARD_ESLINT_CONFIG_RULES = {
|
|
3
3
|
semi: "error",
|
|
4
|
-
"no-console": "warn",
|
|
5
|
-
// FE - Warn, BE - Error
|
|
6
|
-
"no-debugger": "warn",
|
|
7
|
-
// FE - Warn, BE - Error
|
|
8
4
|
"no-var": "error",
|
|
9
5
|
"no-void": "error",
|
|
10
6
|
"prefer-const": "error",
|
|
@@ -225,12 +221,69 @@ var UNICORN_ESLINT_CONFIG_RULES = {
|
|
|
225
221
|
"unicorn/empty-brace-spaces": "error",
|
|
226
222
|
"unicorn/require-number-to-fixed-digits-argument": "error"
|
|
227
223
|
};
|
|
228
|
-
var
|
|
224
|
+
var CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES = {
|
|
229
225
|
"no-console": "error",
|
|
230
226
|
"no-debugger": "error"
|
|
231
227
|
};
|
|
228
|
+
var CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES = {
|
|
229
|
+
"no-console": "error",
|
|
230
|
+
"no-debugger": "error"
|
|
231
|
+
};
|
|
232
|
+
var ANGULAR_ESLINT_CONFIG_RULES = {
|
|
233
|
+
"@angular-eslint/contextual-lifecycle": "error",
|
|
234
|
+
"@angular-eslint/no-async-lifecycle-method": "error",
|
|
235
|
+
"@angular-eslint/no-attribute-decorator": "error",
|
|
236
|
+
"@angular-eslint/sort-lifecycle-methods": "error",
|
|
237
|
+
"@angular-eslint/component-class-suffix": [
|
|
238
|
+
"error",
|
|
239
|
+
{
|
|
240
|
+
suffixes: ["Component"]
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"@angular-eslint/component-selector": [
|
|
244
|
+
"warn",
|
|
245
|
+
{
|
|
246
|
+
type: "element",
|
|
247
|
+
prefix: "app",
|
|
248
|
+
style: "kebab-case"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"@angular-eslint/directive-class-suffix": [
|
|
252
|
+
"error",
|
|
253
|
+
{
|
|
254
|
+
suffixes: ["Directive"]
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"@angular-eslint/directive-selector": [
|
|
258
|
+
"warn",
|
|
259
|
+
{
|
|
260
|
+
type: "attribute",
|
|
261
|
+
prefix: "app",
|
|
262
|
+
style: "camelCase"
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"@angular-eslint/consistent-component-styles": "error",
|
|
266
|
+
"@angular-eslint/no-conflicting-lifecycle": "error",
|
|
267
|
+
"@angular-eslint/no-duplicates-in-metadata-arrays": "error",
|
|
268
|
+
"@angular-eslint/no-empty-lifecycle-method": "error",
|
|
269
|
+
"@angular-eslint/no-input-rename": "error",
|
|
270
|
+
"@angular-eslint/no-inputs-metadata-property": "error",
|
|
271
|
+
"@angular-eslint/no-lifecycle-call": "error",
|
|
272
|
+
"@angular-eslint/no-output-rename": "error",
|
|
273
|
+
"@angular-eslint/no-pipe-impure": "error",
|
|
274
|
+
"@angular-eslint/prefer-output-readonly": "error",
|
|
275
|
+
"@angular-eslint/prefer-standalone": "error",
|
|
276
|
+
"@angular-eslint/use-component-selector": "error",
|
|
277
|
+
"@angular-eslint/use-lifecycle-interface": "error",
|
|
278
|
+
"@angular-eslint/relative-url-prefix": "error",
|
|
279
|
+
"@angular-eslint/use-pipe-transform-interface": "error"
|
|
280
|
+
};
|
|
281
|
+
var REACT_ESLINT_CONFIG_RULES = {};
|
|
232
282
|
export {
|
|
233
|
-
|
|
283
|
+
ANGULAR_ESLINT_CONFIG_RULES,
|
|
284
|
+
CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES,
|
|
285
|
+
CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES,
|
|
286
|
+
REACT_ESLINT_CONFIG_RULES,
|
|
234
287
|
STANDARD_ESLINT_CONFIG_RULES,
|
|
235
288
|
TYPESCRIPT_ESLINT_CONFIG_RULES,
|
|
236
289
|
UNICORN_ESLINT_CONFIG_RULES
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrewt03/eslint-typescript-rules",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "Recommended ESLint Rules for general TypeScript, Node.js/Express.js, Angular, and React.js Projects",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|