Package Exports
- eslint-formatter-html
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-formatter-html) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
说明
安装
yarn add -D eslint-formatter-html
使用
npx eslint **/src/**/*.{js,vue} --ignore-path .gitignore -f html -o ESLintReport.html
根据官方文档 定义
An npm-installed formatter is resolved with or without eslint-formatter- prefix.
Eslint直接加参数
-f html
即可覆盖 Eslint 内置的 html 模板或者
-f eslint-formatter-html
WHY?
- 路径可复制
- 路径显示为 相对路径 (相对于项目根路径)
- 显示宽度不设置最大值
1000px
- 增加全部展开/折叠功能, 默认全展开
- 支持ansi码展示
- 显示一些统计分析信息
开发者须知
- 参考文档
- 将
src/index.vue
拆解为lib/{template.html,script.js,style.css}
- 因此
lib
目录请不要手动去修改
mark
- npm publish --registry https://registry.npmjs.org