@putout/engine-loader 11.6.0 → 12.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/lib/rules/parse-rules.js +12 -1
- package/package.json +3 -3
package/lib/rules/parse-rules.js
CHANGED
|
@@ -11,7 +11,18 @@ const notSupportedError = (a) => Error(`☝️ Rule format not supported ${a}: $
|
|
|
11
11
|
const rulesUsedInsteadOfMatchError = (a) => Error(`☝️ Looks like you need to change "rules" to "match" for ${stringify(a)}`);
|
|
12
12
|
const stateOptionError = ({rule, value}) => Error(`☝️ ${rule}: state option can be "on" or "off" only, when used as string, received: "${value}"`);
|
|
13
13
|
const defaultOptions = () => Object.create(null);
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
const parseState = (rule, value) => {
|
|
16
|
+
validateState(rule, value);
|
|
17
|
+
|
|
18
|
+
if (value === 'on')
|
|
19
|
+
return true;
|
|
20
|
+
|
|
21
|
+
if (value === 'off')
|
|
22
|
+
return false;
|
|
23
|
+
|
|
24
|
+
return value;
|
|
25
|
+
};
|
|
15
26
|
|
|
16
27
|
module.exports.parseRules = (rules) => {
|
|
17
28
|
rules = parseSubrules(rules);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/engine-loader",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.1.0",
|
|
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",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"report": "madrun report"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@putout/engine-parser": "^
|
|
27
|
+
"@putout/engine-parser": "^9.0.0",
|
|
28
28
|
"diff-match-patch": "^1.0.4",
|
|
29
29
|
"nano-memoize": "^3.0.11",
|
|
30
30
|
"once": "^1.4.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"c8": "^8.0.0",
|
|
50
50
|
"eslint": "^8.0.1",
|
|
51
51
|
"eslint-plugin-n": "^16.0.0",
|
|
52
|
-
"eslint-plugin-putout": "^
|
|
52
|
+
"eslint-plugin-putout": "^20.0.0",
|
|
53
53
|
"estrace": "*",
|
|
54
54
|
"just-camel-case": "^4.0.2",
|
|
55
55
|
"lerna": "^6.0.1",
|