eslint-plugin-hbs

1.0.3 • Public • Published

eslint-plugin-hbs

Greenkeeper badge npm version Build Status

Provide linting for hbs template literals inside of JavaScript

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-hbs:

$ npm install eslint-plugin-hbs --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-hbs globally.

Usage

Add hbs to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "hbs"
    ]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
      "hbs/check-hbs-template-literals": 2
  }
}

or

  "rules": {
    'hbs/check-hbs-template-literals': [
      'error', 2,
      {'ConfigFile': __dirname + '/.eslint-template-lintrc.json'}
    ],
  }

The plugin will report the number of errors and the first line of the first error. Here's a running example. Left-hand side is the output of eslint from the command-line, right-hand side is vim running with eslint (via syntastic):

Example of in-use

Supported Rules

  • Fill in provided rules here

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    726
    • latest

Version History

Package Sidebar

Install

npm i eslint-plugin-hbs

Weekly Downloads

7,798

Version

1.0.3

License

ISC

Unpacked Size

7.42 kB

Total Files

5

Last publish

Collaborators

  • psbanka