Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use only fenced code blocks #16044

Merged
merged 1 commit into from Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .markdownlint.yml
Expand Up @@ -15,4 +15,5 @@ MD029: false # Ordered list item prefix
MD030: false # Spaces after list markers
MD033: false # Allow inline HTML
MD041: false # First line in file should be a top level header
MD046: false # Code block style
MD046: # Code block style
style: fenced
8 changes: 6 additions & 2 deletions docs/src/developer-guide/development-environment.md
Expand Up @@ -47,11 +47,15 @@ Now, the remote `upstream` points to the upstream source.

[Yeoman](http://yeoman.io) is a scaffold generator that ESLint uses to help streamline development of new rules. If you don't already have Yeoman installed, you can install it via npm:

npm install -g yo
```shell
npm install -g yo
```

Then, you can install the ESLint Yeoman generator:

npm install -g generator-eslint
```shell
npm install -g generator-eslint
```

Please see the [generator documentation](https://github.com/eslint/generator-eslint) for instructions on how to use it.

Expand Down
10 changes: 7 additions & 3 deletions docs/src/developer-guide/source-code.md
Expand Up @@ -14,7 +14,9 @@ ESLint is hosted at [GitHub](https://github.com/eslint/eslint) and uses [Git](ht

If you simply want to create a local copy of the source to play with, you can clone the main repository using this command:

git clone git://github.com/eslint/eslint.git
```shell
git clone git://github.com/eslint/eslint.git
```

If you're planning on contributing to ESLint, then it's a good idea to fork the repository. You can find instructions for forking a repository at [https://help.github.com/articles/fork-a-repo/](https://help.github.com/articles/fork-a-repo/). After forking the ESLint repository, you'll want to create a local copy of your fork.

Expand All @@ -27,8 +29,10 @@ Before you can get started developing, you'll need to have a couple of things in

Once you have a local copy and have Node.JS and npm installed, you'll need to install the ESLint dependencies:

cd eslint
npm install
```shell
cd eslint
npm install
```

Now when you run `eslint`, it will be running your local copy and showing your changes.

Expand Down
12 changes: 9 additions & 3 deletions docs/src/developer-guide/unit-tests.md
Expand Up @@ -14,15 +14,19 @@ Most parts of ESLint have unit tests associated with them. Unit tests are writte

When you first get the source code, you need to run `npm install` once initially to set ESLint for development. Once you've done that, you can run the tests via:

npm test
```shell
npm test
```

This automatically starts Mocha and runs all tests in the `tests` directory. You need only add yours and it will automatically be picked up when running tests.

## Running Individual Tests

If you want to quickly run just one test file, you can do so by running Mocha directly and passing in the filename. For example:

npm run test:cli tests/lib/rules/no-undef.js
```shell
npm run test:cli tests/lib/rules/no-undef.js
```

If you want to run just one or a subset of `RuleTester` test cases, add `only: true` to each test case or wrap the test case in `RuleTester.only(...)` to add it automatically:

Expand Down Expand Up @@ -50,4 +54,6 @@ Running individual tests is useful when you're working on a specific bug and ite

The default timeout for tests in `npm test` is 10000ms. You may change the timeout by providing `ESLINT_MOCHA_TIMEOUT` environment variable, for example:

ESLINT_MOCHA_TIMEOUT=20000 npm test
```shell
ESLINT_MOCHA_TIMEOUT=20000 npm test
```
2 changes: 2 additions & 0 deletions docs/src/pages/rules.md
Expand Up @@ -84,3 +84,5 @@ Rules in ESLint are grouped by type to help you understand their purpose. Each r
}) }}
{%- endfor -%}
{%- endif -%}

{# <!-- markdownlint-disable-file MD046 --> #}
50 changes: 26 additions & 24 deletions docs/src/rules/no-irregular-whitespace.md
Expand Up @@ -32,30 +32,32 @@ This rule is aimed at catching invalid whitespace that is not a normal tab and s

This rule disallows the following characters except where the options allow:

\u000B - Line Tabulation (\v) - <VT>
\u000C - Form Feed (\f) - <FF>
\u00A0 - No-Break Space - <NBSP>
\u0085 - Next Line
\u1680 - Ogham Space Mark
\u180E - Mongolian Vowel Separator - <MVS>
\ufeff - Zero Width No-Break Space - <BOM>
\u2000 - En Quad
\u2001 - Em Quad
\u2002 - En Space - <ENSP>
\u2003 - Em Space - <EMSP>
\u2004 - Three-Per-Em
\u2005 - Four-Per-Em
\u2006 - Six-Per-Em
\u2007 - Figure Space
\u2008 - Punctuation Space - <PUNCSP>
\u2009 - Thin Space
\u200A - Hair Space
\u200B - Zero Width Space - <ZWSP>
\u2028 - Line Separator
\u2029 - Paragraph Separator
\u202F - Narrow No-Break Space
\u205f - Medium Mathematical Space
\u3000 - Ideographic Space
```text
\u000B - Line Tabulation (\v) - <VT>
\u000C - Form Feed (\f) - <FF>
\u00A0 - No-Break Space - <NBSP>
\u0085 - Next Line
\u1680 - Ogham Space Mark
\u180E - Mongolian Vowel Separator - <MVS>
\ufeff - Zero Width No-Break Space - <BOM>
\u2000 - En Quad
\u2001 - Em Quad
\u2002 - En Space - <ENSP>
\u2003 - Em Space - <EMSP>
\u2004 - Three-Per-Em
\u2005 - Four-Per-Em
\u2006 - Six-Per-Em
\u2007 - Figure Space
\u2008 - Punctuation Space - <PUNCSP>
\u2009 - Thin Space
\u200A - Hair Space
\u200B - Zero Width Space - <ZWSP>
\u2028 - Line Separator
\u2029 - Paragraph Separator
\u202F - Narrow No-Break Space
\u205f - Medium Mathematical Space
\u3000 - Ideographic Space
```

## Options

Expand Down