putout 42.20.0 → 42.20.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/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2026.09.28, v42.20.1
2
+
3
+ fix:
4
+ - c869b5c1d putout: parse-options: revert match more important then rule
5
+
1
6
  2026.09.28, v42.20.0
2
7
 
3
8
  fix:
@@ -11,7 +11,6 @@ import _defaultOptions from '../../putout.json' with {
11
11
  type: 'json',
12
12
  };
13
13
  import {mergeOptions} from './merge-options.js';
14
- import {applyMatchRules} from './apply-match-rules.js';
15
14
  import _recursiveRead from './recursive-read.js';
16
15
  import applyModuleTypeRules from './apply-module-type-rules.js';
17
16
  import {validateOptions} from './validate-options/index.js';
@@ -89,12 +88,6 @@ export const parseOptions = (info = {}, overrides = {}) => {
89
88
 
90
89
  const finalMergedOptions = mergeOptions(...resultOptionsList);
91
90
 
92
- const matched = parseMatch(name, options.match);
93
- const withMatchRules = applyMatchRules(finalMergedOptions.rules, matched.rules);
94
-
95
- if (withMatchRules !== finalMergedOptions.rules)
96
- finalMergedOptions.rules = withMatchRules;
97
-
98
91
  validateOptions(finalMergedOptions);
99
92
 
100
93
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "42.20.0",
3
+ "version": "42.20.1",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊 Pluggable and configurable code transformer with built-in ESLint, Babel and support of js, jsx, typescript, flow, markdown, yaml and json",
@@ -1,29 +0,0 @@
1
- const {entries, keys} = Object;
2
-
3
- const cut = (a) => a.split('/')[0];
4
- const isEmpty = (a) => !keys(a).length;
5
- const isNested = (a) => a.includes('/');
6
-
7
- const isSuppressed = (matchRules, rule) => {
8
- if (Object.hasOwn(matchRules, rule))
9
- return true;
10
-
11
- return isNested(rule) && matchRules[cut(rule)] === 'off';
12
- };
13
-
14
- export const applyMatchRules = (rules, matchRules = {}) => {
15
- if (isEmpty(matchRules) || isEmpty(rules))
16
- return rules;
17
-
18
- const result = {};
19
-
20
- for (const [rule, value] of entries(rules)) {
21
- if (!isSuppressed(matchRules, rule))
22
- result[rule] = value;
23
- }
24
-
25
- return {
26
- ...result,
27
- ...matchRules,
28
- };
29
- };