Skip to content

Instantly share code, notes, and snippets.

@rhyslbw
Last active September 4, 2017 12:29
Show Gist options
  • Save rhyslbw/3002440aebe07ef5ff6c15fbafbbab50 to your computer and use it in GitHub Desktop.
Save rhyslbw/3002440aebe07ef5ff6c15fbafbbab50 to your computer and use it in GitHub Desktop.
My standard Pug lint configuration with demo Gulp task

pug | gulp-pug-lint

var gulp = require('gulp');
var puglint = require('gulp-pug-lint');

gulp.task('pugLint', function() {
  return gulp
    .src(./src/views/**/*.pug)
    .pipe(puglint());
});
{
"disallowBlockExpansion": null,
"disallowClassLiterals": null,
"disallowClassLiteralsBeforeAttributes": null,
"disallowClassLiteralsBeforeIdLiterals": null,
"disallowDuplicateAttributes": true,
"disallowHtmlText": true,
"disallowIdLiterals": null,
"disallowIdLiteralsBeforeAttributes": null,
"disallowImplicitDiv": null,
"disallowMultipleLineBreaks": null,
"disallowSpaceAfterCodeOperator": null,
"disallowSpacesInsideAttributeBrackets": true,
"disallowSpecificAttributes": null,
"disallowSpecificTags": null,
"disallowStringConcatenation": true,
"disallowStringInterpolation": null,
"disallowTagInterpolation": null,
"maximumNumberOfLines": null,
"requireClassLiteralsBeforeAttributes": true,
"requireClassLiteralsBeforeIdLiterals": true,
"requireIdLiteralsBeforeAttributes": true,
"requireLineFeedAtFileEnd": true,
"requireLowerCaseAttributes": true,
"requireLowerCaseTags": true,
"requireSpaceAfterCodeOperator": true,
"requireSpacesInsideAttributeBrackets": null,
"requireSpecificAttributes": [
{ "img": "alt" }
],
"validateAttributeQuoteMarks": "'",
"validateAttributeSeparator": null,
"validateIndentation": 2,
"validateLineBreaks": "LF",
"validateSelfClosingTags": true
}
@VasylPosmit
Copy link

VasylPosmit commented Sep 1, 2017

It's hard to find the example of .pug-lintrc
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment