@andrewt03/eslint-typescript-rules 0.0.21 → 0.0.22
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 +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +38 -1
- package/dist/index.mjs +37 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -35,8 +35,14 @@ declare const SORT_IMPORT_ESLINT_CONFIG_RULES: ConfigRules;
|
|
|
35
35
|
*/
|
|
36
36
|
declare const ANGULAR_ESLINT_CONFIG_RULES: ConfigRules;
|
|
37
37
|
/**
|
|
38
|
-
* @tutorial [React-ESLint-Reference](https://
|
|
38
|
+
* @tutorial [React-ESLint-Reference](https://www.npmjs.com/package/eslint-plugin-react)
|
|
39
39
|
*/
|
|
40
40
|
declare const REACT_ESLINT_CONFIG_RULES: ConfigRules;
|
|
41
|
+
/**
|
|
42
|
+
* @tutorial [React-Hooks-ESLint-Reference](https://www.npmjs.com/package/eslint-plugin-react-hooks)
|
|
43
|
+
*/
|
|
44
|
+
declare const REACT_HOOKS_ESLINT_CONFIG_RULES: {
|
|
45
|
+
"react-hooks/rules-of-hooks": string;
|
|
46
|
+
};
|
|
41
47
|
|
|
42
|
-
export { ANGULAR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES, type ConfigRules, REACT_ESLINT_CONFIG_RULES, SORT_IMPORT_ESLINT_CONFIG_RULES, STANDARD_ESLINT_CONFIG_RULES, TYPESCRIPT_ESLINT_CONFIG_RULES, UNICORN_ESLINT_CONFIG_RULES };
|
|
48
|
+
export { ANGULAR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES, type ConfigRules, REACT_ESLINT_CONFIG_RULES, REACT_HOOKS_ESLINT_CONFIG_RULES, SORT_IMPORT_ESLINT_CONFIG_RULES, STANDARD_ESLINT_CONFIG_RULES, TYPESCRIPT_ESLINT_CONFIG_RULES, UNICORN_ESLINT_CONFIG_RULES };
|
package/dist/index.d.ts
CHANGED
|
@@ -35,8 +35,14 @@ declare const SORT_IMPORT_ESLINT_CONFIG_RULES: ConfigRules;
|
|
|
35
35
|
*/
|
|
36
36
|
declare const ANGULAR_ESLINT_CONFIG_RULES: ConfigRules;
|
|
37
37
|
/**
|
|
38
|
-
* @tutorial [React-ESLint-Reference](https://
|
|
38
|
+
* @tutorial [React-ESLint-Reference](https://www.npmjs.com/package/eslint-plugin-react)
|
|
39
39
|
*/
|
|
40
40
|
declare const REACT_ESLINT_CONFIG_RULES: ConfigRules;
|
|
41
|
+
/**
|
|
42
|
+
* @tutorial [React-Hooks-ESLint-Reference](https://www.npmjs.com/package/eslint-plugin-react-hooks)
|
|
43
|
+
*/
|
|
44
|
+
declare const REACT_HOOKS_ESLINT_CONFIG_RULES: {
|
|
45
|
+
"react-hooks/rules-of-hooks": string;
|
|
46
|
+
};
|
|
41
47
|
|
|
42
|
-
export { ANGULAR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES, type ConfigRules, REACT_ESLINT_CONFIG_RULES, SORT_IMPORT_ESLINT_CONFIG_RULES, STANDARD_ESLINT_CONFIG_RULES, TYPESCRIPT_ESLINT_CONFIG_RULES, UNICORN_ESLINT_CONFIG_RULES };
|
|
48
|
+
export { ANGULAR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES, CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES, type ConfigRules, REACT_ESLINT_CONFIG_RULES, REACT_HOOKS_ESLINT_CONFIG_RULES, SORT_IMPORT_ESLINT_CONFIG_RULES, STANDARD_ESLINT_CONFIG_RULES, TYPESCRIPT_ESLINT_CONFIG_RULES, UNICORN_ESLINT_CONFIG_RULES };
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES: () => CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES,
|
|
25
25
|
CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES: () => CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES,
|
|
26
26
|
REACT_ESLINT_CONFIG_RULES: () => REACT_ESLINT_CONFIG_RULES,
|
|
27
|
+
REACT_HOOKS_ESLINT_CONFIG_RULES: () => REACT_HOOKS_ESLINT_CONFIG_RULES,
|
|
27
28
|
SORT_IMPORT_ESLINT_CONFIG_RULES: () => SORT_IMPORT_ESLINT_CONFIG_RULES,
|
|
28
29
|
STANDARD_ESLINT_CONFIG_RULES: () => STANDARD_ESLINT_CONFIG_RULES,
|
|
29
30
|
TYPESCRIPT_ESLINT_CONFIG_RULES: () => TYPESCRIPT_ESLINT_CONFIG_RULES,
|
|
@@ -337,7 +338,42 @@ var ANGULAR_ESLINT_CONFIG_RULES = {
|
|
|
337
338
|
"@angular-eslint/use-pipe-transform-interface": "error"
|
|
338
339
|
};
|
|
339
340
|
var REACT_ESLINT_CONFIG_RULES = {
|
|
340
|
-
"react/hook-use-state": "error"
|
|
341
|
+
"react/hook-use-state": "error",
|
|
342
|
+
"react/destructuring-assignment": "error",
|
|
343
|
+
"react/no-danger": "error",
|
|
344
|
+
"react/no-danger-with-children": "error",
|
|
345
|
+
"react/no-deprecated": "error",
|
|
346
|
+
"react/no-multi-comp": "error",
|
|
347
|
+
"react/no-unused-prop-types": "warn",
|
|
348
|
+
"react/prop-types": "off",
|
|
349
|
+
"react/react-in-jsx-scope": "off",
|
|
350
|
+
"react/boolean-prop-naming": "error",
|
|
351
|
+
"react/no-array-index-key": "error",
|
|
352
|
+
"react/no-direct-mutation-state": "error",
|
|
353
|
+
"react/no-typos": "error",
|
|
354
|
+
"react/jsx-no-target-blank": "error",
|
|
355
|
+
"react/jsx-pascal-case": "error",
|
|
356
|
+
"react/no-access-state-in-setstate": "error",
|
|
357
|
+
"react/jsx-boolean-value": ["error", "always"],
|
|
358
|
+
"react/jsx-no-comment-textnodes": "error",
|
|
359
|
+
"react/jsx-no-duplicate-props": "error",
|
|
360
|
+
"react/jsx-fragments": "error",
|
|
361
|
+
"react/jsx-curly-brace-presence": [
|
|
362
|
+
"error",
|
|
363
|
+
{
|
|
364
|
+
props: "never",
|
|
365
|
+
children: "never",
|
|
366
|
+
propElementValues: "always"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"react/jsx-uses-vars": "error",
|
|
370
|
+
"react/no-unused-state": "error",
|
|
371
|
+
"react/prefer-read-only-props": "error",
|
|
372
|
+
"react/self-closing-comp": "error",
|
|
373
|
+
"react/void-dom-elements-no-children": "error"
|
|
374
|
+
};
|
|
375
|
+
var REACT_HOOKS_ESLINT_CONFIG_RULES = {
|
|
376
|
+
"react-hooks/rules-of-hooks": "error"
|
|
341
377
|
};
|
|
342
378
|
// Annotate the CommonJS export names for ESM import in node:
|
|
343
379
|
0 && (module.exports = {
|
|
@@ -345,6 +381,7 @@ var REACT_ESLINT_CONFIG_RULES = {
|
|
|
345
381
|
CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES,
|
|
346
382
|
CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES,
|
|
347
383
|
REACT_ESLINT_CONFIG_RULES,
|
|
384
|
+
REACT_HOOKS_ESLINT_CONFIG_RULES,
|
|
348
385
|
SORT_IMPORT_ESLINT_CONFIG_RULES,
|
|
349
386
|
STANDARD_ESLINT_CONFIG_RULES,
|
|
350
387
|
TYPESCRIPT_ESLINT_CONFIG_RULES,
|
package/dist/index.mjs
CHANGED
|
@@ -304,13 +304,49 @@ var ANGULAR_ESLINT_CONFIG_RULES = {
|
|
|
304
304
|
"@angular-eslint/use-pipe-transform-interface": "error"
|
|
305
305
|
};
|
|
306
306
|
var REACT_ESLINT_CONFIG_RULES = {
|
|
307
|
-
"react/hook-use-state": "error"
|
|
307
|
+
"react/hook-use-state": "error",
|
|
308
|
+
"react/destructuring-assignment": "error",
|
|
309
|
+
"react/no-danger": "error",
|
|
310
|
+
"react/no-danger-with-children": "error",
|
|
311
|
+
"react/no-deprecated": "error",
|
|
312
|
+
"react/no-multi-comp": "error",
|
|
313
|
+
"react/no-unused-prop-types": "warn",
|
|
314
|
+
"react/prop-types": "off",
|
|
315
|
+
"react/react-in-jsx-scope": "off",
|
|
316
|
+
"react/boolean-prop-naming": "error",
|
|
317
|
+
"react/no-array-index-key": "error",
|
|
318
|
+
"react/no-direct-mutation-state": "error",
|
|
319
|
+
"react/no-typos": "error",
|
|
320
|
+
"react/jsx-no-target-blank": "error",
|
|
321
|
+
"react/jsx-pascal-case": "error",
|
|
322
|
+
"react/no-access-state-in-setstate": "error",
|
|
323
|
+
"react/jsx-boolean-value": ["error", "always"],
|
|
324
|
+
"react/jsx-no-comment-textnodes": "error",
|
|
325
|
+
"react/jsx-no-duplicate-props": "error",
|
|
326
|
+
"react/jsx-fragments": "error",
|
|
327
|
+
"react/jsx-curly-brace-presence": [
|
|
328
|
+
"error",
|
|
329
|
+
{
|
|
330
|
+
props: "never",
|
|
331
|
+
children: "never",
|
|
332
|
+
propElementValues: "always"
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
"react/jsx-uses-vars": "error",
|
|
336
|
+
"react/no-unused-state": "error",
|
|
337
|
+
"react/prefer-read-only-props": "error",
|
|
338
|
+
"react/self-closing-comp": "error",
|
|
339
|
+
"react/void-dom-elements-no-children": "error"
|
|
340
|
+
};
|
|
341
|
+
var REACT_HOOKS_ESLINT_CONFIG_RULES = {
|
|
342
|
+
"react-hooks/rules-of-hooks": "error"
|
|
308
343
|
};
|
|
309
344
|
export {
|
|
310
345
|
ANGULAR_ESLINT_CONFIG_RULES,
|
|
311
346
|
CONSOLE_DEBUGGER_ERROR_ESLINT_CONFIG_RULES,
|
|
312
347
|
CONSOLE_DEBUGGER_WARN_ESLINT_CONFIG_RULES,
|
|
313
348
|
REACT_ESLINT_CONFIG_RULES,
|
|
349
|
+
REACT_HOOKS_ESLINT_CONFIG_RULES,
|
|
314
350
|
SORT_IMPORT_ESLINT_CONFIG_RULES,
|
|
315
351
|
STANDARD_ESLINT_CONFIG_RULES,
|
|
316
352
|
TYPESCRIPT_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.22",
|
|
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",
|