Linter Configuration

This boilerplate uses ESLint as the linter, and uses the Standard preset with some small customizations.

If you are not happy with the default linting rules, you have several options:

  1. Overwrite individual rules in .eslintrc.js. For example, you can add the following rule to enforce semicolons instead of omitting them:

    // .eslintrc.js
    "semi": [2, "always"]
    
  2. Pick a different ESLint preset when generating the project, for example eslint-config-airbnb.

  3. Pick "none" for ESLint preset when generating the project and define your own rules. See ESLint documentation for more details.

Fixing Linting Errors

You can run the following command to let eslint fix any errors it finds (if it can - not all errors are fixable like this):

npm run lint -- --fix

(The -- in the middle is necessary to ensure the --fix option is passdd to eslint, not to npm)

results matching ""

    No results matching ""