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

Skip to content

docs(website): fix heading level inconsistencies #4320

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

Merged
merged 5 commits into from
Dec 20, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/development/architecture/ASTS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
id: asts
title: ASTs
sidebar_label: ASTs
---

## Abstract Syntax Trees (AST)s
# Abstract Syntax Trees (ASTs)

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).
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.
Expand Down Expand Up @@ -43,7 +42,9 @@ ESTree is more broadly used than just for ESLint -- it is the de facto community
ESLint's built-in parser that outputs an `estree`-shaped AST is also a separate package, called **[`espree`]**.

:::note

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).

:::

[astexplorer.net]: https://astexplorer.net
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ slug: /

<!-- end base rule list -->

### Extension Rules
## Extension Rules

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.
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.
Expand Down
10 changes: 7 additions & 3 deletions packages/eslint-plugin/docs/rules/naming-convention.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ There are many different rules that have existed over time, but they have had th

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

### Note - this rule only needs type information in specific cases, detailed below
:::note

This rule only needs type information in specific cases, detailed below.

:::

## Options

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

### `custom`
#### `custom`

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.
Accepts an object with the following properties:

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

### `filter`
#### `filter`

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.

Expand Down
2 changes: 2 additions & 0 deletions packages/eslint-plugin/docs/rules/prefer-readonly.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ You may pass `"onlyInlineLambdas": true` as a rule option within an object to re

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

<!--tabs-->

#### ❌ Incorrect

```ts
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/unbound-method.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const { log } = OtherClass;
log();
```

### Example
## Example

```json
{
Expand Down