@glimmerx/eslint-plugin
v0.6.8
Published
ESLint Plugin to enable and streamline glimmerx development
Downloads
135
Keywords
Readme
@glimmerx/eslint-plugin
Background
ESLint is an open source JavaScript linting utility.
Introduction
This project exists to provide ESLint rules that either:
- fix issues between inline templates and the core ESLint rules
- Enable enhanced development experience for GlimmerX component authors/maintainers
Installation and Usage
yarn add -D @glimmerx/eslint-plugin
For configuration, ESLint generally uses files named .eslintrc.json
or .eslintrc.js
.
The examples in this README will use js syntax, but you can read the configuration docs for ESLint for information on other formats / methods
To enable the Plugin, you will need to add the @glimmerx
plugin to your list of plugins:
module.exports = {
plugins: [
// ...existing plugins, if any
'@glimmerx'
],
// ...Other configuration settings
}
You will also need to enable any rules in the list of rules present in that same configuration. For example, if you wanted to use the rule @glimmerx/template-vars
:
module.exports = {
plugins: [
// ...existing plugins, if any
'@glimmerx'
],
// ...Other configuration settings
rules: {
'@glimmerx/template-vars': 'error'
}
}
For details on what specific rules do and full configuration options, refer to The Rules Docs
Development
For information on developing ESLint rules, see the ESLint Rule Development Documentation
Testing
Testing is done by mocha and (when possible) uses ESLint's built-in RuleTester
yarn test