@@ -255,11 +255,9 @@ my-awesome-project # project root
255
255
` ` `
256
256
257
257
> 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.
263
261
264
262
` ` ` yaml
265
263
#...
@@ -329,28 +327,28 @@ reviews:
329
327
330
328
# ### Using custom package
331
329
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
333
331
can add the package name to the `packages` field in the `.coderabbit.yml` file.
334
332
335
333
Requirements for a package :
336
334
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 :
340
338
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
+ ` ` `
348
346
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.
352
350
353
- - package name should be in the format `organization/repository`
351
+ - Name should be in the format `organization/repository`
354
352
355
353
` ` ` yaml
356
354
#...
@@ -382,7 +380,7 @@ Below are examples of `ast-grep` rules in different languages:
382
380
383
381
# ### JavaScript
384
382
385
- ** Importing files without an extension is not allowed**
383
+ # #### Importing files without an extension is not allowed
386
384
387
385
` ` ` yaml
388
386
id: find-import-file
@@ -403,7 +401,7 @@ rule:
403
401
regex: "^import$"
404
402
` ` `
405
403
406
- ** No console.log allowed except `console.error` on the catch block**
404
+ # #### No console.log allowed except `console.error` on the catch block
407
405
408
406
` ` ` yaml
409
407
id: no-console-except-error
0 commit comments