@putout/plugin-nodejs 12.0.0 → 12.0.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
|
@@ -38,7 +38,7 @@ npm i putout @putout/plugin-nodejs -D
|
|
|
38
38
|
- ✅ [rename-file-cjs-to-js](#rename-file-cjs-to-js);
|
|
39
39
|
- ✅ [rename-file-mjs-to-js](#rename-file-mjs-to-js);
|
|
40
40
|
- ✅ [remove-useless-strict-mode](#remove-useless-strict-mode);
|
|
41
|
-
- ✅ [remove-
|
|
41
|
+
- ✅ [remove-illegal-strict-mode](#remove-useless-strict-mode);
|
|
42
42
|
- ✅ [cjs-file](#cjs-file);
|
|
43
43
|
- ✅ [mjs-file](#mjs-file);
|
|
44
44
|
|
|
@@ -66,6 +66,7 @@ npm i putout @putout/plugin-nodejs -D
|
|
|
66
66
|
"nodejs/remove-process-exit": "on",
|
|
67
67
|
"nodejs/add-missing-strict-mode": "on",
|
|
68
68
|
"nodejs/remove-useless-strict-mode": "on",
|
|
69
|
+
"nodejs/remove-illegal-strict-mode": "on",
|
|
69
70
|
"nodejs/remove-useless-promisify": "on"
|
|
70
71
|
}
|
|
71
72
|
}
|
|
@@ -487,7 +488,7 @@ import a from 'b';
|
|
|
487
488
|
import a from 'b';
|
|
488
489
|
```
|
|
489
490
|
|
|
490
|
-
## remove-
|
|
491
|
+
## remove-illegal-strict-mode
|
|
491
492
|
|
|
492
493
|
> `SyntaxError: "use strict" not allowed in function with non-simple parameters`
|
|
493
494
|
> The JavaScript exception `"use strict" not allowed in function` occurs when a `use strict` directive is used at the top of a function with default parameters, rest parameters, or destructuring parameters.
|
package/lib/index.js
CHANGED
|
@@ -53,6 +53,6 @@ module.exports.rules = {
|
|
|
53
53
|
|
|
54
54
|
'add-missing-strict-mode': strictMode.rules['add-missing'],
|
|
55
55
|
'remove-useless-strict-mode': strictMode.rules['remove-useless'],
|
|
56
|
-
'remove-
|
|
56
|
+
'remove-illegal-strict-mode': strictMode.rules['remove-illegal'],
|
|
57
57
|
'remove-useless-promisify': removeUselessPromisify,
|
|
58
58
|
};
|
package/lib/strict-mode/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
const addMissing = require('./add-missing');
|
|
4
4
|
const removeUseless = require('./remove-useless');
|
|
5
|
-
const
|
|
5
|
+
const removeIllegal = require('./remove-illegal');
|
|
6
6
|
|
|
7
7
|
module.exports.rules = {
|
|
8
8
|
'add-missing': addMissing,
|
|
9
9
|
'remove-useless': removeUseless,
|
|
10
|
-
'remove-
|
|
10
|
+
'remove-illegal': removeIllegal,
|
|
11
11
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-nodejs",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout plugin adds ability to transform code to new API of Node.js",
|