Skip to content

Commit addd0a6

Browse files
authored
docs: fix formatting of unordered lists in Markdown (#19660)
1 parent a21b38d commit addd0a6

File tree

73 files changed

+1593
-1592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1593
-1592
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#### Prerequisites checklist
88

9-
- [ ] I have read the [contributing guidelines](https://github.com/eslint/eslint/blob/HEAD/CONTRIBUTING.md).
9+
- [ ] I have read the [contributing guidelines](https://github.com/eslint/eslint/blob/HEAD/CONTRIBUTING.md).
1010

1111
#### What is the purpose of this pull request? (put an "X" next to an item)
1212

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ This project adheres to the [OpenJS Foundation Code of Conduct](https://eslint.o
1010

1111
Before filing an issue, please be sure to read the guidelines for what you're reporting:
1212

13-
- [Report Bugs](https://eslint.org/docs/latest/contribute/report-bugs)
14-
- [Propose a New Rule](https://eslint.org/docs/latest/contribute/propose-new-rule)
15-
- [Propose a Rule Change](https://eslint.org/docs/latest/contribute/propose-rule-change)
16-
- [Request a Change](https://eslint.org/docs/latest/contribute/request-change)
13+
- [Report Bugs](https://eslint.org/docs/latest/contribute/report-bugs)
14+
- [Propose a New Rule](https://eslint.org/docs/latest/contribute/propose-new-rule)
15+
- [Propose a Rule Change](https://eslint.org/docs/latest/contribute/propose-rule-change)
16+
- [Request a Change](https://eslint.org/docs/latest/contribute/request-change)
1717

1818
To report a security vulnerability in ESLint, please use our [create an advisory form](https://github.com/eslint/eslint/security/advisories/new) on GitHub.
1919

README.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and JSHint with a few exceptions:
2222

23-
- ESLint uses [Espree](https://github.com/eslint/js/tree/main/packages/espree) for JavaScript parsing.
24-
- ESLint uses an AST to evaluate patterns in code.
25-
- ESLint is completely pluggable, every single rule is a plugin and you can add more at runtime.
23+
- ESLint uses [Espree](https://github.com/eslint/js/tree/main/packages/espree) for JavaScript parsing.
24+
- ESLint uses an AST to evaluate patterns in code.
25+
- ESLint is completely pluggable, every single rule is a plugin and you can add more at runtime.
2626

2727
## Table of Contents
2828

@@ -87,9 +87,9 @@ export default defineConfig([
8787

8888
The names `"prefer-const"` and `"no-constant-binary-expression"` are the names of [rules](https://eslint.org/docs/rules) in ESLint. The first value is the error level of the rule and can be one of these values:
8989

90-
- `"off"` or `0` - turn the rule off
91-
- `"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code)
92-
- `"error"` or `2` - turn the rule on as an error (exit code will be 1)
90+
- `"off"` or `0` - turn the rule off
91+
- `"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code)
92+
- `"error"` or `2` - turn the rule on as an error (exit code will be 1)
9393

9494
The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](https://eslint.org/docs/latest/use/configure)).
9595

@@ -109,10 +109,10 @@ ESLint adheres to the [OpenJS Foundation Code of Conduct](https://eslint.org/con
109109

110110
Before filing an issue, please be sure to read the guidelines for what you're reporting:
111111

112-
- [Bug Report](https://eslint.org/docs/latest/contribute/report-bugs)
113-
- [Propose a New Rule](https://eslint.org/docs/latest/contribute/propose-new-rule)
114-
- [Proposing a Rule Change](https://eslint.org/docs/latest/contribute/propose-rule-change)
115-
- [Request a Change](https://eslint.org/docs/latest/contribute/request-change)
112+
- [Bug Report](https://eslint.org/docs/latest/contribute/report-bugs)
113+
- [Propose a New Rule](https://eslint.org/docs/latest/contribute/propose-new-rule)
114+
- [Proposing a Rule Change](https://eslint.org/docs/latest/contribute/propose-rule-change)
115+
- [Request a Change](https://eslint.org/docs/latest/contribute/request-change)
116116

117117
## Frequently Asked Questions
118118

@@ -174,32 +174,32 @@ ESLint takes security seriously. We work hard to ensure that ESLint is safe for
174174

175175
ESLint follows [semantic versioning](https://semver.org). However, due to the nature of ESLint as a code quality tool, it's not always clear when a minor or major version bump occurs. To help clarify this for everyone, we've defined the following semantic versioning policy for ESLint:
176176

177-
- Patch release (intended to not break your lint build)
178-
- A bug fix in a rule that results in ESLint reporting fewer linting errors.
179-
- A bug fix to the CLI or core (including formatters).
180-
- Improvements to documentation.
181-
- Non-user-facing changes such as refactoring code, adding, deleting, or modifying tests, and increasing test coverage.
182-
- Re-releasing after a failed release (i.e., publishing a release that doesn't work for anyone).
183-
- Minor release (might break your lint build)
184-
- A bug fix in a rule that results in ESLint reporting more linting errors.
185-
- A new rule is created.
186-
- A new option to an existing rule that does not result in ESLint reporting more linting errors by default.
187-
- A new addition to an existing rule to support a newly-added language feature (within the last 12 months) that will result in ESLint reporting more linting errors by default.
188-
- An existing rule is deprecated.
189-
- A new CLI capability is created.
190-
- New capabilities to the public API are added (new classes, new methods, new arguments to existing methods, etc.).
191-
- A new formatter is created.
192-
- `eslint:recommended` is updated and will result in strictly fewer linting errors (e.g., rule removals).
193-
- Major release (likely to break your lint build)
194-
- `eslint:recommended` is updated and may result in new linting errors (e.g., rule additions, most rule option updates).
195-
- A new option to an existing rule that results in ESLint reporting more linting errors by default.
196-
- An existing formatter is removed.
197-
- Part of the public API is removed or changed in an incompatible way. The public API includes:
198-
- Rule schemas
199-
- Configuration schema
200-
- Command-line options
201-
- Node.js API
202-
- Rule, formatter, parser, plugin APIs
177+
- Patch release (intended to not break your lint build)
178+
- A bug fix in a rule that results in ESLint reporting fewer linting errors.
179+
- A bug fix to the CLI or core (including formatters).
180+
- Improvements to documentation.
181+
- Non-user-facing changes such as refactoring code, adding, deleting, or modifying tests, and increasing test coverage.
182+
- Re-releasing after a failed release (i.e., publishing a release that doesn't work for anyone).
183+
- Minor release (might break your lint build)
184+
- A bug fix in a rule that results in ESLint reporting more linting errors.
185+
- A new rule is created.
186+
- A new option to an existing rule that does not result in ESLint reporting more linting errors by default.
187+
- A new addition to an existing rule to support a newly-added language feature (within the last 12 months) that will result in ESLint reporting more linting errors by default.
188+
- An existing rule is deprecated.
189+
- A new CLI capability is created.
190+
- New capabilities to the public API are added (new classes, new methods, new arguments to existing methods, etc.).
191+
- A new formatter is created.
192+
- `eslint:recommended` is updated and will result in strictly fewer linting errors (e.g., rule removals).
193+
- Major release (likely to break your lint build)
194+
- `eslint:recommended` is updated and may result in new linting errors (e.g., rule additions, most rule option updates).
195+
- A new option to an existing rule that results in ESLint reporting more linting errors by default.
196+
- An existing formatter is removed.
197+
- Part of the public API is removed or changed in an incompatible way. The public API includes:
198+
- Rule schemas
199+
- Configuration schema
200+
- Command-line options
201+
- Node.js API
202+
- Rule, formatter, parser, plugin APIs
203203

204204
According to our policy, any minor update may report more linting errors than the previous release (ex: from a bug fix). As such, we recommend using the tilde (`~`) in `package.json` e.g. `"eslint": "~3.1.0"` to guarantee the results of your builds.
205205

docs/src/about/index.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ ESLint is written using Node.js to provide a fast runtime environment and easy i
1717

1818
Everything is pluggable:
1919

20-
- Rule API is used both by bundled and custom rules.
21-
- Formatter API is used both by bundled and custom formatters.
22-
- Additional rules and formatters can be specified at runtime.
23-
- Rules and formatters don't have to be bundled to be used.
20+
- Rule API is used both by bundled and custom rules.
21+
- Formatter API is used both by bundled and custom formatters.
22+
- Additional rules and formatters can be specified at runtime.
23+
- Rules and formatters don't have to be bundled to be used.
2424

2525
Every rule:
2626

27-
- Is standalone.
28-
- Can be turned off or on (nothing can be deemed "too important to turn off").
29-
- Can be set to a warning or error individually.
27+
- Is standalone.
28+
- Can be turned off or on (nothing can be deemed "too important to turn off").
29+
- Can be set to a warning or error individually.
3030

3131
Additionally:
3232

33-
- Rules are "agenda free" - ESLint does not promote any particular coding style.
34-
- Any bundled rules are generalizable.
33+
- Rules are "agenda free" - ESLint does not promote any particular coding style.
34+
- Any bundled rules are generalizable.
3535

3636
The project:
3737

38-
- Values documentation and clear communication.
39-
- Is as transparent as possible.
40-
- Believes in the importance of testing.
38+
- Values documentation and clear communication.
39+
- Is as transparent as possible.
40+
- Believes in the importance of testing.

docs/src/contribute/architecture/index.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ eleventyNavigation:
1313

1414
At a high level, there are a few key parts to ESLint:
1515

16-
- `bin/eslint.js` - this is the file that actually gets executed with the command line utility. It's a dumb wrapper that does nothing more than bootstrap ESLint, passing the command line arguments to `cli`. This is intentionally small so as not to require heavy testing.
17-
- `lib/api.js` - this is the entry point of `require("eslint")`. This file exposes an object that contains public classes `Linter`, `ESLint`, `RuleTester`, and `SourceCode`.
18-
- `lib/cli.js` - this is the heart of the ESLint CLI. It takes an array of arguments and then uses `eslint` to execute the commands. By keeping this as a separate utility, it allows others to effectively call ESLint from within another Node.js program as if it were done on the command line. The main call is `cli.execute()`. This is also the part that does all the file reading, directory traversing, input, and output.
19-
- `lib/cli-engine/` - this module is `CLIEngine` class that finds source code files and configuration files then does code verifying with the `Linter` class. This includes the loading logic of configuration files, parsers, plugins, and formatters.
20-
- `lib/linter/` - this module is the core `Linter` class that does code verifying based on configuration options. This file does no file I/O and does not interact with the `console` at all. For other Node.js programs that have JavaScript text to verify, they would be able to use this interface directly.
21-
- `lib/rule-tester/` - this module is `RuleTester` class that is a wrapper around Mocha so that rules can be unit tested. This class lets us write consistently formatted tests for each rule that is implemented and be confident that each of the rules work. The RuleTester interface was modeled after Mocha and works with Mocha's global testing methods. RuleTester can also be modified to work with other testing frameworks.
22-
- `lib/source-code/` - this module is `SourceCode` class that is used to represent the parsed source code. It takes in source code and the Program node of the AST representing the code.
23-
- `lib/rules/` - this contains built-in rules that verify source code.
16+
- `bin/eslint.js` - this is the file that actually gets executed with the command line utility. It's a dumb wrapper that does nothing more than bootstrap ESLint, passing the command line arguments to `cli`. This is intentionally small so as not to require heavy testing.
17+
- `lib/api.js` - this is the entry point of `require("eslint")`. This file exposes an object that contains public classes `Linter`, `ESLint`, `RuleTester`, and `SourceCode`.
18+
- `lib/cli.js` - this is the heart of the ESLint CLI. It takes an array of arguments and then uses `eslint` to execute the commands. By keeping this as a separate utility, it allows others to effectively call ESLint from within another Node.js program as if it were done on the command line. The main call is `cli.execute()`. This is also the part that does all the file reading, directory traversing, input, and output.
19+
- `lib/cli-engine/` - this module is `CLIEngine` class that finds source code files and configuration files then does code verifying with the `Linter` class. This includes the loading logic of configuration files, parsers, plugins, and formatters.
20+
- `lib/linter/` - this module is the core `Linter` class that does code verifying based on configuration options. This file does no file I/O and does not interact with the `console` at all. For other Node.js programs that have JavaScript text to verify, they would be able to use this interface directly.
21+
- `lib/rule-tester/` - this module is `RuleTester` class that is a wrapper around Mocha so that rules can be unit tested. This class lets us write consistently formatted tests for each rule that is implemented and be confident that each of the rules work. The RuleTester interface was modeled after Mocha and works with Mocha's global testing methods. RuleTester can also be modified to work with other testing frameworks.
22+
- `lib/source-code/` - this module is `SourceCode` class that is used to represent the parsed source code. It takes in source code and the Program node of the AST representing the code.
23+
- `lib/rules/` - this contains built-in rules that verify source code.
2424

2525
## The `cli` object
2626

@@ -30,17 +30,17 @@ The main method is `cli.execute()`, which accepts an array of strings that repre
3030

3131
This object's responsibilities include:
3232

33-
- Interpreting command line arguments.
34-
- Reading from the file system.
35-
- Outputting to the console.
36-
- Outputting to the filesystem.
37-
- Use a formatter.
38-
- Returning the correct exit code.
33+
- Interpreting command line arguments.
34+
- Reading from the file system.
35+
- Outputting to the console.
36+
- Outputting to the filesystem.
37+
- Use a formatter.
38+
- Returning the correct exit code.
3939

4040
This object may not:
4141

42-
- Call `process.exit()` directly.
43-
- Perform any asynchronous operations.
42+
- Call `process.exit()` directly.
43+
- Perform any asynchronous operations.
4444

4545
## The `CLIEngine` object
4646

@@ -50,16 +50,16 @@ The main method of the `CLIEngine` is `executeOnFiles()`, which accepts an array
5050

5151
This object's responsibilities include:
5252

53-
- Managing the execution environment for `Linter`.
54-
- Reading from the file system.
55-
- Reading configuration information from config files (including `.eslintrc` and `package.json`).
53+
- Managing the execution environment for `Linter`.
54+
- Reading from the file system.
55+
- Reading configuration information from config files (including `.eslintrc` and `package.json`).
5656

5757
This object may not:
5858

59-
- Call `process.exit()` directly.
60-
- Perform any asynchronous operations.
61-
- Output to the console.
62-
- Use formatters.
59+
- Call `process.exit()` directly.
60+
- Perform any asynchronous operations.
61+
- Output to the console.
62+
- Use formatters.
6363

6464
## The `Linter` object
6565

@@ -69,32 +69,32 @@ Once the AST is available, `estraverse` is used to traverse the AST from top to
6969

7070
This object's responsibilities include:
7171

72-
- Inspecting JavaScript code strings.
73-
- Creating an AST for the code.
74-
- Executing rules on the AST.
75-
- Reporting back the results of the execution.
72+
- Inspecting JavaScript code strings.
73+
- Creating an AST for the code.
74+
- Executing rules on the AST.
75+
- Reporting back the results of the execution.
7676

7777
This object may not:
7878

79-
- Call `process.exit()` directly.
80-
- Perform any asynchronous operations.
81-
- Use Node.js-specific features.
82-
- Access the file system.
83-
- Call `console.log()` or any other similar method.
79+
- Call `process.exit()` directly.
80+
- Perform any asynchronous operations.
81+
- Use Node.js-specific features.
82+
- Access the file system.
83+
- Call `console.log()` or any other similar method.
8484

8585
## Rules
8686

8787
Individual rules are the most specialized part of the ESLint architecture. Rules can do very little, they are simply a set of instructions executed against an AST that is provided. They do get some context information passed in, but the primary responsibility of a rule is to inspect the AST and report warnings.
8888

8989
These objects' responsibilities are:
9090

91-
- Inspect the AST for specific patterns.
92-
- Reporting warnings when certain patterns are found.
91+
- Inspect the AST for specific patterns.
92+
- Reporting warnings when certain patterns are found.
9393

9494
These objects may not:
9595

96-
- Call `process.exit()` directly.
97-
- Perform any asynchronous operations.
98-
- Use Node.js-specific features.
99-
- Access the file system.
100-
- Call `console.log()` or any other similar method.
96+
- Call `process.exit()` directly.
97+
- Perform any asynchronous operations.
98+
- Use Node.js-specific features.
99+
- Access the file system.
100+
- Call `console.log()` or any other similar method.

docs/src/contribute/core-rules.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ For full reference information on writing rules, refer to [Custom Rules](../exte
2020

2121
Each core rule in ESLint has three files named with its identifier (for example, `no-extra-semi`).
2222

23-
- in the `lib/rules` directory: a source file (for example, `no-extra-semi.js`).
24-
- in the `tests/lib/rules` directory: a test file (for example, `no-extra-semi.js`).
25-
- in the `docs/src/rules` directory: a Markdown documentation file (for example, `no-extra-semi.md`).
23+
- in the `lib/rules` directory: a source file (for example, `no-extra-semi.js`).
24+
- in the `tests/lib/rules` directory: a test file (for example, `no-extra-semi.js`).
25+
- in the `docs/src/rules` directory: a Markdown documentation file (for example, `no-extra-semi.md`).
2626

2727
**Important:** If you submit a core rule to the ESLint repository, you **must** follow the conventions explained below.
2828

@@ -105,18 +105,18 @@ Performance budget ok: 1443.736547ms (limit: 3409.090909090909ms)
105105

106106
The rule naming conventions for ESLint are as follows:
107107

108-
- Use dashes between words.
109-
- If your rule only disallows something, prefix it with `no-` such as `no-eval` for disallowing `eval()` and `no-debugger` for disallowing `debugger`.
110-
- If your rule is enforcing the inclusion of something, use a short name without a special prefix.
108+
- Use dashes between words.
109+
- If your rule only disallows something, prefix it with `no-` such as `no-eval` for disallowing `eval()` and `no-debugger` for disallowing `debugger`.
110+
- If your rule is enforcing the inclusion of something, use a short name without a special prefix.
111111

112112
## Frozen Rules
113113

114114
When rules are feature complete, they are marked as frozen (indicated with ❄️ in the documentation). Rules are considered feature complete when the intended purpose of the rule has been fully implemented such that it catches 80% or more of expected violations and covers the majority of common exceptions. After that point, we expect users to use [disable comments](../use/configure/rules#using-configuration-comments-1) when they find an edge case that isn't covered.
115115

116116
When a rule is frozen, it means:
117117

118-
- **Bug fixes**: We will still fix confirmed bugs.
119-
- **New ECMAScript features**: We will ensure compatibility with new ECMAScript features, meaning the rule will not break on new syntax.
120-
- **New options**: We will **not** add any new options unless an option is the only way to fix a bug or support a newly-added ECMAScript feature.
118+
- **Bug fixes**: We will still fix confirmed bugs.
119+
- **New ECMAScript features**: We will ensure compatibility with new ECMAScript features, meaning the rule will not break on new syntax.
120+
- **New options**: We will **not** add any new options unless an option is the only way to fix a bug or support a newly-added ECMAScript feature.
121121

122122
If you find that a frozen rule would work better for you with a change, we recommend copying the rule source code and modifying it to fit your needs.

0 commit comments

Comments
 (0)