1.0.1 • Published 8 years ago
babel-plugin-eslint-validation v1.0.1
Installation
npm install --save-dev babel-plugin-eslint-validationUsage
Via .babelrc (Recommended)
.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.jsVia Node API
require("@babel/core").transform("code", {
plugins: ["babel-plugin-eslint-validation"]
});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.