babel-plugin-eslint-validation
A babel plugin that validate files with eslint rules.
Installation
npm install --save-dev babel-plugin-eslint-validation
Usage
.babelrc
(Recommended)
Via .babelrc
// without options "plugins": "babel-plugin-eslint-validation" // with options "plugins": "babel-plugin-eslint-validation" "fix": false "formatter": "stylish" "failOnError": true "failOnWarning": false
Via CLI
babel --plugins babel-plugin-eslint-validation script.js
Via Node API
;
Options
fix
(default: false)
This option will enable ESLint autofix feature.
formatter
(default: eslint stylish formatter)
You can use official eslint formatters, or the path to a custom formatter
"plugins": "babel-plugin-eslint-validation" "formatter": "eslint-friendly-formatter"
eslintPath
(default: "eslint")
Path to eslint
instance that will be used for linting.
failOnWarning
(default: false
)
Loader will cause the module build to fail if there are any eslint warnings.
failOnError
(default: false
)
Loader will cause the module build to fail if there are any eslint errors.