eslint-plugin-ejs

0.0.2 • Public • Published

eslint-plugin-ejs

Parses out ejs declarations found in js and jsx files. Primarily designed for Redux CLI for parsing ejs syntax.

For example if you have a file like below, eslint will not be able to parse it normally due to the ejs markers. With this plugin, the linter is able to work normally. Note that whatever is inside the markers will remain.

import React from 'react'
 
type Props = {
 
};
export class <%= pascalEntityName %> extends React.Component {
  props: Props;
 
  render () {
    return (
      <div></div>
    )
  }
}
 
export default <%= pascalEntityName %>

Installation

You'll first need to install ESLint:

$ npm install eslint --save-dev

Next, install eslint-plugin-ejs:

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

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

Usage

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

{
    "plugins": [
        "ejs"
    ]
}

Tests

$ npm test

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    1,545
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    1,545
  • 0.0.1
    0

Package Sidebar

Install

npm i eslint-plugin-ejs

Weekly Downloads

1,545

Version

0.0.2

License

Apache

Last publish

Collaborators

  • jtmthf