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: README.md
+19-7
Original file line number
Diff line number
Diff line change
@@ -150,18 +150,30 @@ For [Shareable Configs](https://eslint.org/docs/latest/developer-guide/shareable
150
150
151
151
## 🔧 Configs
152
152
153
-
This plugin provides three configs:
153
+
<!-- begin auto-generated configs list -->
154
154
155
-
| Name | Description |
156
-
| :-- | :-- |
157
-
|`plugin:n/recommended`| Considers both CommonJS and ES Modules. If [`"type":"module"` field](https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff#b023) existed in package.json then it considers files as ES Modules. Otherwise it considers files as CommonJS. In addition, it considers `*.mjs` files as ES Modules and `*.cjs` files as CommonJS. |
158
-
|`plugin:n/recommended-module`| Considers all files as ES Modules. |
159
-
|`plugin:n/recommended-script`| Considers all files as CommonJS. |
155
+
|| Name |
156
+
| :- | :------------------------ |
157
+
| 🟠 |`flat/mixed-esm-and-cjs`|
158
+
| ☑️ |`flat/recommended`|
159
+
| 🟢 |`flat/recommended-module`|
160
+
| ✅ |`flat/recommended-script`|
161
+
| ☑️ |`recommended`|
162
+
| 🟢 |`recommended-module`|
163
+
| ✅ |`recommended-script`|
164
+
165
+
<!-- end auto-generated configs list -->
166
+
167
+
About each config:
168
+
169
+
-`recommended`: Considers both CommonJS and ES Modules. If [`"type":"module"` field](https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff#b023) existed in package.json then it considers files as ES Modules. Otherwise it considers files as CommonJS. In addition, it considers `*.mjs` files as ES Modules and `*.cjs` files as CommonJS.
170
+
-`recommended-module`: Considers all files as ES Modules.
171
+
-`recommended-script`: Considers all files as CommonJS.
160
172
161
173
These preset configs:
162
174
163
175
- enable [no-process-exit](http://eslint.org/docs/rules/no-process-exit) rule because [the official document](https://nodejs.org/api/process.html#process_process_exit_code) does not recommend a use of `process.exit()`.
164
-
- enable plugin rules which are given ✅ in the above table.
176
+
- enable plugin rules indicated by emojis in the [rules table](#-rules).
165
177
- add `{ecmaVersion: 2021}` and etc into `parserOptions`.
0 commit comments