Defines global linting rules for all debitoor projects


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
28Nov 30, 2020Oct 11, 2016Minified + gzip package size for @debitoor/eslint-config-debitoor in KB



npm version Build Status

Defines global linting rules for all debitoor projects


npm i -DE mocha-eslint  @debitoor/eslint-config-debitoor
echo "require('mocha-eslint')(['.']);" > test/eslint.spec.js
echo "module.exports = {'extends': '@debitoor/eslint-config-debitoor'};" > .eslintrc.js
git add test/eslint.spec.js .eslintrc.js

or add a .eslintrc.js file in the root of your project and extended it with the default config:

module.exports = {
  'extends': '@debitoor/eslint-config-debitoor'

If you are using babel, you need to add 'parser': 'babel-eslint' to .eslintrc.js:

module.exports = {
  extends: '@debitoor/eslint-config-debitoor',
  parser: 'babel-eslint'

Add tests

Install mocha-eslint:

npm install -DE mocha-eslint

and add a spec file eslint.spec.js in your test folder where you indicate which folders should be checked for linting:




Fixing eslint errors automatically (if possible)

./node_modules/.bin/eslint . --fix

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.