This package provides linting rules for JavaScript.
The rules are based on community standards, with a few extra ones specific to Zestia.
npm install --save-dev @zestia/eslint-config
Add the following to ~/.npmrc
to pull @zestia scoped packages from Github instead of NPM.
@zestia:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<YOUR_GH_TOKEN>
-
Create the following file
.eslintrc.js
, choosing the appropriate ruleset depending on your project:Vanilla JavaScript
module.exports = { extends: '@zestia/eslint-config' };
Ember apps
module.exports = { extends: '@zestia/eslint-config/ember-app' };
Ember addons
module.exports = { extends: '@zestia/eslint-config/ember-addon' };
-
Add the following to
scripts
inpackage.json
"lint:js": "eslint ."
npm run lint:js
eslint:recommended
for minimal recommended defaultseslint-config-standard
for a set of community lint rules around best practices and catching errorseslint-config-prettier
for turning off eslint rules that conflict with prettiereslint-plugin-ember
for ember-specific recommended lint ruleseslint-plugin-n
for linting ember-cli project files (node)eslint-plugin-qunit
for linting testseslint-plugin-no-relative-import-paths
for preferring absolute pathsember-eslint-parser
for linting gjs files