diff options
author | cjihrig <cjihrig@gmail.com> | 2018-11-09 14:00:16 -0500 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-11-12 14:14:31 -0800 |
commit | d72d43f9bf7b8d8977af15d8bd6e3321264c10ca (patch) | |
tree | 4acb58c9cc519925bfd84272e45d0d243b929dd1 /tools/node_modules/eslint/node_modules/eslint-plugin-markdown/README.md | |
parent | 0229e378e80948428cf7baa7b176939e879497cc (diff) | |
download | android-node-v8-d72d43f9bf7b8d8977af15d8bd6e3321264c10ca.tar.gz android-node-v8-d72d43f9bf7b8d8977af15d8bd6e3321264c10ca.tar.bz2 android-node-v8-d72d43f9bf7b8d8977af15d8bd6e3321264c10ca.zip |
tools: update ESLint to 5.9.0
Update ESLint to 5.9.0.
PR-URL: https://github.com/nodejs/node/pull/24280
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'tools/node_modules/eslint/node_modules/eslint-plugin-markdown/README.md')
-rw-r--r-- | tools/node_modules/eslint/node_modules/eslint-plugin-markdown/README.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/README.md b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/README.md index 749c188323..d096ef57a8 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/README.md +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-markdown/README.md @@ -122,11 +122,42 @@ Sometimes it can be useful to have code blocks marked with `js` even though they console.log("This code block is linted normally."); ``` +## Fix issues automatically + +This plugin can attempt to fix some of the issues automatically using [`fix` ESLint option](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems). This option instructs ESLint to try to fix as many issues as possible. To enable this option you can add `--fix` to your ESLint call, for example: + +```bash +eslint --fix --ext md . +``` + ## Unsatisfiable Rules Since code blocks are not files themselves but embedded inside a Markdown document, some rules do not apply to Markdown code blocks, and messages from these rules are automatically suppressed: - `eol-last` +- `unicode-bom` + +### Strict + +The `strict` rule is technically satisfiable inside of Markdown code blocks, but writing a `"use strict"` directive at the top of every code block is tedious and distracting. We recommend using a [glob pattern override](https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns) for `.md` files to disable `strict` and enable the `impliedStrict` [parser option](https://eslint.org/docs/user-guide/configuring#specifying-parser-options) so the code blocks still parse in strict mode: + +```js +// .eslintrc.json +{ + // ... + "overrides": [{ + "files": ["**/*.md"], + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + }, + "rules": { + "strict": "off" + } + }] +} +``` ## Contributing |