redput 2.3.0 → 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,16 @@
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
+
1
14
  2024.04.12, v2.3.0
2
15
 
3
16
  feature:
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # redput [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]
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
- const value = print(a);
51
+ let value;
52
52
 
53
- return value
54
- .slice(1, -3)
55
- .replaceAll('${', '{');
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "2.3.0",
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,28 +58,28 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@putout/plugin-convert-esm-to-commonjs": "^6.0.0",
61
- "@putout/plugin-declare": "^3.0.0",
62
- "@putout/plugin-declare-before-reference": "^3.0.0",
61
+ "@putout/plugin-declare": "^4.0.0",
62
+ "@putout/plugin-declare-before-reference": "^4.0.0",
63
63
  "@putout/plugin-nodejs": "^11.0.0",
64
- "@putout/plugin-putout": "^19.1.0",
64
+ "@putout/plugin-putout": "^20.6.0",
65
65
  "@putout/plugin-remove-unused-variables": "^9.0.0",
66
66
  "node-fetch": "^3.3.2",
67
- "octokit": "^3.1.0",
67
+ "octokit": "^4.0.2",
68
68
  "putout": "^35.0.0",
69
69
  "rendy": "^4.1.3",
70
70
  "try-catch": "^3.0.1",
71
71
  "try-to-catch": "^3.0.1"
72
72
  },
73
73
  "devDependencies": {
74
- "@putout/test": "^9.0.1",
75
- "c8": "^9.0.0",
74
+ "@putout/test": "^10.0.0",
75
+ "c8": "^10.1.2",
76
76
  "escover": "^4.0.1",
77
- "eslint": "^8.0.0",
78
- "eslint-plugin-n": "^17.2.0",
77
+ "eslint": "^9.0.0",
79
78
  "eslint-plugin-putout": "^22.1.0",
80
79
  "madrun": "^10.0.0",
81
80
  "montag": "^1.2.1",
82
81
  "nodemon": "^3.0.1",
82
+ "redlint": "^3.14.1",
83
83
  "supertape": "^10.1.0"
84
84
  },
85
85
  "publishConfig": {