jsinspect
jsinspect copied to clipboard
add options.lineNumber & markdown reporter
This PR offer 2 cases:
- Add options.lineNumber for print out
file
.jsinspectrc
{
"lineNumber": true
}
result:
./src/index.js:62,65
62 │ methods: {
63 │ hahahaha() {
64 │ return (n) => {
65 │ if(!n) {
- Add a new reporter (named 'md' or 'markdown') to support markdown
file
.jsinspectrc
{
"lineNumber": true,
"reporter": "md" // or "markdown"
}
u can use cmd like
jsinspect > ./your/path/check-report.md
to gen a *.md file
@Froguard damn, your PR solves my needs :) why it's not merged? :)
@oleg-koval The gulp-pugin gulp-jsinspecty may solve your problem temporarily,before PR was merged。
var gulp = require('gulp');
var jsinspecty = require('gulp-jsinspecty');
gulp.task('default', function () {
return gulp.src([
'src/**/*.js',
'!*.test.js'
])
.pipe(jsinspecty({
lineNumber: true,
reporter: 'markdown', // or a shortner 'md'
reportFilename: 'result.md'
})) // you can also set options in .jsinspectrc file
.pipe(gulp.dest('./')); // generate a file 'result.md'
});
gulp-jsinspecty is inspired by gulp-jsinspect
@Froguard thanks for the help :) unfortunately can't use gulp for one of the projects, will wait this PR to merge