eslint-plugin-log-linter
ESLint JS plugin
Overview
The eslint-plugin-log-linter is an eslint js plugin for the logs linting.
It is using the ESLint library to help validate logging standards.
Usage without shareable config
-
Install
eslint
as a dev-dependency:npm install --save-dev eslint
-
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.
npm install eslint-plugin-log-linter -global
If ESLint is installed locally, then make sure eslint-plugin-log-linter is also installed locally.
npm install eslint-plugin-log-linter -save-dev
-
Enable the plugin by adding it to your
.eslintrc
:plugins: - log-linter
-
You can also configure these rules in your
.eslintrc
. All rules defined in this plugin have to be prefixed by 'log-linter/'plugins: - log-linter rules: - log-linter/error-code: 'myCode'
Rules
- error-code - provide error logs with argument holding an error code.