Skip to content

Commit 8205220

Browse files
committed
chore: format
1 parent b5b4fa8 commit 8205220

5 files changed

Lines changed: 442 additions & 431 deletions

File tree

.github/workflows/bump_deps.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
ncu -u --dep prod
2525
pnpm install
2626
27-
2827
- uses: tibdex/github-app-token@v1
2928
id: generate-token
3029
with:
@@ -38,7 +37,6 @@ jobs:
3837
labels: Dependencies
3938
branch: "Bump_Dependencies"
4039

41-
4240
Bump_devDependencies:
4341
runs-on: ubuntu-latest
4442
steps:

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,30 @@ Remove 'use strict' if the file is 'not strict'
55
Most of the bundlers and transpilers such as babel add `'use strict'` to the above of your file. This plugin will remove them if you add `'not strict'` to that file. You can also use this plugin to remove `'use strict'` from all the files
66

77
## Installation
8+
89
```
910
npm install --save-dev babel-plugin-transform-not-strict
1011
```
1112

1213
You should also install the peer dependencies:
14+
1315
```
1416
npm install -save-dev "@babel/core"
1517
```
1618

1719
## Usage
1820

19-
1) put the following in above the a file that is not strict:
21+
1. put the following in above the a file that is not strict:
22+
2023
```js
21-
'not strict'
24+
"not strict";
25+
2226
```
2327

24-
2) Add `"babel-plugin-transform-not-strict"` to the list of your babel plugins.
28+
2. Add `"babel-plugin-transform-not-strict"` to the list of your babel plugins.
2529

2630
For example, create a `babel.config.js` file at the root of the project with the following content:
31+
2732
```js
2833
let presets = [];
2934

@@ -40,6 +45,7 @@ module.exports = {
4045
### Usage Remove All
4146

4247
You can also use this plugin to remove `'use strict'` from all the files. Just pass `removeAll: true`.
48+
4349
```js
4450
let presets = [];
4551

@@ -63,15 +69,16 @@ module.exports = {
6369
### Usage Extra Directive or Comment Triggers
6470

6571
You can add more directive or comment triggers for removal of `'use strict'`. In the following example, `'use babel'` directive or comments that include `'@babel'` or `'@flow'` also instruct the plugin to become active and remove `'use strict'`
72+
6673
```js
6774
let presets = [];
6875

6976
let plugins = [
7077
[
7178
"babel-plugin-transform-not-strict",
7279
{
73-
directiveTriggers: ['use babel'],
74-
commentTriggers: ['@babel', '@flow', '* @babel', '* @flow'],
80+
directiveTriggers: ["use babel"],
81+
commentTriggers: ["@babel", "@flow", "* @babel", "* @flow"],
7582
},
7683
],
7784
];

0 commit comments

Comments
 (0)