mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Add style/prettier.json (fixes #592).
This commit is contained in:
parent
cedbdbaaf1
commit
82a5de0821
4 changed files with 34 additions and 4 deletions
|
|
@ -1,8 +1,12 @@
|
||||||
# Using markdownlint with Prettier
|
# Using markdownlint with Prettier
|
||||||
|
|
||||||
[`Prettier`](https://prettier.io) is a popular code formatter. For the most part,
|
[`Prettier`](https://prettier.io) is a popular code formatter.
|
||||||
it works seamlessly with `markdownlint`. Special situations are documented
|
For the most part, Prettier works seamlessly with `markdownlint`.
|
||||||
below.
|
|
||||||
|
You can extend the `markdownlint/style/prettier.json` style to disable all
|
||||||
|
markdownlint rules that overlap with Prettier.
|
||||||
|
|
||||||
|
Special situations when not extending `prettier.json` are documented below.
|
||||||
|
|
||||||
## List item indentation
|
## List item indentation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
"./helpers": "./helpers/helpers.js",
|
"./helpers": "./helpers/helpers.js",
|
||||||
"./style/all": "./style/all.json",
|
"./style/all": "./style/all.json",
|
||||||
"./style/cirosantilli": "./style/cirosantilli.json",
|
"./style/cirosantilli": "./style/cirosantilli.json",
|
||||||
|
"./style/prettier": "./style/prettier.json",
|
||||||
"./style/relaxed": "./style/relaxed.json"
|
"./style/relaxed": "./style/relaxed.json"
|
||||||
},
|
},
|
||||||
"types": "./lib/markdownlint.d.ts",
|
"types": "./lib/markdownlint.d.ts",
|
||||||
|
|
|
||||||
25
style/prettier.json
Normal file
25
style/prettier.json
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"comment": "Disables rules that may conflict with Prettier",
|
||||||
|
"blanks-around-fences": false,
|
||||||
|
"blanks-around-headings": false,
|
||||||
|
"blanks-around-lists": false,
|
||||||
|
"code-fence-style": false,
|
||||||
|
"emphasis-style": false,
|
||||||
|
"heading-start-left": false,
|
||||||
|
"hr-style": false,
|
||||||
|
"line-length": false,
|
||||||
|
"list-indent": false,
|
||||||
|
"list-marker-space": false,
|
||||||
|
"no-blanks-blockquote": false,
|
||||||
|
"no-hard-tabs": false,
|
||||||
|
"no-missing-space-atx": false,
|
||||||
|
"no-missing-space-closed-atx": false,
|
||||||
|
"no-multiple-blanks": false,
|
||||||
|
"no-multiple-space-atx": false,
|
||||||
|
"no-multiple-space-blockquote": false,
|
||||||
|
"no-multiple-space-closed-atx": false,
|
||||||
|
"no-trailing-spaces": false,
|
||||||
|
"ol-prefix": false,
|
||||||
|
"strong-style": false,
|
||||||
|
"ul-indent": false
|
||||||
|
}
|
||||||
|
|
@ -431,7 +431,7 @@ test("enableTagMixedCase", (t) => new Promise((resolve) => {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
test("styleFiles", (t) => new Promise((resolve) => {
|
test("styleFiles", (t) => new Promise((resolve) => {
|
||||||
t.plan(7);
|
t.plan(9);
|
||||||
fs.readdir("./style", function readdir(err, files) {
|
fs.readdir("./style", function readdir(err, files) {
|
||||||
t.falsy(err);
|
t.falsy(err);
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue