Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

eslint-plugin-microtemplates

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

eslint-plugin-microtemplates

ESLint plugin for linting Resig-style microtemplate strings.

    0.2.0latest

Version published
Maintainers
1
Yearly downloads
7,472
increased by68.71%

Weekly downloads

Readme

Source

eslint-plugin-microtemplates

Build Status npm npm GitHub license Join the chat at https://gitter.im/platinumazure/eslint-plugin-microtemplates

ESLint plugin for linting Resig-style microtemplate strings.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-microtemplates:

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

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

Usage

Basic Configuration

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

{ "plugins": [ "microtemplates" ] }

You should also ensure ESLint will process HTML files. This can be done on the cli or in the CLIEngine API.

CLI:

$> eslint --ext .js,.htm,.html <options> <paths>

CLIEngine:

var CLIEngine = require("eslint").CLIEngine; var engine = new CLIEngine({ extensions: [".js", ".htm", ".html"], // etc. });

Avoiding False Positives

You will want to configure ESLint to avoid common false positives. This might mean creating a separate config file for microtemplate use.

Here are some rules that may be worth disabling for microtemplates:

{ "rules": { "no-undef": 0 } }

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc