You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/plugin-nodejs/README.md
+32-31Lines changed: 32 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -350,37 +350,6 @@ const args = minimist({
350
350
});
351
351
```
352
352
353
-
## group-require-by-id
354
-
355
-
Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/ff39c5d912d836a25b96772d8045dacb/fa8d8e1ebf8ac5f19a536247536f4bccf4fdac3d). For **ESM** use [`group-imports-by-sources`](https://github.com/coderaiser/putout/tree/master/packages/plugin-group-imports-by-source#readme).
Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/ff39c5d912d836a25b96772d8045dacb/fa8d8e1ebf8ac5f19a536247536f4bccf4fdac3d). For **ESM** use [`esm/group-imports-by-sources`](https://github.com/coderaiser/putout/tree/master/packages/plugin-esm#group-imports-by-source).
390
+
391
+
### ❌ Example of incorrect code
392
+
393
+
```js
394
+
constss=require('../../bb/ss');
395
+
constd=require('../hello');
396
+
constreact=require('react');
397
+
const {lodash} =require('lodash');
398
+
constfs=require('node:fs');
399
+
constb=require('./ss');
400
+
constm=require(x);
401
+
constc=5;
402
+
```
403
+
404
+
### ✅ Example of correct code
405
+
406
+
```js
407
+
constfs=require('node:fs');
408
+
constreact=require('react');
409
+
const {lodash} =require('lodash');
410
+
constss=require('../../bb/ss');
411
+
constd=require('../hello');
412
+
413
+
constb=require('./ss');
414
+
constm=require(x);
415
+
constc=5;
416
+
```
417
+
418
+
418
419
## convert-esm-to-commonjs
419
420
420
421
> **CommonJS** is a module system supported in Node, it provides a `require` function, which can be used to access the `exports` object exposed by another file.
0 commit comments