Skip to content

Commit 80568f1

Browse files
authored
Update part3d.md
The stylistic rule project team used to provide separate plugins for each language like @stylistic/eslint-plugin-js, but since v5, they have merged them into a single plugin. Those separated plugins would still work but would not receive new features. Please consider migrating to the unified plugin.
1 parent 4e2b19b commit 80568f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/3/en/part3d.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,15 @@ We've added the _js.configs.recommended_ to the top of the configuration array,
275275
Let's continue building the configuration file. Install a [plugin](https://eslint.style/packages/js) that defines a set of code style-related rules:
276276

277277
```bash
278-
npm install --save-dev @stylistic/eslint-plugin-js
278+
npm install --save-dev @stylistic/eslint-plugin
279279
```
280280

281281
Import and enable the plugin, and add these four code style rules:
282282

283283
```js
284284
import globals from 'globals'
285285
import js from '@eslint/js'
286-
import stylisticJs from '@stylistic/eslint-plugin-js' // highlight-line
286+
import stylisticJs from '@stylistic/eslint-plugin' // highlight-line
287287

288288
export default [
289289
{
@@ -303,7 +303,7 @@ export default [
303303
]
304304
```
305305

306-
The [plugins](https://eslint.org/docs/latest/use/configure/plugins) property provides a way to extend ESLint's functionality by adding custom rules, configurations, and other capabilities that are not available in the core ESLint library. We've installed and enabled the _@stylistic/eslint-plugin-js_, which adds JavaScript stylistic rules for ESLint. In addition, rules for indentation, line breaks, quotes, and semicolons have been added. These four rules are all defined in the [Eslint styles plugin](https://eslint.style/packages/js).
306+
The [plugins](https://eslint.org/docs/latest/use/configure/plugins) property provides a way to extend ESLint's functionality by adding custom rules, configurations, and other capabilities that are not available in the core ESLint library. We've installed and enabled the _@stylistic/eslint-plugin_, which adds JavaScript stylistic rules for ESLint. In addition, rules for indentation, line breaks, quotes, and semicolons have been added. These four rules are all defined in the [Eslint styles plugin](https://eslint.style/packages/js).
307307

308308
**Note for Windows users:** The linebreak style is set to _unix_ in the style rules. It is recommended to use Unix-style linebreaks (_\n_) regardless of your operating system, as they are compatible with most modern operating systems and facilitate collaboration when multiple people are working on the same files. If you are using Windows-style linebreaks, ESLint will produce the following errors: <i>Expected linebreaks to be 'LF' but found 'CRLF'</i>. In this case, configure Visual Studio Code to use Unix-style linebreaks by following [this guide](https://stackoverflow.com/questions/48692741/how-can-i-make-all-line-endings-eols-in-all-files-in-visual-studio-code-unix).
309309

@@ -435,7 +435,7 @@ Disabling the no-console rule will allow us to use console.log statements withou
435435
```js
436436
import globals from 'globals'
437437
import js from '@eslint/js'
438-
import stylisticJs from '@stylistic/eslint-plugin-js'
438+
import stylisticJs from '@stylistic/eslint-plugin'
439439

440440
export default [
441441
js.configs.recommended,

0 commit comments

Comments
 (0)