@commission-on-post/eslint-config-recommended 1.0.1 → 1.0.2
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/config.js +147 -147
- package/package.json +9 -8
package/config.js
CHANGED
|
@@ -1,148 +1,148 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
languageOptions: {
|
|
3
|
-
parserOptions: {
|
|
4
|
-
projectService: true,
|
|
5
|
-
tsconfigRootDir: import.meta.dirname,
|
|
6
|
-
},
|
|
7
|
-
},
|
|
8
|
-
ignores: ["*/*.mjs"],
|
|
9
|
-
rules: {
|
|
10
|
-
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
11
|
-
"@typescript-eslint/consistent-generic-constructors": ["error", "type-annotation"],
|
|
12
|
-
"@typescript-eslint/explicit-function-return-type": "error",
|
|
13
|
-
"@typescript-eslint/explicit-module-boundary-types": "error",
|
|
14
|
-
|
|
15
|
-
"@typescript-eslint/naming-convention": ["warn", {
|
|
16
|
-
selector: ["classProperty", "objectLiteralProperty", "parameter", "variable"],
|
|
17
|
-
format: ["camelCase", "snake_case"],
|
|
18
|
-
leadingUnderscore: "allow",
|
|
19
|
-
}, {
|
|
20
|
-
selector: ["classMethod", "function", "typeMethod"],
|
|
21
|
-
format: ["camelCase"],
|
|
22
|
-
leadingUnderscore: "allow",
|
|
23
|
-
}, {
|
|
24
|
-
selector: ["interface", "class"],
|
|
25
|
-
format: ["PascalCase"],
|
|
26
|
-
}, {
|
|
27
|
-
selector: ["class"],
|
|
28
|
-
format: ["PascalCase", "camelCase"],
|
|
29
|
-
}],
|
|
30
|
-
|
|
31
|
-
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
32
|
-
"@typescript-eslint/no-confusing-void-expression": "error",
|
|
33
|
-
"@typescript-eslint/no-dynamic-delete": "error",
|
|
34
|
-
"no-empty-function": "off",
|
|
35
|
-
"@typescript-eslint/no-empty-function": "warn",
|
|
36
|
-
"@typescript-eslint/no-empty-interface": "error",
|
|
37
|
-
"@typescript-eslint/no-inferrable-types": "error",
|
|
38
|
-
"no-invalid-this": "off",
|
|
39
|
-
"@typescript-eslint/no-invalid-this": "error",
|
|
40
|
-
"@typescript-eslint/no-invalid-void-type": "error",
|
|
41
|
-
|
|
42
|
-
"@typescript-eslint/no-misused-promises": ["error", {
|
|
43
|
-
checksVoidReturn: false,
|
|
44
|
-
}],
|
|
45
|
-
|
|
46
|
-
"@typescript-eslint/no-mixed-enums": "error",
|
|
47
|
-
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
48
|
-
"@typescript-eslint/no-require-imports": "error",
|
|
49
|
-
"no-shadow": "off",
|
|
50
|
-
"@typescript-eslint/no-shadow": "error",
|
|
51
|
-
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
52
|
-
"@typescript-eslint/no-unsafe-argument": "off",
|
|
53
|
-
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
54
|
-
"@typescript-eslint/no-unsafe-call": "off",
|
|
55
|
-
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
56
|
-
"no-unused-expressions": "off",
|
|
57
|
-
"@typescript-eslint/no-unused-expressions": "error",
|
|
58
|
-
"no-unused-vars": "warn",
|
|
59
|
-
"@typescript-eslint/no-unused-vars": "warn",
|
|
60
|
-
"no-use-before-define": "off",
|
|
61
|
-
"@typescript-eslint/no-use-before-define": "warn",
|
|
62
|
-
"@typescript-eslint/no-useless-constructor": "error",
|
|
63
|
-
"@typescript-eslint/no-useless-empty-export": "error",
|
|
64
|
-
"@typescript-eslint/non-nullable-type-assertion-style": "error",
|
|
65
|
-
"@typescript-eslint/parameter-properties": "error",
|
|
66
|
-
"@typescript-eslint/prefer-for-of": "warn",
|
|
67
|
-
"@typescript-eslint/prefer-function-type": "error",
|
|
68
|
-
"@typescript-eslint/prefer-includes": "error",
|
|
69
|
-
"@typescript-eslint/prefer-optional-chain": "error",
|
|
70
|
-
"@typescript-eslint/prefer-readonly": "error",
|
|
71
|
-
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
|
72
|
-
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
73
|
-
"@typescript-eslint/promise-function-async": "error",
|
|
74
|
-
"@typescript-eslint/require-array-sort-compare": "warn",
|
|
75
|
-
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
76
|
-
"@typescript-eslint/unified-signatures": "error",
|
|
77
|
-
"array-callback-return": "warn",
|
|
78
|
-
"no-const-assign": "warn",
|
|
79
|
-
"no-constant-binary-expression": "error",
|
|
80
|
-
"no-debugger": "warn",
|
|
81
|
-
"no-fallthrough": "warn",
|
|
82
|
-
|
|
83
|
-
"no-irregular-whitespace": ["error", {
|
|
84
|
-
skipStrings: true,
|
|
85
|
-
skipTemplates: true,
|
|
86
|
-
skipJSXText: true,
|
|
87
|
-
}],
|
|
88
|
-
|
|
89
|
-
"no-new-native-nonconstructor": "error",
|
|
90
|
-
"no-promise-executor-return": "warn",
|
|
91
|
-
"no-self-compare": "warn",
|
|
92
|
-
"no-sparse-arrays": "warn",
|
|
93
|
-
"no-template-curly-in-string": "off",
|
|
94
|
-
"no-unreachable-loop": "error",
|
|
95
|
-
"no-unsafe-negation": "warn",
|
|
96
|
-
"no-unused-private-class-members": "warn",
|
|
97
|
-
"require-atomic-updates": "warn",
|
|
98
|
-
"block-scoped-var": "warn",
|
|
99
|
-
"capitalized-comments": "error",
|
|
100
|
-
"class-methods-use-this": "warn",
|
|
101
|
-
complexity: "warn",
|
|
102
|
-
"default-case": "error",
|
|
103
|
-
"default-case-last": "warn",
|
|
104
|
-
eqeqeq: "error",
|
|
105
|
-
|
|
106
|
-
"max-depth": ["warn", {
|
|
107
|
-
max: 5,
|
|
108
|
-
}],
|
|
109
|
-
|
|
110
|
-
"max-params": ["warn", {
|
|
111
|
-
max: 4,
|
|
112
|
-
}],
|
|
113
|
-
|
|
114
|
-
"no-alert": "warn",
|
|
115
|
-
"no-caller": "error",
|
|
116
|
-
"no-case-declarations": "warn",
|
|
117
|
-
"no-console": "warn",
|
|
118
|
-
"no-div-regex": "warn",
|
|
119
|
-
"no-else-return": "error",
|
|
120
|
-
"no-empty": "warn",
|
|
121
|
-
"no-empty-static-block": "warn",
|
|
122
|
-
"no-extra-label": "error",
|
|
123
|
-
"no-global-assign": "error",
|
|
124
|
-
"no-implied-eval": "error",
|
|
125
|
-
"no-label-var": "error",
|
|
126
|
-
"no-lone-blocks": "warn",
|
|
127
|
-
"no-lonely-if": "error",
|
|
128
|
-
"no-multi-str": "warn",
|
|
129
|
-
"no-return-assign": "error",
|
|
130
|
-
"no-sequences": "error",
|
|
131
|
-
"no-undef-init": "error",
|
|
132
|
-
"no-undefined": "warn",
|
|
133
|
-
"no-unneeded-ternary": "error",
|
|
134
|
-
"no-useless-call": "warn",
|
|
135
|
-
"no-useless-computed-key": "error",
|
|
136
|
-
"no-useless-rename": "error",
|
|
137
|
-
"no-useless-return": "error",
|
|
138
|
-
"no-var": "error",
|
|
139
|
-
"object-shorthand": "error",
|
|
140
|
-
"prefer-arrow-callback": "error",
|
|
141
|
-
"prefer-const": "warn",
|
|
142
|
-
"prefer-exponentiation-operator": "error",
|
|
143
|
-
"prefer-numeric-literals": "error",
|
|
144
|
-
"prefer-object-has-own": "error",
|
|
145
|
-
"prefer-object-spread": "error",
|
|
146
|
-
"require-unicode-regexp": "warn",
|
|
147
|
-
}
|
|
1
|
+
export default {
|
|
2
|
+
languageOptions: {
|
|
3
|
+
parserOptions: {
|
|
4
|
+
projectService: true,
|
|
5
|
+
tsconfigRootDir: import.meta.dirname,
|
|
6
|
+
},
|
|
7
|
+
},
|
|
8
|
+
ignores: ["*/*.mjs"],
|
|
9
|
+
rules: {
|
|
10
|
+
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
11
|
+
"@typescript-eslint/consistent-generic-constructors": ["error", "type-annotation"],
|
|
12
|
+
"@typescript-eslint/explicit-function-return-type": "error",
|
|
13
|
+
"@typescript-eslint/explicit-module-boundary-types": "error",
|
|
14
|
+
|
|
15
|
+
"@typescript-eslint/naming-convention": ["warn", {
|
|
16
|
+
selector: ["classProperty", "objectLiteralProperty", "parameter", "variable"],
|
|
17
|
+
format: ["camelCase", "snake_case"],
|
|
18
|
+
leadingUnderscore: "allow",
|
|
19
|
+
}, {
|
|
20
|
+
selector: ["classMethod", "function", "typeMethod"],
|
|
21
|
+
format: ["camelCase"],
|
|
22
|
+
leadingUnderscore: "allow",
|
|
23
|
+
}, {
|
|
24
|
+
selector: ["interface", "class"],
|
|
25
|
+
format: ["PascalCase"],
|
|
26
|
+
}, {
|
|
27
|
+
selector: ["class"],
|
|
28
|
+
format: ["PascalCase", "camelCase"],
|
|
29
|
+
}],
|
|
30
|
+
|
|
31
|
+
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
32
|
+
"@typescript-eslint/no-confusing-void-expression": "error",
|
|
33
|
+
"@typescript-eslint/no-dynamic-delete": "error",
|
|
34
|
+
"no-empty-function": "off",
|
|
35
|
+
"@typescript-eslint/no-empty-function": "warn",
|
|
36
|
+
"@typescript-eslint/no-empty-interface": "error",
|
|
37
|
+
"@typescript-eslint/no-inferrable-types": "error",
|
|
38
|
+
"no-invalid-this": "off",
|
|
39
|
+
"@typescript-eslint/no-invalid-this": "error",
|
|
40
|
+
"@typescript-eslint/no-invalid-void-type": "error",
|
|
41
|
+
|
|
42
|
+
"@typescript-eslint/no-misused-promises": ["error", {
|
|
43
|
+
checksVoidReturn: false,
|
|
44
|
+
}],
|
|
45
|
+
|
|
46
|
+
"@typescript-eslint/no-mixed-enums": "error",
|
|
47
|
+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
48
|
+
"@typescript-eslint/no-require-imports": "error",
|
|
49
|
+
"no-shadow": "off",
|
|
50
|
+
"@typescript-eslint/no-shadow": "error",
|
|
51
|
+
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
52
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
53
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
54
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
55
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
56
|
+
"no-unused-expressions": "off",
|
|
57
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
58
|
+
"no-unused-vars": "warn",
|
|
59
|
+
"@typescript-eslint/no-unused-vars": "warn",
|
|
60
|
+
"no-use-before-define": "off",
|
|
61
|
+
"@typescript-eslint/no-use-before-define": "warn",
|
|
62
|
+
"@typescript-eslint/no-useless-constructor": "error",
|
|
63
|
+
"@typescript-eslint/no-useless-empty-export": "error",
|
|
64
|
+
"@typescript-eslint/non-nullable-type-assertion-style": "error",
|
|
65
|
+
"@typescript-eslint/parameter-properties": "error",
|
|
66
|
+
"@typescript-eslint/prefer-for-of": "warn",
|
|
67
|
+
"@typescript-eslint/prefer-function-type": "error",
|
|
68
|
+
"@typescript-eslint/prefer-includes": "error",
|
|
69
|
+
"@typescript-eslint/prefer-optional-chain": "error",
|
|
70
|
+
"@typescript-eslint/prefer-readonly": "error",
|
|
71
|
+
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
|
72
|
+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
73
|
+
"@typescript-eslint/promise-function-async": "error",
|
|
74
|
+
"@typescript-eslint/require-array-sort-compare": "warn",
|
|
75
|
+
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
76
|
+
"@typescript-eslint/unified-signatures": "error",
|
|
77
|
+
"array-callback-return": "warn",
|
|
78
|
+
"no-const-assign": "warn",
|
|
79
|
+
"no-constant-binary-expression": "error",
|
|
80
|
+
"no-debugger": "warn",
|
|
81
|
+
"no-fallthrough": "warn",
|
|
82
|
+
|
|
83
|
+
"no-irregular-whitespace": ["error", {
|
|
84
|
+
skipStrings: true,
|
|
85
|
+
skipTemplates: true,
|
|
86
|
+
skipJSXText: true,
|
|
87
|
+
}],
|
|
88
|
+
|
|
89
|
+
"no-new-native-nonconstructor": "error",
|
|
90
|
+
"no-promise-executor-return": "warn",
|
|
91
|
+
"no-self-compare": "warn",
|
|
92
|
+
"no-sparse-arrays": "warn",
|
|
93
|
+
"no-template-curly-in-string": "off",
|
|
94
|
+
"no-unreachable-loop": "error",
|
|
95
|
+
"no-unsafe-negation": "warn",
|
|
96
|
+
"no-unused-private-class-members": "warn",
|
|
97
|
+
"require-atomic-updates": "warn",
|
|
98
|
+
"block-scoped-var": "warn",
|
|
99
|
+
"capitalized-comments": "error",
|
|
100
|
+
"class-methods-use-this": "warn",
|
|
101
|
+
complexity: "warn",
|
|
102
|
+
"default-case": "error",
|
|
103
|
+
"default-case-last": "warn",
|
|
104
|
+
eqeqeq: "error",
|
|
105
|
+
|
|
106
|
+
"max-depth": ["warn", {
|
|
107
|
+
max: 5,
|
|
108
|
+
}],
|
|
109
|
+
|
|
110
|
+
"max-params": ["warn", {
|
|
111
|
+
max: 4,
|
|
112
|
+
}],
|
|
113
|
+
|
|
114
|
+
"no-alert": "warn",
|
|
115
|
+
"no-caller": "error",
|
|
116
|
+
"no-case-declarations": "warn",
|
|
117
|
+
"no-console": "warn",
|
|
118
|
+
"no-div-regex": "warn",
|
|
119
|
+
"no-else-return": "error",
|
|
120
|
+
"no-empty": "warn",
|
|
121
|
+
"no-empty-static-block": "warn",
|
|
122
|
+
"no-extra-label": "error",
|
|
123
|
+
"no-global-assign": "error",
|
|
124
|
+
"no-implied-eval": "error",
|
|
125
|
+
"no-label-var": "error",
|
|
126
|
+
"no-lone-blocks": "warn",
|
|
127
|
+
"no-lonely-if": "error",
|
|
128
|
+
"no-multi-str": "warn",
|
|
129
|
+
"no-return-assign": "error",
|
|
130
|
+
"no-sequences": "error",
|
|
131
|
+
"no-undef-init": "error",
|
|
132
|
+
"no-undefined": "warn",
|
|
133
|
+
"no-unneeded-ternary": "error",
|
|
134
|
+
"no-useless-call": "warn",
|
|
135
|
+
"no-useless-computed-key": "error",
|
|
136
|
+
"no-useless-rename": "error",
|
|
137
|
+
"no-useless-return": "error",
|
|
138
|
+
"no-var": "error",
|
|
139
|
+
"object-shorthand": "error",
|
|
140
|
+
"prefer-arrow-callback": "error",
|
|
141
|
+
"prefer-const": "warn",
|
|
142
|
+
"prefer-exponentiation-operator": "error",
|
|
143
|
+
"prefer-numeric-literals": "error",
|
|
144
|
+
"prefer-object-has-own": "error",
|
|
145
|
+
"prefer-object-spread": "error",
|
|
146
|
+
"require-unicode-regexp": "warn",
|
|
147
|
+
}
|
|
148
148
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commission-on-post/eslint-config-recommended",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "ESLint config using recommended state practices for the Commission on POST",
|
|
5
5
|
"main": "./config.js",
|
|
6
6
|
"author": "Ryan W. Bell",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"repack": "(del *.tgz 2> NUL || exit 0) && npm pack",
|
|
16
16
|
"build": "tsc --pretty && echo REMEMBER TO COPY ./eslint.config.mjs TO DIST FOLDER",
|
|
17
|
+
"prepublishOnly": "npm version patch",
|
|
17
18
|
"start": "node ."
|
|
18
19
|
},
|
|
19
20
|
"keywords": [
|
|
@@ -24,15 +25,15 @@
|
|
|
24
25
|
"recommended"
|
|
25
26
|
],
|
|
26
27
|
"devDependencies": {
|
|
27
|
-
"@eslint/js": "^9.
|
|
28
|
-
"eslint": "^9.
|
|
28
|
+
"@eslint/js": "^9.17.0",
|
|
29
|
+
"eslint": "^9.17.0",
|
|
29
30
|
"typescript": "^5.7.2",
|
|
30
|
-
"typescript-eslint": "^8.
|
|
31
|
+
"typescript-eslint": "^8.19.0"
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {
|
|
33
|
-
"@eslint/js": ">=9.
|
|
34
|
-
"eslint": ">=9.
|
|
35
|
-
"typescript": ">=5.7.2",
|
|
36
|
-
"typescript-eslint": ">=8.
|
|
34
|
+
"@eslint/js": ">= 9.17.0",
|
|
35
|
+
"eslint": ">= 9.17.0",
|
|
36
|
+
"typescript": ">= 5.7.2",
|
|
37
|
+
"typescript-eslint": ">= 8.19.0"
|
|
37
38
|
}
|
|
38
39
|
}
|