They can be used with the following commands from the inside of a Chemotion ELN installation directory.
-x for rubocop and
--fix for ESLint are for correcting and therefore changing the code.
Without the flags errors or warnings are displayed, but no changes are made to the code.
When ESLint detects linting errors, it will finishes by default with the exit code 1. This can lead to scripts being terminated with error codes in some environments (e. g. GitHub Actions). To avoid this the eslint-plugin-only-warn can be added via yarn which returns warnings instead of errors. The plugin needs to be activated with a flag in the ESLint command:
There are Linting extensions for Visual Studio Code available.
Install Visual studio code with linters set up (ESLint and RuboCop):
Install version control extension
The webpack configurations can be printed to the node console via: