Skip to content

Commit fae76c3

Browse files
committed
add markdownlint rules
1 parent 8040d68 commit fae76c3

File tree

3 files changed

+30
-22
lines changed

3 files changed

+30
-22
lines changed

.markdownlint.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD051": false,
5+
"MD033": false,
6+
"MD024": {
7+
"siblings_only": true
8+
}
9+
}

.markdownlintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.markdownlint.json

docs/guides/review-instructions.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,9 @@ my-awesome-project # project root
255255
```
256256

257257
> Also, you need to add the `rules` and `utils` directories to the
258-
> `.coderabbit.yml` file under `tools.ast-grep` configuration.
259-
260-
> The rules can also be inside a package. If you have a package that contains
261-
> rules, you can add the package name to the `packages` field in the
262-
> `.coderabbit.yml` file.
258+
> `.coderabbit.yml` file under `tools.ast-grep` configuration. The rules can
259+
> also be inside a package. If you have a package that contains rules, you can
260+
> add the package name to the `packages` field in the `.coderabbit.yml` file.
263261

264262
```yaml
265263
#...
@@ -329,28 +327,28 @@ reviews:
329327

330328
#### Using custom package
331329

332-
Let's say that you have a public repository that contains ast-grep rules. You
330+
Let's say that you have a public repository that contains `ast-grep` rules. You
333331
can add the package name to the `packages` field in the `.coderabbit.yml` file.
334332

335333
Requirements for a package:
336334

337-
- should be a public repository
338-
- contains rules that follow the ast-grep rule format
339-
- has the following folder structure:
335+
- It should be a public repository
336+
- It contains rules that follow the `ast-grep` rule format
337+
- It has the following folder structure:
340338

341-
```text
342-
my-awesome-project # project root
343-
|- rules # rule directory
344-
| |- my-rule.yml
345-
|- utils # utils directory
346-
| |- is-literal.yml
347-
```
339+
```text
340+
my-awesome-project # project root
341+
|- rules # rule directory
342+
| |- my-rule.yml
343+
|- utils # utils directory
344+
| |- is-literal.yml
345+
```
348346

349-
**rules** and **utils** directories are keywords, and it should be the same.
350-
Inside each directory, the structure is up to you. You can also have any other
351-
root directories or files beside the two shown above.
347+
`rules` and `utils` directories are keywords, and it should be the same.
348+
Inside each directory, the structure is up to you. You can also have any other
349+
root directories or files beside the two shown above.
352350

353-
- package name should be in the format `organization/repository`
351+
- Name should be in the format `organization/repository`
354352

355353
```yaml
356354
#...
@@ -382,7 +380,7 @@ Below are examples of `ast-grep` rules in different languages:
382380

383381
#### JavaScript
384382

385-
**Importing files without an extension is not allowed**
383+
##### Importing files without an extension is not allowed
386384

387385
```yaml
388386
id: find-import-file
@@ -403,7 +401,7 @@ rule:
403401
regex: "^import$"
404402
```
405403

406-
**No console.log allowed except `console.error` on the catch block**
404+
##### No console.log allowed except `console.error` on the catch block
407405

408406
```yaml
409407
id: no-console-except-error

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy