0.1.2 • Published 1 year ago

pineglade-bemlinter v0.1.2

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

pineglade-bemlinter npm version

Pure function and posthtml plugin for linting a bem html. Fork of gulp-html-bemlinter.

Additions:

  • Support modifier option (default value is --).
  • No flood on success.

Usage

First, install pineglade-bemlinter as a development dependency:

npm i --DE pineglade-bemlinter

Then, add it to your posthtml.config.js:

const { getPosthtmlBemLinter } = require('pineglade-bemlinter');

module.exports = {
  plugins: [
    getPosthtmlBemLinter({
      getSourceName: (filename) => filename,
      log: console,
      modifier: '--'
    })
  ]
};

(There are default values of optional params getSourceName, log and modifier in this example.)

Or use function lintBem in pure Node:

const { lintBem } = require('pineglade-bemlinter');

// ...

lintBem({
  name,
  content,
  log: console,
  modifier: '--'
});

(There are default values of optional params log and modifier in this example.)

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago