-
Notifications
You must be signed in to change notification settings - Fork 20
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
CLI: add support for config files #116
Comments
Let me share the big picture in my mind. This The format of eslintrc can be a reference of how this config file should structured. Parser won't be configurable, it's fixed. |
For the user interaction part, how to generate or provide the config file is also something that needs some consideration. |
then rules would be an array {
"rules": [
["un-jsx", "off"]
],
}
to create a default config file
|
Potentially could be something like this (object in the array, rather than array in array):
It's been a while since I looked how eslint handles its config for plugins/etc with extra options: |
more verbose... in any case, it would be nice to have javascript configs |
Verbosity in a config file doesn't necessarily matter all that much if it makes things more explicit/coherent. But I don't have strong opinions either way. Eslint seems to use a straight object for the rule config; but then I don't believe it makes use of ordering there. Technically depending how the object is iterated it can have stable ordering, but that might be too 'hidden away'/unobvious for most users. Perhaps webpack/similar's config patterns are worth modelling on as well. |
i guess the simplest solution would be only javascript config, no json config // wakaru.config.js
import { transformationRules } from "wakaru/unminify"
export default {
transformationRules: transformationRules.filter(rule => {
if (rule.name == "un-jsx") return false
return true
}),
} |
i want to disable some rules for the
wakaru unminify
commandsomething like
wakaru.json
would be similar to .eslintrc.jsonexample: disable the un-jsx rule
continue #113
i guess that transforming
document.createElement
to JSX can be desiredso i would be happy with a
The text was updated successfully, but these errors were encountered: