remarkjs/remark-lint (remark-preset-lint-consistent)
### [`v6.0.0`](https://togithub.com/remarkjs/remark-lint/releases/tag/6.0.0)
[Compare Source](https://togithub.com/remarkjs/remark-lint/compare/639271aed95fa579623f385bade4939a9c70e959...6.0.0)
Hi! đź‘‹
With 6.0.0, rules are no longer in the `remark-lint` package. In fact, remark lint doesn’t do much, other than controlling [messages](https://togithub.com/wooorm/remark-lint#configuring-remark-lint).
Rules are now each in their own [package](https://togithub.com/wooorm/remark-lint/tree/master/packages). You don’t have to `npm install` and `.use()` each package though, you can install and use [presets](https://togithub.com/wooorm/remark-lint#list-of-presets) instead. If you find yourself installing many rules to update, maybe create a preset too?
By giving more power to presets over the remark-lint package itself, I think rules, especially external rules, will prosper!
First off, if “presets” changed, the below diff shows how you can update:
```diff
"dependencies": {
"remark-cli": "^0.0.0",
"remark-lint": "^0.0.0",
"remark-preset-lint-consistent": "^0.0.0",
// ...
},
"remarkConfig": {
- "presets": ["lint-consistent"]
+ "plugins": ["preset-lint-consistent"]
}
```
Second, if you used `remark-lint` directly, you need to change your config as follows.
```diff
"dependencies": {
"remark-cli": "^0.0.0",
"remark-lint": "^0.0.0",
+ "remark-lint-unordered-list-marker-style": "^0.0.0",
+ "remark-lint-list-item-bullet-indent": "^0.0.0",
+ "remark-lint-no-multiple-toplevel-headings": "^0.0.0",
+ "remark-lint-maximum-line-length": "^0.0.0",
+ "remark-lint-maximum-heading-length": "^0.0.0",
+ "remark-lint-no-tabs": "^0.0.0",
// ...
},
"remarkConfig": {
- "plugins": {
- "remark-lint": {
- "unordered-list-marker-style": "consistent",
- "list-item-bullet-indent": true,
- "no-multiple-toplevel-headings": true,
- "maximum-line-length": 9000,
- "maximum-heading-length": 300,
- "no-tabs": true,
- // ...
- }
+ "plugins": [
+ "remark-lint",
+ ["remark-lint-unordered-list-marker-style", "consistent"],
+ "remark-lint-list-item-bullet-indent",
+ "remark-lint-no-multiple-toplevel-headings",
+ ["remark-lint-maximum-line-length", 9000],
+ ["remark-lint-maximum-heading-length", 300],
+ "remark-lint-no-tabs",
+ // ...
+ ]
```
Finally, if you use remark on the API, change your code as follows:
```diff
var remark = require('remark');
var lint = require('remark-lint');
+var unorderedListMarkerStyle = require('remark-lint-unordered-list-marker-style');
+var listItemBulletIndent = require('remark-lint-list-item-bullet-indent');
+var noMultipleToplevelHeadings = require('remark-lint-no-multiple-toplevel-headings');
remark()
- .use(lint, {
- unorderedListMarkerStyle: 'consistent',
- listItemBulletIndent: true,
- noMultipleToplevelHeadings: true
- maximumLineLength: false
- })
+ .use(lint)
+ .use(unorderedListMarkerStyle, 'consistent')
+ .use(listItemBulletIndent)
+ .use(noMultipleToplevelHeadings)
// ...
```
Configuration
đź“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
đź‘» Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^5.0.0
->^6.0.0
^6.0.0
->^7.0.0
Release Notes
remarkjs/remark-lint (remark-preset-lint-consistent)
### [`v6.0.0`](https://togithub.com/remarkjs/remark-lint/releases/tag/6.0.0) [Compare Source](https://togithub.com/remarkjs/remark-lint/compare/639271aed95fa579623f385bade4939a9c70e959...6.0.0) Hi! 👋 With 6.0.0, rules are no longer in the `remark-lint` package. In fact, remark lint doesn’t do much, other than controlling [messages](https://togithub.com/wooorm/remark-lint#configuring-remark-lint). Rules are now each in their own [package](https://togithub.com/wooorm/remark-lint/tree/master/packages). You don’t have to `npm install` and `.use()` each package though, you can install and use [presets](https://togithub.com/wooorm/remark-lint#list-of-presets) instead. If you find yourself installing many rules to update, maybe create a preset too? By giving more power to presets over the remark-lint package itself, I think rules, especially external rules, will prosper! First off, if “presets” changed, the below diff shows how you can update: ```diff "dependencies": { "remark-cli": "^0.0.0", "remark-lint": "^0.0.0", "remark-preset-lint-consistent": "^0.0.0", // ... }, "remarkConfig": { - "presets": ["lint-consistent"] + "plugins": ["preset-lint-consistent"] } ``` Second, if you used `remark-lint` directly, you need to change your config as follows. ```diff "dependencies": { "remark-cli": "^0.0.0", "remark-lint": "^0.0.0", + "remark-lint-unordered-list-marker-style": "^0.0.0", + "remark-lint-list-item-bullet-indent": "^0.0.0", + "remark-lint-no-multiple-toplevel-headings": "^0.0.0", + "remark-lint-maximum-line-length": "^0.0.0", + "remark-lint-maximum-heading-length": "^0.0.0", + "remark-lint-no-tabs": "^0.0.0", // ... }, "remarkConfig": { - "plugins": { - "remark-lint": { - "unordered-list-marker-style": "consistent", - "list-item-bullet-indent": true, - "no-multiple-toplevel-headings": true, - "maximum-line-length": 9000, - "maximum-heading-length": 300, - "no-tabs": true, - // ... - } + "plugins": [ + "remark-lint", + ["remark-lint-unordered-list-marker-style", "consistent"], + "remark-lint-list-item-bullet-indent", + "remark-lint-no-multiple-toplevel-headings", + ["remark-lint-maximum-line-length", 9000], + ["remark-lint-maximum-heading-length", 300], + "remark-lint-no-tabs", + // ... + ] ``` Finally, if you use remark on the API, change your code as follows: ```diff var remark = require('remark'); var lint = require('remark-lint'); +var unorderedListMarkerStyle = require('remark-lint-unordered-list-marker-style'); +var listItemBulletIndent = require('remark-lint-list-item-bullet-indent'); +var noMultipleToplevelHeadings = require('remark-lint-no-multiple-toplevel-headings'); remark() - .use(lint, { - unorderedListMarkerStyle: 'consistent', - listItemBulletIndent: true, - noMultipleToplevelHeadings: true - maximumLineLength: false - }) + .use(lint) + .use(unorderedListMarkerStyle, 'consistent') + .use(listItemBulletIndent) + .use(noMultipleToplevelHeadings) // ... ```Configuration
đź“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
đź‘» Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate. View repository job log here.