Three.js: Feature suggestion: Automatically fixes ESLint rules

Created on 23 Apr 2019  路  4Comments  路  Source: mrdoob/three.js

Most helpful comment

You should be able to fix lint errors with the command line using npm run lint -- --fix, which runs eslint with the --fix argument.

All 4 comments

Do you have some ideas on how to do this? Maybe we could add a script to package.json?

You should be able to fix lint errors with the command line using npm run lint -- --fix, which runs eslint with the --fix argument.

@gkjohnson That works just fine. Another option is to properly configure your IDE/editor (e.g. VSCode) so it automatically fixes lint errors when saving a file.

VSCode setting

  • Install ESLint
    image
  • Auto Fix On Save
    image
Was this page helpful?
0 / 5 - 0 ratings