Recommended Eslint configs for Polymer
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-polymer
:
$ npm install eslint-plugin-polymer --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-polymer
globally.
Add polymer
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"extends": ["plugin:polymer/polymer-3"],
"plugins": ["polymer"]
}
{
"extends": ["plugin:polymer/polymer-2"],
"plugins": ["polymer"]
}
{
"extends": ["plugin:polymer/polymer-1"],
"plugins": ["polymer"]
}