eslint-plugin-amo

ESLint plugin for AMO.
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-amo
:
$ npm install eslint-plugin-amo --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must
also install eslint-plugin-amo
globally.
Usage
Add amo
to the plugins section of your .eslintrc
configuration file. You can
omit the eslint-plugin-
prefix:
{
"plugins": [
"amo"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"amo/rule-name": 2
}
}
Rules
i18n-no-tagged-templates
Ensure no template literal tags are passed to i18n methods:
i18n.gettext(oneLine`Hello,
world`);
i18n.gettext(`Hello,
world`);
Contributing
Install the project dependencies:
npm install
Run the test suite:
npm test
New rules can be added with the ESLint generator for
Yeoman:
yo eslint:rule
Note: we do not use the generated documentation files.
For further information, please see the CONTRIBUTING.md
file.
License
eslint-plugin-amo is released under the Mozilla Public License Version 2.0. See
the bundled LICENSE file for details.