Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 234be00

Browse files
authored
docs(website): fix heading level inconsistencies (typescript-eslint#4320)
* docs(website): fix heading level inconsistencies * docs(website): fix duplicate title
1 parent 96c023d commit 234be00

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

docs/development/architecture/ASTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
id: asts
3-
title: ASTs
43
sidebar_label: ASTs
54
---
65

7-
## Abstract Syntax Trees (AST)s
6+
# Abstract Syntax Trees (ASTs)
87

98
Parsers such as those in ESLint and TypeScript read in the text of source code and parse it into a standard format they can reason about known as an **Abstract Syntax Tree** (AST).
109
ASTs are called such because although they might contain information on the location of constructs within source code, they are an abstract representation that cares more about the semantic structure.
@@ -43,7 +42,9 @@ ESTree is more broadly used than just for ESLint -- it is the de facto community
4342
ESLint's built-in parser that outputs an `estree`-shaped AST is also a separate package, called **[`espree`]**.
4443

4544
:::note
45+
4646
You can play more with various ASTs such as ESTree on [astexplorer.net] and read more details on their [Wikipedia article](https://en.wikipedia.org/wiki/Abstract_syntax_tree).
47+
4748
:::
4849

4950
[astexplorer.net]: https://astexplorer.net

packages/eslint-plugin/docs/rules/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ slug: /
107107

108108
<!-- end base rule list -->
109109

110-
### Extension Rules
110+
## Extension Rules
111111

112112
In some cases, ESLint provides a rule itself, but it doesn't support TypeScript syntax; either it crashes, or it ignores the syntax, or it falsely reports against it.
113113
In these cases, we create what we call an extension rule; a rule within our plugin that has the same functionality, but also supports TypeScript.

packages/eslint-plugin/docs/rules/naming-convention.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ There are many different rules that have existed over time, but they have had th
99

1010
This rule allows you to enforce conventions for any identifier, using granular selectors to create a fine-grained style guide.
1111

12-
### Note - this rule only needs type information in specific cases, detailed below
12+
:::note
13+
14+
This rule only needs type information in specific cases, detailed below.
15+
16+
:::
1317

1418
## Options
1519

@@ -105,15 +109,15 @@ The `format` option defines the allowed formats for the identifier. This option
105109
Instead of an array, you may also pass `null`. This signifies "this selector shall not have its format checked".
106110
This can be useful if you want to enforce no particular format for a specific selector, after applying a group selector.
107111

108-
### `custom`
112+
#### `custom`
109113

110114
The `custom` option defines a custom regex that the identifier must (or must not) match. This option allows you to have a bit more finer-grained control over identifiers, letting you ban (or force) certain patterns and substrings.
111115
Accepts an object with the following properties:
112116

113117
- `regex` - a string that is then passed into RegExp to create a new regular expression: `new RegExp(regex)`
114118
- `match` - true if the identifier _must_ match the `regex`, false if the identifier _must not_ match the `regex`.
115119

116-
### `filter`
120+
#### `filter`
117121

118122
The `filter` option operates similar to `custom`, accepting the same shaped object, except that it controls if the rest of the configuration should or should not be applied to an identifier.
119123

packages/eslint-plugin/docs/rules/prefer-readonly.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ You may pass `"onlyInlineLambdas": true` as a rule option within an object to re
6464

6565
Example of code for the `{ "onlyInlineLambdas": true }` options:
6666

67+
<!--tabs-->
68+
6769
#### ❌ Incorrect
6870

6971
```ts

packages/eslint-plugin/docs/rules/unbound-method.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const { log } = OtherClass;
9494
log();
9595
```
9696

97-
### Example
97+
## Example
9898

9999
```json
100100
{

0 commit comments

Comments
 (0)