@linthtml/linthtml
Advanced tools
Changelog
v0.5.1
Object.defineProperty
to add attributes
property to AST node and fix a runtime error.Changelog
v0.5.0
Add the rule no-surrounding-whitespace
disallowing the presence of encapsulating whitespace.
For example the following code will report an error:
<p>A simple text with whitespaces before</p>
You can find more informations in the rule doc.
Now, for each file linted, LintHTML will look for a config file in the file local folder.
If a config file is found, LintHTML will use it. If there's no config file LintHTML will check each parent folder and stop once it finds a config file or reaches the HOME
folder.
LintHTML will now report an error if a rule is not correctly activated in the new config format. For example, the following patterns will now print errors in the console.
// Valid string values are "error", "warning" and "off"
"rule-name": "foo"
// Only string, boolean and array are accepted
"rule-name": 1
"rule-name": {}
// If an array is provided, the first value should be a valid string or a boolean
"rule-name": [1, rule_config]
"rule-name": ["foo", rule_config]
"rule-name": [{}]
Remove the possibility to use presets in inline config. This feature was not documented in LintHTML and not available when using the new config format.
Upgrade htmlparser2 and improve outputed AST to extract more informations about nodes, for example now a node element:
All nodes now include a property loc
containing start and end position (line/column).
Thanks to the AST improvements somme rules have been updated to better target the errors locations.
Create some utils functions to check rules config and have unified error messages.
Changelog
v0.5.0-beta.4
Added new rule no-surrounding-whitespace
disallowing the presence of encapsulating whitespace, see rule doc.
Changelog
v0.5.0-beta.3
Now, for each file linted, LintHTML will look for a config file in the file local folder. If there's a config file LintHTML will use it, if there's no config file LintHTML will check each parent and stop once it find a config file or reach the HOME
folder.
Create some utils functions to check rules config and have unified error messages.
Changelog
v0.5.0-beta.2
Improve issues locations for a bunch rules.
Get rig of the peudo rules line to only use the AST tree in all rules.
Changelog
v0.5.0-beta.1
Upgrade htmlparser2 and improve outputed AST. Now a node element:
All nodes now include a property loc
containing start and end position (line/column).
Changelog
v0.4.1
Correct classes extractions to avoid reporting class-style
errors for empty class.
Changelog
v0.4.0
init
commandGive the possiblity to select the output format between JS
, JSON
and YAML
. It's also possible to generate a config file in the legacy format (like HTMLLint) or in the new format (introduced in the v0.3.0).
Inline configs are now working with the new config format introduced in the v0.3.0. Inline config can be used to change a rule config or enable/disable a rule, see the documentation for more informations about inline config usages.
It's now possible to specify a list of list files to ignore using .linthtmlignore
file or ignoreFiles
property in the config file (Documentation page).
focusable-tabindex-style
rule behavior, now this rules report errors if a node has a tabindex greater than 0.
frame
tag are now listed as self closing elements.indent-size
and indent-style
.id-class-style
is now correctly called when id-style
or class-style
are not activated.tag-bans
is now case insensitive, when config is only a single string (same behavior as array config)Changelog
v0.4.0-beta.4
Inline config now work with the new config format.