@putout/plugin-putout 8.2.0 → 8.2.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/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-putout.svg?style=flat&longCache=true
|
|
4
4
|
[NPMURL]: https://npmjs.org/package/@putout/plugin-putout"npm"
|
|
5
5
|
|
|
6
|
-
🐊[`Putout`](https://github.com/coderaiser/putout) plugin helps with
|
|
6
|
+
🐊[`Putout`](https://github.com/coderaiser/putout) plugin helps with 🐊`Putout` plugins development.
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
@@ -75,18 +75,29 @@ test('formatter: codeframea', async ({format}) => {
|
|
|
75
75
|
await format(codeframe, 1);
|
|
76
76
|
});
|
|
77
77
|
```
|
|
78
|
+
|
|
78
79
|
## convert-putout-test-to-create-test"
|
|
79
80
|
|
|
81
|
+
Fixes results of [@putout/convert-commonjs-to-esm](https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-commonjs-to-esm) work.
|
|
82
|
+
|
|
80
83
|
### ❌ Incorrect code example
|
|
81
84
|
|
|
82
85
|
```js
|
|
83
86
|
import putoutTest from '@putout/test';
|
|
87
|
+
|
|
88
|
+
const test = putoutTest(__dirname, {
|
|
89
|
+
'remove-unused-variables': rmVars,
|
|
90
|
+
});
|
|
84
91
|
```
|
|
85
92
|
|
|
86
93
|
### ✅ Correct code Example
|
|
87
94
|
|
|
88
95
|
```js
|
|
89
96
|
import createTest from '@putout/test';
|
|
97
|
+
|
|
98
|
+
const test = createTest(__dirname, {
|
|
99
|
+
'remove-unused-variables': rmVars,
|
|
100
|
+
});
|
|
90
101
|
```
|
|
91
102
|
|
|
92
103
|
## convert-to-no-transform-code
|
|
@@ -318,7 +329,8 @@ module.exports.replace = () => ({
|
|
|
318
329
|
});
|
|
319
330
|
```
|
|
320
331
|
|
|
321
|
-
There is no `fix` for this rule, it used internally to be more confident about `test coverage`, because of declaration form, transforms cannon be checked by `nyc` and `c8`, and uncovered lines can find unfixable false possitives when running on code.
|
|
332
|
+
There is no `fix` for this rule, it used internally to be more confident about `test coverage`, because of declaration form, transforms cannon be checked by `nyc` and `c8`, and uncovered lines can find unfixable false possitives when running on code.
|
|
333
|
+
This is additional tests, if you forget to test some case (from a big list of rules that is supported) it will be checked with this `rule` and make transforms more stable.
|
|
322
334
|
|
|
323
335
|
## declare
|
|
324
336
|
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
module.exports.report = () => `Use 'createTest' instead of 'putoutTest'`;
|
|
4
4
|
|
|
5
|
-
module.exports.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
module.exports.filter = ({scope}) => !scope.bindings.createTest;
|
|
6
|
+
|
|
7
|
+
module.exports.include = () => [
|
|
8
|
+
'import putoutTest from "@putout/test"',
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
module.exports.fix = (path) => {
|
|
12
|
+
path.scope.rename('putoutTest', 'createTest');
|
|
13
|
+
};
|
|
11
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-putout",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.1",
|
|
4
4
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
5
5
|
"description": "putout plugin helps with plugins development",
|
|
6
6
|
"homepage": "https://github.com/coderaiser/putout/tree/master/packages/plugin-putout",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"url": "git://github.com/coderaiser/putout.git"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
+
"wisdom": "madrun wisdom",
|
|
16
17
|
"test": "madrun test",
|
|
17
18
|
"watch:test": "madrun watch:test",
|
|
18
19
|
"lint": "madrun lint",
|