eslint-config-heck 0.1.2 → 1.1.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/node.js +23 -15
- package/package.json +11 -10
- package/readme.md +0 -4
package/node.js
CHANGED
|
@@ -390,14 +390,7 @@ const rules = {
|
|
|
390
390
|
],
|
|
391
391
|
"prefer-exponentiation-operator": "error",
|
|
392
392
|
"prefer-object-spread": "error",
|
|
393
|
-
"quote-props": [
|
|
394
|
-
"error",
|
|
395
|
-
"as-needed",
|
|
396
|
-
{
|
|
397
|
-
keywords: true,
|
|
398
|
-
numbers: true,
|
|
399
|
-
},
|
|
400
|
-
],
|
|
393
|
+
"quote-props": ["error", "as-needed"],
|
|
401
394
|
quotes: ["error", "double"],
|
|
402
395
|
semi: [
|
|
403
396
|
"error",
|
|
@@ -468,8 +461,14 @@ const rules = {
|
|
|
468
461
|
"prefer-destructuring": [
|
|
469
462
|
"error",
|
|
470
463
|
{
|
|
471
|
-
|
|
472
|
-
|
|
464
|
+
VariableDeclarator: {
|
|
465
|
+
array: false,
|
|
466
|
+
object: true,
|
|
467
|
+
},
|
|
468
|
+
AssignmentExpression: {
|
|
469
|
+
array: false,
|
|
470
|
+
object: false,
|
|
471
|
+
},
|
|
473
472
|
},
|
|
474
473
|
],
|
|
475
474
|
"prefer-numeric-literals": "error",
|
|
@@ -551,7 +550,7 @@ const rules = {
|
|
|
551
550
|
"error",
|
|
552
551
|
{
|
|
553
552
|
groups: {
|
|
554
|
-
|
|
553
|
+
render: ["render", "/^render.+$/"],
|
|
555
554
|
},
|
|
556
555
|
},
|
|
557
556
|
],
|
|
@@ -651,7 +650,7 @@ const rules = {
|
|
|
651
650
|
{
|
|
652
651
|
declaration: "parens-new-line",
|
|
653
652
|
assignment: "parens-new-line",
|
|
654
|
-
|
|
653
|
+
return: "parens-new-line",
|
|
655
654
|
arrow: "parens-new-line",
|
|
656
655
|
},
|
|
657
656
|
],
|
|
@@ -695,6 +694,7 @@ const rules = {
|
|
|
695
694
|
"unicorn/no-array-method-this-argument": "error",
|
|
696
695
|
"unicorn/no-array-push-push": "error",
|
|
697
696
|
"unicorn/no-array-reduce": "off",
|
|
697
|
+
"unicorn/no-await-expression-member": "error",
|
|
698
698
|
"unicorn/no-console-spaces": "error",
|
|
699
699
|
"unicorn/no-document-cookie": "error",
|
|
700
700
|
"unicorn/no-empty-file": "error",
|
|
@@ -733,6 +733,7 @@ const rules = {
|
|
|
733
733
|
"unicorn/prefer-array-index-of": "error",
|
|
734
734
|
"unicorn/prefer-array-some": "error",
|
|
735
735
|
"unicorn/prefer-at": "error",
|
|
736
|
+
"unicorn/prefer-code-point": "error",
|
|
736
737
|
"unicorn/prefer-date-now": "error",
|
|
737
738
|
"unicorn/prefer-default-parameters": "error",
|
|
738
739
|
"unicorn/prefer-dom-node-append": "error",
|
|
@@ -791,14 +792,14 @@ const overrides = [
|
|
|
791
792
|
...globals,
|
|
792
793
|
NodeJS: true,
|
|
793
794
|
},
|
|
794
|
-
plugins: [...plugins, "@typescript-eslint"
|
|
795
|
+
plugins: [...plugins, "@typescript-eslint", "typescript-heck",/* , "deprecation" */],
|
|
795
796
|
rules: {
|
|
796
797
|
// Typescript
|
|
797
798
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
798
799
|
"@typescript-eslint/array-type": [
|
|
799
800
|
"error",
|
|
800
801
|
{
|
|
801
|
-
|
|
802
|
+
default: "array",
|
|
802
803
|
},
|
|
803
804
|
],
|
|
804
805
|
"@typescript-eslint/await-thenable": "error",
|
|
@@ -893,7 +894,11 @@ const overrides = [
|
|
|
893
894
|
"@typescript-eslint/no-for-in-array": "error",
|
|
894
895
|
"@typescript-eslint/no-implicit-any-catch": "error",
|
|
895
896
|
"@typescript-eslint/no-inferrable-types": "error",
|
|
896
|
-
"@typescript-eslint/no-invalid-void-type":
|
|
897
|
+
"@typescript-eslint/no-invalid-void-type": [
|
|
898
|
+
"error", {
|
|
899
|
+
allowAsThisParameter: true,
|
|
900
|
+
},
|
|
901
|
+
],
|
|
897
902
|
"@typescript-eslint/no-meaningless-void-operator": "error",
|
|
898
903
|
"@typescript-eslint/no-misused-new": "error",
|
|
899
904
|
"@typescript-eslint/no-misused-promises": "error",
|
|
@@ -1127,6 +1132,9 @@ const overrides = [
|
|
|
1127
1132
|
"no-unexpected-multiline": "off",
|
|
1128
1133
|
"no-unsafe-negation": "off",
|
|
1129
1134
|
"valid-typeof": "off",
|
|
1135
|
+
|
|
1136
|
+
// typescript-heck
|
|
1137
|
+
"typescript-heck/array-type-spacing": ["error", "always", { betweenDimensions: "never" }],
|
|
1130
1138
|
},
|
|
1131
1139
|
},
|
|
1132
1140
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-heck",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,19 +15,20 @@
|
|
|
15
15
|
"author": "atheck",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
19
|
-
"@typescript-eslint/parser": "5.
|
|
20
|
-
"eslint": "8.
|
|
18
|
+
"@typescript-eslint/eslint-plugin": "5.5.0",
|
|
19
|
+
"@typescript-eslint/parser": "5.5.0",
|
|
20
|
+
"eslint": "8.3.0",
|
|
21
21
|
"eslint-plugin-deprecation": "1.2.1",
|
|
22
|
-
"eslint-plugin-jest": "25.
|
|
23
|
-
"eslint-plugin-react": "7.27.
|
|
24
|
-
"eslint-plugin-
|
|
22
|
+
"eslint-plugin-jest": "25.3.0",
|
|
23
|
+
"eslint-plugin-react": "7.27.1",
|
|
24
|
+
"eslint-plugin-typescript-heck": "1.2.0",
|
|
25
|
+
"eslint-plugin-unicorn": "39.0.0",
|
|
25
26
|
"react": "17.0.2",
|
|
26
27
|
"typescript": "4.5.2"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
|
-
"@types/jest": "27.0.
|
|
30
|
-
"@types/react": "17.0.
|
|
31
|
-
"jest": "27.
|
|
30
|
+
"@types/jest": "27.0.3",
|
|
31
|
+
"@types/react": "17.0.37",
|
|
32
|
+
"jest": "27.4.0"
|
|
32
33
|
}
|
|
33
34
|
}
|