2.4.4 • Published 6 years ago
jslib-plugin-eslint v2.4.4
jslib-plugin-eslint
eslint plugin for create-jslib
Injected Commands
jslib-service lintUsage: jslib-service lint [options] [...files] Options: --format [formatter] specify formatter (default: codeframe) --no-fix do not fix errors --max-errors specify number of errors to make build failed (default: 0) --max-warnings specify number of warnings to make build failed (default: Infinity)Lints and fixes files. If no specific files are given, it lints all files in
srcandtest.Other ESLint CLI options are also supported.
Configuration
ESLint can be configured via .eslintrc.js.
Lint-on-save during development with rollup-plugin-eslint is enabled by default. It can be disabled with the lintOnSave option in jslib.config.js:
module.exports = {
lintOnSave: false
}When set to true, rollup-plugin-eslint will emit lint errors as warnings. By default, warnings are only logged to the terminal and does not fail the compilation.
When lintOnSave is a truthy value, eslint will be applied in both development and production. If you want to disable eslint during production build, you can use the following config:
// jslib.config.js
module.exports = {
lintOnSave: process.env.NODE_ENV !== 'production'
}