Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • html-validate
  • html-validate
  • Issues
  • #111

Add support for .js config file

I'd like to suggest adding support for .htmlvalidate.js files as an alternative to the .json equivalent.

Here's why:

  • JS files have better support for comments, which is great when you want to document why you turned that one rule off.

  • A lot of other linters support JS config files, and it is nice to use the same style/format across all your tools.

  • Shareable htmlvalidate configs are already required to return a JS object, making a JS file the best option, but then it creates fragmentation because they aren't supported in normal config files.

  • JS files can allow for cleaner workflows because you can run scripts on-demand inside of them.

  • I personally have a convoluted setup where I want a config file to work both locally and as a shareable config. Because they can't be the same file type, I either have to build some ugly code to transform between the two formats, or I have to maintain a separate version in each format.

Thanks for the great tool :)

Edited Mar 10, 2021 by Anton
Assignee
Assign to
Time tracking