putout 35.22.0 → 35.22.2
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 +15 -0
- package/lib/cli/process-file.js +9 -6
- package/package.json +1 -1
- package/putout.json +2 -1
package/ChangeLog
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
2024.05.08, v35.22.2
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 1e3ca1f22 putout: run 🐊 after fixing syntax errors
|
|
5
|
+
- 807430337 eslint-plugin-putout: align-spaces: report
|
|
6
|
+
- 08e77aec0 @putout/plugin-putout: convert-replace-with: report
|
|
7
|
+
- 19908112b @putout/plugin-for-of: add-missing-star: delegate
|
|
8
|
+
- 3f41dd7de @putout/plugin-react: apply-create-root: add
|
|
9
|
+
- eb138c934 @putout/plugin-for-of: add-missing-star
|
|
10
|
+
|
|
11
|
+
2024.05.07, v35.22.1
|
|
12
|
+
|
|
13
|
+
feature:
|
|
14
|
+
- 947c377ef putout: eslint.config.js: disable putout/convert-match-to-flat
|
|
15
|
+
|
|
1
16
|
2024.05.07, v35.22.0
|
|
2
17
|
|
|
3
18
|
feature:
|
package/lib/cli/process-file.js
CHANGED
|
@@ -18,7 +18,7 @@ const getMatchedOptions = (name, options) => {
|
|
|
18
18
|
return merge(options, parseMatch(name, options.match));
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
module.exports = ({fix, fixCount, isFlow, logError, raw, printer}) => async ({name, source, startLine, options})
|
|
21
|
+
module.exports = ({fix, fixCount, isFlow, logError, raw, printer}) => async function processFile({name, source, startLine, options, again}) {
|
|
22
22
|
const {configurePrinter} = await import('./printer/printer.mjs');
|
|
23
23
|
const isTS = /\.tsx?$/.test(name) || /{tsx?}$/.test(name);
|
|
24
24
|
const matchedOptions = getMatchedOptions(name, options);
|
|
@@ -32,7 +32,7 @@ module.exports = ({fix, fixCount, isFlow, logError, raw, printer}) => async ({na
|
|
|
32
32
|
printer: configurePrinter(name, printer),
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
if (e) {
|
|
35
|
+
if (!again && e) {
|
|
36
36
|
raw && logError(e);
|
|
37
37
|
const {places, code} = await lintSyntax(source, {
|
|
38
38
|
fix,
|
|
@@ -46,10 +46,13 @@ module.exports = ({fix, fixCount, isFlow, logError, raw, printer}) => async ({na
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
if (fix && !places.length)
|
|
49
|
-
return {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
return await processFile({
|
|
50
|
+
again: true,
|
|
51
|
+
name,
|
|
52
|
+
source: code,
|
|
53
|
+
startLine,
|
|
54
|
+
options,
|
|
55
|
+
});
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
const {code = source} = result || {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "35.22.
|
|
3
|
+
"version": "35.22.2",
|
|
4
4
|
"type": "commonjs",
|
|
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",
|