Socket
Socket
Sign inDemoInstall

eslint-plugin-microtemplates

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-microtemplates

ESLint plugin for linting Resig-style microtemplate strings.


Version published
Weekly downloads
91
decreased by-12.5%
Maintainers
1
Install size
82.0 kB
Created
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

FAQs

Last updated on 05 Mar 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc