1.0.3 • Published 3 years ago

eslint-plugin-hbs v1.0.3

Weekly downloads
38,439
License
ISC
Repository
github
Last release
3 years ago

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
1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

4 years ago

0.1.2

5 years ago

0.1.1

6 years ago

0.1.0

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago