-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"extends" in .remarkrc #183
Comments
Coool! I like this idea, and I definitely see it included in the future. Now, ESLint is a linter, whereas remark is more like esprima, acorn, or others. With that in mind, do you see the whole {
"extends": "my-super-rules",
"output": true
} Or, just the plugins: {
"plugins": {
"extends": "my-super-rules",
},
"output": true
} Or, just remark-lint: {
"plugins": {
"lint": {
"extends": "my-super-rules"
}
},
"output": true
} Note that something like this already works, by using |
Hey @wooorm, glad that you like the suggestion! I haven't been using There's probably one more thing one can do in the meantime: to simply make |
@wooorm I think it would be cool to be able |
Small update: I’ve decided to go with Here’s an example using presets: {
"presets": [
"lint-recommended" // remark-preset-lint-recommended
],
// completely optional overwriting of options:
"plugins": {
"lint": {
"bullet": "*"
}
}
} Where {
"plugins": {
"lint": {
"finalNewline": true,
// ...
}
}
} If the user installed Thus, they’re basically sharable configs, but the mental model of Babel fits better than ESLint. For now I’m writing some tests and stuff. Hope to do a proper release this/next week. |
This comment was marked as resolved.
This comment was marked as resolved.
Locking and hiding to keep the discussion clean. |
Hey guys,
I discovered
remark
after having some experience witheslint
and I quite like the fact that these two tools share some ideas. Because of the resulting similarity, I expected to see one feature inremark
, but I could not find it. It is about.remarkrc
inheritance.In
eslint
people often rely on some shared config, such as one by airbnb. It is possible create your own base config on top of something common and use it in all new projects:cd new-project npm install --save eslint-config-my-super-rules
new-project/.eslintrc
:When a team decides to follow a new
.eslint
rule, someone just updateseslint-config-my-super-rules
(a central node module) and then others justnpm update
inside the dependent projects. This way it is much easier to stay organized in a team because no eslint rules are project-specific.The same approach could be used with remark linter (or other remark plugins):
cd new-project npm install --save remark-config-my-super-rules
new-project/.remarkrc
:When all remark-linter rules are shared across multiple projects, there is less debate on how
*.md
should look like in each individual case. If a team is not happy with the current state of things, a rule is added or removed in a single source of truth for remark and everyone is happy again.How feasible would be to add something like this to remark?
The text was updated successfully, but these errors were encountered: