Skip to content

Commit a16938d

Browse files
committed
docs: optimize docs
1 parent aa9330c commit a16938d

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

docs/rules/filename-naming-convention.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ In addition to the built-in naming conventions, you can also set custom naming p
5252

5353

5454
### Options
55+
5556
#### naming pattern object
57+
5658
You need to specify a different naming pattern for different file. The plugin will only check files you explicitly selected:
5759

5860
```js
@@ -70,7 +72,9 @@ module.exports = {
7072
```
7173

7274
#### rule configuration object
75+
7376
##### `ignoreMiddleExtensions`
77+
7478
If `true`, the rule will ignore the middle extensions of the filename.
7579

7680
In some cases, you may want to ignore the middle extensions of the filename. For example, you want to lint the base name of the config and test/spec files—e.g., `babel.config.js` and `date.test.js`, you can do so by setting the `ignoreMiddleExtensions` option to `true`, and the rule will only validate its base name, in this case the base name will be `babel` and `date`.
@@ -94,5 +98,7 @@ module.exports = {
9498
```
9599

96100
## Further Reading
101+
97102
- [micromatch](https://github.com/micromatch/micromatch)
98103
- [glob](https://en.wikipedia.org/wiki/Glob_(programming))
104+
- [testing glob expression online](https://globster.xyz)

docs/rules/folder-match-with-fex.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ bar/__tests__/foo.test.js
2424
```
2525

2626
### Options
27+
28+
#### naming pattern object
29+
2730
You need to specify a different naming pattern for different file extensions. The plugin will only check files with extensions you explicitly provided:
2831

2932
```js
@@ -41,5 +44,7 @@ module.exports = {
4144
```
4245

4346
## Further Reading
47+
4448
- [micromatch](https://github.com/micromatch/micromatch)
4549
- [glob](https://en.wikipedia.org/wiki/Glob_(programming))
50+
- [testing glob expression online](https://globster.xyz)

docs/rules/folder-naming-convention.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ In addition to the built-in naming conventions, you can also set custom naming p
4545
...
4646
```
4747

48+
**Tip:** To exclude `__tests__` folder in `src`, use the glob expression `src/!(__tests__)/**/` to get the target folders.
49+
4850
### Options
4951

52+
#### naming pattern object
53+
5054
You need to specify a different naming pattern for different folder. The plugin will only check folders you explicitly provided:
5155

5256
```js
@@ -67,3 +71,4 @@ module.exports = {
6771

6872
- [micromatch](https://github.com/micromatch/micromatch)
6973
- [glob](https://en.wikipedia.org/wiki/Glob_(programming))
74+
- [testing glob expression online](https://globster.xyz)

0 commit comments

Comments
 (0)