eslint-config-isaacscript 4.0.6 → 4.0.8
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/base-import.js +6 -2
- package/base-typescript-eslint.js +16 -1
- package/package.json +1 -1
package/base-import.js
CHANGED
|
@@ -191,8 +191,12 @@ const STYLE_GUIDE = {
|
|
|
191
191
|
* @type {import("eslint").Linter.Config}
|
|
192
192
|
*/
|
|
193
193
|
const config = {
|
|
194
|
-
//
|
|
195
|
-
//
|
|
194
|
+
// Beyond just specifying the plugin, additional configuration is necessary to make the plugin
|
|
195
|
+
// work properly with TypeScript. We extend the upstream TypeScript config to accomplish this:
|
|
196
|
+
// https://github.com/import-js/eslint-plugin-import/blob/main/config/typescript.js
|
|
197
|
+
// (The necessity of this extra configuration was tested with the `import/no-cycle` rule.)
|
|
198
|
+
extends: ["plugin:import/typescript"],
|
|
199
|
+
|
|
196
200
|
plugins: ["import"],
|
|
197
201
|
|
|
198
202
|
rules: {
|
|
@@ -175,7 +175,22 @@ const SUPPORTED_RULES = {
|
|
|
175
175
|
/** Disabled since in it does not make sense to sort a union alphabetically in many cases. */
|
|
176
176
|
"@typescript-eslint/sort-type-constituents": "off",
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
/** The `allowString` and `allowNumber` options are disabled to make the rule stricter. */
|
|
179
|
+
"@typescript-eslint/strict-boolean-expressions": [
|
|
180
|
+
"error",
|
|
181
|
+
{
|
|
182
|
+
allowString: false,
|
|
183
|
+
allowNumber: false,
|
|
184
|
+
allowNullableObject: true,
|
|
185
|
+
allowNullableBoolean: false,
|
|
186
|
+
allowNullableString: false,
|
|
187
|
+
allowNullableNumber: false,
|
|
188
|
+
allowNullableEnum: false,
|
|
189
|
+
allowAny: false,
|
|
190
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
|
|
179
194
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
180
195
|
"@typescript-eslint/triple-slash-reference": "error",
|
|
181
196
|
"@typescript-eslint/type-annotation-spacing": "off", // eslint-config-prettier
|