TSV (Tab Separated Values) format reporter for JSHint.
This suits to quality evaluation in Excel.
npm install --save-dev jshint-tsv-reporter
jshint --reporter node_modules/jshint-tsv-reporter/reporter.js file.js
grunt.initConfig({
jshint: {
options: {
jshintrc : '.jshintrc',
reporter: require('jshint-tsv-reporter'),
reporterOutput: 'jshint-report.txt'
},
target: ['file.js']
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('default', ['jshint']);
gulp.task('jshint', function() {
return gulp.src([ 'file.js' ])
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('jshint-tsv-reporter')
);
});
Type: String
Default: depend on operating system
NewLine character. For example: '\n', '\r', '\r\n'
Type: String
Default: 'en'
Locale of TSV header line. Support the following locale.
- en (English) (default)
- ja (Japanese)
Type: Object
Default: undefined
Set any header names. This option is prior to locale option.
For example:
header: {
file : 'File',
code : 'Code',
line : 'Line',
character : 'Character',
reason : 'Reason',
evidence : 'Evidence'
}
Type: Number
Default: undefined
If set to positive number, evidence is truncated to the number of characters.
If set undefined or null, whole evidence is output.
If set to 0 or negative number, evidence is not output.
File Code Line Character Reason
reporter.js W097 1 1 Use the function form of "use strict".
reporter.js W117 3 1 'module' is not defined.
reporter.js W117 7 5 'process' is not defined.
reporter.js W117 12 7 'process' is not defined.