ESLint rules for error log reports
npm install eslint-plugin-log-lintereslint as a dev-dependency:
shell
npm install --save-dev eslint
`
2. Install eslint-plugin-log-linter:
If ESLint is installed globally,
then make sure eslint-plugin-log-linter is also installed globally.
A globally-installed ESLint cannot find a locally-installed plugin.
`shell
npm install eslint-plugin-log-linter -global
`
If ESLint is installed locally, then make sure eslint-plugin-log-linter is also installed locally.
`shell
npm install eslint-plugin-log-linter -save-dev
`
3. Enable the plugin by adding it to your .eslintrc:
`yaml
plugins:
- log-linter
`
4. You can also configure these rules in your .eslintrc. All rules defined in this plugin have to be prefixed by 'log-linter/'
`yaml
plugins:
- log-linter
rules:
- log-linter/error-code: 'myCode'
``