Skip to content

Commit e55a7b3

Browse files
authored
docs: fix typos and improve clarity in README.md (#281)
1 parent 76ddc0d commit e55a7b3

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

README.md

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
# eslint-webpack-plugin
1414

15-
> This version of eslint-webpack-plugin only works with webpack 5. For the webpack 4, see the [2.x branch](https://github.com/webpack-contrib/eslint-webpack-plugin/tree/2.x).
15+
> This version of eslint-webpack-plugin only supports webpack 5. For the webpack 4, see the [2.x branch](https://github.com/webpack-contrib/eslint-webpack-plugin/tree/2.x).
1616
17-
This plugin uses [`eslint`](https://eslint.org/) to find and fix problems in your JavaScript code
17+
This plugin uses [`ESlint`](https://eslint.org/) to find and fix problems in your JavaScript code during the Webpack build process.
1818

1919
## Getting Started
2020

@@ -56,7 +56,7 @@ or
5656
pnpm add -D eslint
5757
```
5858

59-
Then add the plugin to your webpack config. For example:
59+
Then add the plugin to your webpack configuration. For example:
6060

6161
```js
6262
const ESLintPlugin = require('eslint-webpack-plugin');
@@ -70,17 +70,17 @@ module.exports = {
7070

7171
## Options
7272

73-
You can pass [eslint options](https://eslint.org/docs/developer-guide/nodejs-api#-new-eslintoptions).
73+
You can pass [ESLint Node.js API options](https://eslint.org/docs/developer-guide/nodejs-api#-new-eslintoptions).
7474

7575
> [!NOTE]
7676
>
7777
> The config option you provide will be passed to the `ESLint` class.
7878
> This is a different set of options than what you'd specify in `package.json` or `.eslintrc`.
79-
> See the [eslint docs](https://eslint.org/docs/developer-guide/nodejs-api#-new-eslintoptions) for more details.
79+
> See the [ESlint docs](https://eslint.org/docs/developer-guide/nodejs-api#-new-eslintoptions) for more details.
8080
8181
> [!WARNING]
8282
>
83-
> In eslint-webpack-plugin version 1 the options were passed to the now deprecated [CLIEngine](https://eslint.org/docs/developer-guide/nodejs-api#cliengine).
83+
> In eslint-webpack-plugin version 1 the options were passed to the now-deprecated [CLIEngine](https://eslint.org/docs/developer-guide/nodejs-api#cliengine).
8484
8585
### `cache`
8686

@@ -133,7 +133,7 @@ type context = string;
133133

134134
- Default: `compiler.context`
135135

136-
A string indicating the root of your files.
136+
Base directory for linting.
137137

138138
### `eslintPath`
139139

@@ -145,7 +145,8 @@ type eslintPath = string;
145145

146146
- Default: `eslint`
147147

148-
Path to `eslint` instance that will be used for linting. If the `eslintPath` is a folder like a official eslint, or specify a `formatter` option. now you don't have to install `eslint`.
148+
Path to `eslint` instance that will be used for linting.
149+
If the `eslintPath` is a folder like a official ESlint, or specify a `formatter` option, now you don't have to install `eslint`.
149150

150151
### `extensions`
151152

@@ -157,7 +158,7 @@ type extensions = string | Array<string>;
157158

158159
- Default: `'js'`
159160

160-
Specify extensions that should be checked.
161+
Specify file extensions that should be checked.
161162

162163
### `exclude`
163164

@@ -169,7 +170,7 @@ type exclude = string | Array<string>;
169170

170171
- Default: `'node_modules'`
171172

172-
Specify the files and/or directories to exclude. Must be relative to `options.context`.
173+
Specify the files/directories to exclude. Must be relative to `options.context`.
173174

174175
### `resourceQueryExclude`
175176

@@ -209,7 +210,7 @@ type fix = boolean;
209210

210211
Will enable [ESLint autofix feature](https://eslint.org/docs/developer-guide/nodejs-api#-eslintoutputfixesresults).
211212

212-
**Be careful: this option will change source files.**
213+
**Be careful: this option will modify source files.**
213214

214215
### `formatter`
215216

@@ -224,7 +225,8 @@ type formatter = string| (
224225
225226
- Default: `'stylish'`
226227
227-
Accepts a function that will have one argument: an array of eslint messages (object). The function must return the output as a string. You can use official [eslint formatters](https://eslint.org/docs/user-guide/formatters/).
228+
Accepts a function that receives an array of ESLint messages (object) as its argument and must return a string as output.
229+
You can use official [ESlint formatters](https://eslint.org/docs/user-guide/formatters/).
228230
229231
### `lintDirtyModulesOnly`
230232
@@ -236,7 +238,7 @@ type lintDirtyModulesOnly = boolean;
236238

237239
- Default: `false`
238240

239-
Lint only changed files, skip lint on start.
241+
Lint only changed files, skipping initial lint on build start.
240242

241243
### `threads`
242244

@@ -289,7 +291,7 @@ type failOnError = boolean;
289291

290292
- Default: `true`
291293

292-
Will cause the module build to fail if there are any errors, to disable set to `false`.
294+
Will cause the module build to fail if any errors are found, to disable set to `false`.
293295

294296
#### `failOnWarning`
295297

@@ -301,7 +303,7 @@ type failOnWarning = boolean;
301303

302304
- Default: `false`
303305

304-
Will cause the module build to fail if there are any warnings, if set to `true`.
306+
Will cause the module build to fail if any warnings are found, if set to `true`.
305307

306308
#### `quiet`
307309

@@ -338,16 +340,23 @@ type outputReport =
338340

339341
- Default: `false`
340342

341-
Write the output of the errors to a file, for example a checkstyle xml file for use for reporting on Jenkins CI.
343+
Write ESLint results to a file, for example a checkstyle xml file for use for reporting on Jenkins CI.
342344

343-
The `filePath` is an absolute path or relative to the webpack config: `output.path`.
344-
You can pass in a different `formatter` for the output file,
345-
if none is passed in the default/configured formatter will be used.
345+
- filePath: Path to output report file (relative to output.path or absolute).
346+
- formatter: You can pass in a different `formatter` for the output file.
347+
if none is passed in the default/configured formatter will be used.
346348

347349
## Changelog
348350

349351
[Changelog](CHANGELOG.md)
350352

353+
## Contributing
354+
355+
We welcome all contributions!
356+
If you're new here, please take a moment to review our contributing guidelines.
357+
358+
[CONTRIBUTING](./.github/CONTRIBUTING.md)
359+
351360
## License
352361

353362
[MIT](./LICENSE)

0 commit comments

Comments
 (0)