@putout/engine-loader 16.1.0 → 16.2.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.
|
@@ -19,7 +19,7 @@ module.exports.filterEnabledPlugins = ({plugins, cookedRules}) => {
|
|
|
19
19
|
|
|
20
20
|
const [status, currentPlugin] = maybeTuple(plugin);
|
|
21
21
|
|
|
22
|
-
if (!
|
|
22
|
+
if (!isExactRuleEnabled(name, status, cookedRules))
|
|
23
23
|
continue;
|
|
24
24
|
|
|
25
25
|
result.push(mergeRules(
|
|
@@ -31,7 +31,7 @@ module.exports.filterEnabledPlugins = ({plugins, cookedRules}) => {
|
|
|
31
31
|
return result;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
function
|
|
34
|
+
function isExactRuleEnabled(name, status, rules) {
|
|
35
35
|
if (status === 'on')
|
|
36
36
|
return true;
|
|
37
37
|
|
package/lib/rules/parse-rules.js
CHANGED
|
@@ -29,6 +29,8 @@ module.exports.parseRules = (rules) => {
|
|
|
29
29
|
const plugin = null;
|
|
30
30
|
const msg = '';
|
|
31
31
|
|
|
32
|
+
check(rules);
|
|
33
|
+
|
|
32
34
|
for (const [rule, value] of entries(rules)) {
|
|
33
35
|
if (isStr(value)) {
|
|
34
36
|
result.push({
|
|
@@ -128,3 +130,8 @@ module.exports.enableNestedRules = (rules) => {
|
|
|
128
130
|
|
|
129
131
|
return newRules;
|
|
130
132
|
};
|
|
133
|
+
|
|
134
|
+
function check(rules) {
|
|
135
|
+
if (isArray(rules))
|
|
136
|
+
throw Error(`☝️Looks like type of 'rules' passed to @putout/engine-loader is 'array', expected: 'object'.`);
|
|
137
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/engine-loader",
|
|
3
|
-
"version": "16.1
|
|
3
|
+
"version": "16.2.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "load plugins and prepare them to run",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"eslint": "^9.0.0",
|
|
52
52
|
"eslint-plugin-n": "^17.0.0",
|
|
53
53
|
"eslint-plugin-putout": "^28.0.0",
|
|
54
|
-
"estrace": "
|
|
54
|
+
"estrace": "^6.0.0",
|
|
55
55
|
"just-camel-case": "^6.2.0",
|
|
56
56
|
"madrun": "^11.0.0",
|
|
57
57
|
"mock-require": "^3.0.3",
|