jsinspect icon indicating copy to clipboard operation
jsinspect copied to clipboard

add options.lineNumber & markdown reporter

Open Froguard opened this issue 7 years ago • 3 comments

This PR offer 2 cases:

  1. 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) {
  1. 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 avatar Sep 06 '18 10:09 Froguard

@Froguard damn, your PR solves my needs :) why it's not merged? :)

oleg-koval avatar Sep 11 '18 11:09 oleg-koval

@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 avatar Sep 11 '18 11:09 Froguard

@Froguard thanks for the help :) unfortunately can't use gulp for one of the projects, will wait this PR to merge

oleg-koval avatar Sep 11 '18 11:09 oleg-koval