Open
Description
Is your feature request related to a problem? Please describe.
Today's tools are characterized by a much better style of configuration file
It's much more extensible and supports things like defaultSeverity
and presets that load before its own configuration
Describe the solution you'd like
We will rewrite the configuration in eslint
-style, see #279 (comment)
TODOs
- rewrite rules (feat: new configuration structure #445 merged)
- update docu (docs: documentation for new configuration structure #447 merged)
- move rules into attribute
"rules": { /* ... */ }
(feat: move rules into dedicated attribute #476 merged) - parse inline rules with options (extracted to Improve parsing of inline rules #503)
- add attribute
"extends"
(feat: add config attribute extends #489 in review)- define value
"htmlhint:recommended"
- define value
- add attribute
"defaultSeverity"
(is this still needed? 🤔)
this could be done after release 1.0.0 - add attribute
"exclude"
(extracted to Exclusible files via configuration #502)
this could be done after release 1.0.0
Old proposal
We should rewrite the configuration file into something like this:
{
"extends": ["htmlhint:recommended"],
"defaultSeverity": "error",
"htmlVersion": "html5",
"rules": {
"attr-no-duplication": true,
"attr-unsafe-chars": true,
"attr-value-double-quotes": true,
"doctype-first": false,
"doctype-html5": true,
"id-class-ad-disabled": true,
"id-class-value": ["dash", { "severity": "warning" }],
"id-unique": true,
"inline-style-disabled": false,
"space-tab-mixed-disabled": ["tab", { "severity": "warning" }],
"spec-char-escape": true,
"src-not-empty": true,
"style-disabled": [true, { "severity": "warning" }],
"tag-pair": true,
"tag-self-close": false,
"tagname-lowercase": [
true,
{
"exceptions": ["linearGradient"]
}
],
"title-require": true,
"stylelint": [
true,
{
"extends": "stylelint-config-standard",
"rules": {
"block-no-empty": null,
"color-no-invalid-hex": true
}
}
],
"eslint": [
true,
{
"configFile": "./.eslintrc.json"
}
]
},
"exclude": ["test/**/*.html"]
}