@kitschpatrol/remark-config 4.6.1 → 4.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/readme.md +28 -0
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -76,6 +76,34 @@ remark-config [<file|glob> ...]
|
|
|
76
76
|
|
|
77
77
|
<!-- /cli-help -->
|
|
78
78
|
|
|
79
|
+
## Configuration
|
|
80
|
+
|
|
81
|
+
### Avoiding errors in non-git projects
|
|
82
|
+
|
|
83
|
+
The [remark-validate-links](https://github.com/remarkjs/remark-validate-links) looks for a git remote to validate relative link paths.
|
|
84
|
+
|
|
85
|
+
If your project is not a git repository, you will receive warning from remark via eslint:
|
|
86
|
+
|
|
87
|
+
```txt
|
|
88
|
+
Command failed: git remote -v
|
|
89
|
+
fatal: not a git repository (or any of the parent directories): .git
|
|
90
|
+
eslint(undefined-undefined)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
To fix this, pass the `repository: false` option in your `.remarkrc.js` file:
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
// .remarkrc.js
|
|
97
|
+
import sharedConfig, { overrideRules } from '@kitschpatrol/remark-config'
|
|
98
|
+
|
|
99
|
+
const localConfig = {
|
|
100
|
+
...sharedConfig,
|
|
101
|
+
plugins: overrideRules(sharedConfig.plugins, [['remarkValidateLinks', { repository: false }]]),
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export default localConfig
|
|
105
|
+
```
|
|
106
|
+
|
|
79
107
|
<!-- license -->
|
|
80
108
|
|
|
81
109
|
## License
|