@tb-dev/eslint-config 5.3.0 → 5.3.1
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.cjs +5 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -29,7 +29,11 @@ async function interopDefault(promise) {
|
|
|
29
29
|
return result.default ?? result;
|
|
30
30
|
}
|
|
31
31
|
function isEnabled(config, feature) {
|
|
32
|
-
if (Array.isArray(config))
|
|
32
|
+
if (Array.isArray(config)) {
|
|
33
|
+
return config.includes(feature);
|
|
34
|
+
} else if (typeof config === "boolean") {
|
|
35
|
+
return config;
|
|
36
|
+
}
|
|
33
37
|
switch (feature) {
|
|
34
38
|
case "perfectionist":
|
|
35
39
|
return config?.perfectionist ?? true;
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ declare interface ConfigObject {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
declare interface ConfigOptions {
|
|
18
|
-
features?: FeaturesObject | (keyof FeaturesObject)[];
|
|
18
|
+
features?: FeaturesObject | (keyof FeaturesObject)[] | boolean;
|
|
19
19
|
/** `tsconfig.json` files for TypeScript. */
|
|
20
20
|
project: string[];
|
|
21
21
|
ignores?: Ignores['ignores'];
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,11 @@ async function interopDefault(promise) {
|
|
|
25
25
|
return result.default ?? result;
|
|
26
26
|
}
|
|
27
27
|
function isEnabled(config, feature) {
|
|
28
|
-
if (Array.isArray(config))
|
|
28
|
+
if (Array.isArray(config)) {
|
|
29
|
+
return config.includes(feature);
|
|
30
|
+
} else if (typeof config === "boolean") {
|
|
31
|
+
return config;
|
|
32
|
+
}
|
|
29
33
|
switch (feature) {
|
|
30
34
|
case "perfectionist":
|
|
31
35
|
return config?.perfectionist ?? true;
|