Skip to content

Linting

Valhe Kouneli edited this page Jun 29, 2018 · 10 revisions

The project uses automatic code formatting

  • First you need to install Eslint vscode plugin if you are using vscode.
  • Vscode should work as intended and outputs all eslint problems to problems tab. In order to run eslint manually you can type ./node_modules/.bin/eslint . in the the project folder labtool2.0 or backend.
  • Please note that although they are mostly the same, VSCode's 'Format document' is not exactly same as Prettier. Therefore you should always run Prettier before commiting changes.
  • You can do this on VSCode's command palette with ESLint: Fix all auto-fixable problems or you can run ./node_modules/.bin/eslint . --fix to fix the problems.