WePY CI d995f52a61 chore(release): publish v2.1.0 | 4 年之前 | |
---|---|---|
.. | ||
test | 5 年之前 | |
.npmignore | 6 年之前 | |
CHANGELOG.md | 4 年之前 | |
README.md | 6 年之前 | |
index.js | 5 年之前 | |
package-lock.json | 4 年之前 | |
package.json | 4 年之前 |
npm install @wepy/plugin-eslint --save-dev
wepy.config.js
const eslint = require('@wepy/plugin-eslint');
module.exports = {
plugins: [
eslint({
// options
})
]
};
你提供的配置选项 options
将传递给 CLIEngine
处理,有关 options
的更多详细信息,请参阅eslint文档。
false
)如果此选项设置为true,插件将仅处理和报告错误,忽略警告
const eslint = require('@wepy/plugin-eslint');
module.exports = {
plugins: [
eslint({
quiet: true
})
]
};
false
)启用 ESLint
自动修复功能
注意:此选项将更改源文件
true
)启用 ESLint
eslint
)用于 linting
的 ESLint
实例的路径
用于格式化 ESLint
输出,选项值接收字符串或者函数
const eslint = require('@wepy/plugin-eslint');
module.exports = {
plugins: [
eslint({
// default value
formatter: require('eslint/lib/formatters/stylish'),
// community formatter
formatter: require('eslint-friendly-formatter'),
// custom formatter
formatter: function(results) {
// `results` format is available here
// http://eslint.org/docs/developer-guide/nodejs-api.html#executeonfiles()
// you should return a string
// DO NOT USE console.*() directly !
return 'OUTPUT'
}
})
]
};