diff --git a/docs/user-guide/README.md b/docs/user-guide/README.md index d06263caa..8a7f2b5cb 100644 --- a/docs/user-guide/README.md +++ b/docs/user-guide/README.md @@ -47,12 +47,12 @@ module.exports = { See [the rule list](../rules/README.md) to get the `extends` & `rules` that this plugin provides. :::warning Reporting rules -By default all rules from **base** and **essential** categories report ESLint errors. Other rules - because they're not covering potential bugs in the application report warnings. What does it mean? By default - nothing, but if you want - you can set up a treshold and break the build after a certain amount of warnings, instead of any. More informations [here](https://eslint.org/docs/user-guide/command-line-interface#handling-warnings). +By default all rules from **base** and **essential** categories report ESLint errors. Other rules - because they're not covering potential bugs in the application - report warnings. What does it mean? By default - nothing, but if you want - you can set up a treshold and break the build after a certain amount of warnings, instead of any. More information [here](https://eslint.org/docs/user-guide/command-line-interface#handling-warnings). ::: -### Running ESLint from command line +### Running ESLint from the command line -If you want to run `eslint` from command line, make sure you include the `.vue` extension using [the `--ext` option](https://eslint.org/docs/user-guide/configuring#specifying-file-extensions-to-lint) or a glob pattern because ESLint targets only `.js` files by default. +If you want to run `eslint` from the command line, make sure you include the `.vue` extension using [the `--ext` option](https://eslint.org/docs/user-guide/configuring#specifying-file-extensions-to-lint) or a glob pattern, because ESLint targets only `.js` files by default. Examples: @@ -65,9 +65,9 @@ eslint "src/**/*.{js,vue}" If you installed [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint) you should have `lint` script added in your `package.json`. That means you can just run `yarn lint` or `npm run lint`. ::: -#### How to use custom parser? +#### How to use a custom parser? -If you want to use custom parsers such as [babel-eslint](https://www.npmjs.com/package/babel-eslint) or [@typescript-eslint/parser](https://www.npmjs.com/package/@typescript-eslint/parser), you have to use `parserOptions.parser` option instead of `parser` option. Because this plugin requires [vue-eslint-parser](https://www.npmjs.com/package/vue-eslint-parser) to parse `.vue` files, so this plugin doesn't work if you overwrote `parser` option. +If you want to use custom parsers such as [babel-eslint](https://www.npmjs.com/package/babel-eslint) or [@typescript-eslint/parser](https://www.npmjs.com/package/@typescript-eslint/parser), you have to use the `parserOptions.parser` option instead of the `parser` option. Because this plugin requires [vue-eslint-parser](https://www.npmjs.com/package/vue-eslint-parser) to parse `.vue` files, this plugin doesn't work if you overwrite the `parser` option. ```diff - "parser": "babel-eslint", @@ -78,16 +78,16 @@ If you want to use custom parsers such as [babel-eslint](https://www.npmjs.com/p } ``` -### How ESLint detects components? +### How does ESLint detect components? -All component-related rules are being applied to code that passes any of the following checks: +All component-related rules are applied to code that passes any of the following checks: * `Vue.component()` expression * `Vue.extend()` expression * `Vue.mixin()` expression * `export default {}` in `.vue` or `.jsx` file -If you however want to take advantage of our rules in any of your custom objects that are Vue components, you might need to use special comment `// @vue/component` that marks object in the next line as a Vue component in any file, e.g.: +However, if you want to take advantage of the rules in any of your custom objects that are Vue components, you might need to use the special comment `// @vue/component` that marks an object in the next line as a Vue component in any file, e.g.: ```js // @vue/component @@ -111,7 +111,7 @@ Vue.component('AsyncComponent', (resolve, reject) => { ### Disabling rules via `` -You can use ``-like HTML comments in `