Remove useless stict toggle from strict transform.
This commit is contained in:
@@ -34,7 +34,6 @@ npm install --save-dev babel-plugin-transform-strict-mode
|
||||
|
||||
**.babelrc**
|
||||
|
||||
Without options:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -42,17 +41,6 @@ Without options:
|
||||
}
|
||||
```
|
||||
|
||||
With options:
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": [
|
||||
["transform-strict-mode", {
|
||||
"strict": true
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
|
||||
@@ -3,11 +3,7 @@ import * as t from "babel-types";
|
||||
export default function() {
|
||||
return {
|
||||
visitor: {
|
||||
Program(path, state) {
|
||||
if (state.opts.strict === false || state.opts.strictMode === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
Program(path) {
|
||||
const { node } = path;
|
||||
|
||||
for (const directive of (node.directives: Array<Object>)) {
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-strict-mode", { "strictMode": false }]
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
foo();
|
||||
@@ -1 +0,0 @@
|
||||
foo();
|
||||
Reference in New Issue
Block a user