redput 2.2.2 → 2.4.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/ChangeLog
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
2024.06.17, v2.4.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- ed520d8 redput: @putout/test v10.0.0
|
|
5
|
+
- 6cee98a redput: octokit v4.0.2
|
|
6
|
+
- 5c40fa7 redput: @putout/plugin-putout v20.6.0
|
|
7
|
+
- 898a079 redput: @putout/plugin-declare-before-reference v4.0.0
|
|
8
|
+
- 11c1416 redput: @putout/plugin-declare v4.0.0
|
|
9
|
+
- 2190619 redput: c8 v10.1.2
|
|
10
|
+
- efef6c5 redput: get-report: add support of body
|
|
11
|
+
- a89fa1e redput: migrate to ESLint v9
|
|
12
|
+
- 5eb3692 redput: redlint v3.14.1
|
|
13
|
+
|
|
14
|
+
2024.04.12, v2.3.0
|
|
15
|
+
|
|
16
|
+
feature:
|
|
17
|
+
- 3eb3345 redput: @putout/plugin-remove-unused-variables v9.0.0
|
|
18
|
+
- 1278762 redput: @putout/plugin-putout v19.1.0
|
|
19
|
+
- c0e49ce redput: eslint-plugin-n v17.2.0
|
|
20
|
+
- e69a472 redput: @putout/plugin-declare-before-reference v3.0.0
|
|
21
|
+
|
|
1
22
|
2024.02.19, v2.2.2
|
|
2
23
|
|
|
3
24
|
feature:
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# RedPut [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]
|
|
2
2
|
|
|
3
3
|
[NPMURL]: https://npmjs.org/package/redput "npm"
|
|
4
4
|
[NPMIMGURL]: https://img.shields.io/npm/v/redput.svg?style=flat
|
|
@@ -44,6 +44,14 @@ export const scan = (root, {push}) => {
|
|
|
44
44
|
};
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
When you get your rule downloaded, use:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
UPDATE=1 npm fix:lint test
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
to finish preparations of new rule and tests.
|
|
54
|
+
|
|
47
55
|
## License
|
|
48
56
|
|
|
49
57
|
MIT
|
|
@@ -48,9 +48,16 @@ function parseValue(a) {
|
|
|
48
48
|
if (isStringLiteral(a))
|
|
49
49
|
return a.value;
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
let value;
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
operator.traverse(a, {
|
|
54
|
+
ReturnStatement(path) {
|
|
55
|
+
value = print(path.get('argument'));
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
if (!value)
|
|
60
|
+
value = print(a).slice(1, -3);
|
|
61
|
+
|
|
62
|
+
return value.replaceAll('${', '{');
|
|
56
63
|
}
|
|
@@ -2,11 +2,13 @@ import putout from 'putout';
|
|
|
2
2
|
import convertESMToCommonjs from '@putout/plugin-convert-esm-to-commonjs';
|
|
3
3
|
import putoutPlugin from '@putout/plugin-putout';
|
|
4
4
|
import declare from '@putout/plugin-declare';
|
|
5
|
+
import declareBeforeReference from '@putout/plugin-declare-before-reference';
|
|
5
6
|
|
|
6
7
|
export const prepareRule = (source) => {
|
|
7
8
|
const {code} = putout(source, {
|
|
8
9
|
plugins: [
|
|
9
10
|
['declare', declare],
|
|
11
|
+
['declare-before-reference', declareBeforeReference],
|
|
10
12
|
['convert-esm-to-commonjs', convertESMToCommonjs],
|
|
11
13
|
['putout', putoutPlugin],
|
|
12
14
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redput",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "CLI tool to convert source from 🐊Putout Editor to files",
|
|
5
5
|
"main": "lib/redput.js",
|
|
6
6
|
"bin": {
|
|
@@ -58,27 +58,28 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@putout/plugin-convert-esm-to-commonjs": "^6.0.0",
|
|
61
|
-
"@putout/plugin-declare": "^
|
|
61
|
+
"@putout/plugin-declare": "^4.0.0",
|
|
62
|
+
"@putout/plugin-declare-before-reference": "^4.0.0",
|
|
62
63
|
"@putout/plugin-nodejs": "^11.0.0",
|
|
63
|
-
"@putout/plugin-putout": "^
|
|
64
|
-
"@putout/plugin-remove-unused-variables": "^
|
|
64
|
+
"@putout/plugin-putout": "^20.6.0",
|
|
65
|
+
"@putout/plugin-remove-unused-variables": "^9.0.0",
|
|
65
66
|
"node-fetch": "^3.3.2",
|
|
66
|
-
"octokit": "^
|
|
67
|
+
"octokit": "^4.0.2",
|
|
67
68
|
"putout": "^35.0.0",
|
|
68
69
|
"rendy": "^4.1.3",
|
|
69
70
|
"try-catch": "^3.0.1",
|
|
70
71
|
"try-to-catch": "^3.0.1"
|
|
71
72
|
},
|
|
72
73
|
"devDependencies": {
|
|
73
|
-
"@putout/test": "^
|
|
74
|
-
"c8": "^
|
|
74
|
+
"@putout/test": "^10.0.0",
|
|
75
|
+
"c8": "^10.1.2",
|
|
75
76
|
"escover": "^4.0.1",
|
|
76
|
-
"eslint": "^
|
|
77
|
-
"eslint-plugin-n": "^16.0.1",
|
|
77
|
+
"eslint": "^9.0.0",
|
|
78
78
|
"eslint-plugin-putout": "^22.1.0",
|
|
79
79
|
"madrun": "^10.0.0",
|
|
80
80
|
"montag": "^1.2.1",
|
|
81
81
|
"nodemon": "^3.0.1",
|
|
82
|
+
"redlint": "^3.14.1",
|
|
82
83
|
"supertape": "^10.1.0"
|
|
83
84
|
},
|
|
84
85
|
"publishConfig": {
|