Overview
The eslint-plugin-lodash-template is an ESLint plugin that supports code checking for John Resig-style micro templates used in projects using Underscore.js and Lodash’s template. It improves the readability of HTML templates and provides support for JavaScript (TypeScript) templates. It also has partial support for EJS.
Features
- Enable ESLint in Underscore.js and Lodash’s templates.
- Find issues specific to template tags.
- Improve readability of HTML templates.
- Enable ESLint both inside and outside the template tag for JavaScript (TypeScript) templates (Experimental feature).
- Partial support for EJS.
Installation
To install the eslint-plugin-lodash-template, you can use npm. Run the following command in your terminal:
npm install eslint-plugin-lodash-template
After installation, you need to create a .eslintrc.* file to configure the rules. You can refer to the documentation for more details on configuring ESLint rules.
Summary
The eslint-plugin-lodash-template is a useful ESLint plugin that provides code checking support for John Resig-style micro templates used in projects using Underscore.js and Lodash’s template. It improves the readability of HTML templates and provides additional features like finding issues specific to template tags and enabling ESLint both inside and outside the template tag for JavaScript (TypeScript) templates. It also has partial support for EJS.