This rule is for validating the positioning of line comments. Block comments are ignored.
Comments that start with the following keywords are also ignored:
eslint, jshint, jslint, istanbul, global, exported, jscs, falls through
eg. // jshint strict: true
Type: Object
Value:
Object:position: above or besideallExcept: array of quoted exceptions (comments that start with these values will be excepted)"validateCommentPosition": { position: `above`, allExcept: [`pragma`] }
// This is a valid comment
1 + 1;
1 + 1; // This is an invalid comment
2 + 2; // pragma (this comment is fine)
"validateCommentPosition": { position: `beside` }
1 + 1; // This is a valid comment
// This is an invalid comment
1 + 1;