0.1.12 • Published 1 year ago

@factorial/stack-html v0.1.12

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@factorial/stack-html

This is the HTML plugin for @factorial/stack-core.

It adds a lint task using https://html-validate.org/.

Installation

You can install it via:

yarn factorial init

or manually via:

yarn add @factorial/stack-html

Make sure it is added to your .factorialrc.js like this:

// .factorialrc.js

module.exports = {
  use: [require("@factorial/stack-html")],
};

And add a .htmlvalidate.js:

// .htmlvalidate.js

const htmlValidateConfig = require("@factorial/stack-html").htmlValidate;

module.exports = htmlValidateConfig;

Extending or overwriting linting rules

If you need to extend or overwrite the linting rules, you can do that like this:

const htmlValidateConfig = require("@factorial/stack-html").htmlValidate;
const deepMerge = require("deepmerge");

module.exports = deepMerge(htmlValidateConfig, {
  rules: {
    …
  },
});

Default configuration

This package uses the html-validate:recommended ruleset of html-validate with the following overwrites:

{
  "no-inline-style": 0,
  "no-trailing-whitespace": 0
}

folder

By default, html-validate will lint all html files in your rootFolder using this glob: **/*.html. If you do not want that, you can pass files to this package:

// .factorialrc.js

module.exports = {
  use: [
    [
      require("@factorial/stack-html"),
      {
        files: "some/other/glob/**/*.html",
      },
    ],
  ],
};
0.1.12

1 year ago

0.1.10

2 years ago

0.1.11

1 year ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.4

3 years ago

0.1.5

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago