Giter Site home page Giter Site logo

gulp-pug-lint's Introduction

Gulp plugin for pug-lint

npm version Dependency Status devDependency Status

Usage

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

gulp.task('default', function () {
  return gulp
    .src('views/*.jade')
    .pipe(puglint());
});

Configuration

Plugin will read .pug-lintrc file.

gulp-pug-lint's People

Contributors

jzsfkzm avatar vuesomedev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gulp-pug-lint's Issues

TypeError: dest.on is not a function

my gulpfile is

var gulp = require('gulp');
let gutil = require('gulp-util');
var pug = require('gulp-pug');
var puglint = require('gulp-pug-lint');
let webpack = require('webpack');
let webpackConfig = require('./webpack.config.js');
let browserSync = require('browser-sync');
let ghPages = require('gulp-gh-pages');

/**
 * check pug syntax
 */
 gulp.task('checkGulp', function(){
   return gulp.src('app/src/html/index.pug')
   .pipe(puglint);
 })

the detail error is

[10:18:58] TypeError: dest.on is not a function
    at DestroyableTransform.Readable.pipe (/home/clyde/npm-global/lib/node_modules/gulp/node_modules/through2/
node_modules/readable-stream/lib/_stream_readable.js:485:8)
    at /home/clyde/dev/github/resume/gulpfile.js:15:5
    at taskWrapper (/home/clyde/npm-global/lib/node_modules/gulp/node_modules/undertaker/lib/set-task.js:13:15
)
    at bound (domain.js:280:14)
    at runBound (domain.js:293:12)
    at asyncRunner (/home/clyde/npm-global/lib/node_modules/gulp/node_modules/async-done/index.js:36:18)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:609:11)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3

my index.pug is

extends ./layout/resume-layout.pug
include ./mixins/util.pug


block title
  title= locals.title

block info
  +myInfo(locals.info)

block personal
  +session(locals.section_name.personal,'personal',locals.personal)
  
block experience
  +session(locals.section_name.experience,'experience',locals.experience)
  
block projects
  +session(locals.section_name.projects,'projects',locals.projects)
  
block education
  +session(locals.section_name.education,'education',locals.education)

block IEcondition
    <!--[if lte IE 8]>
    .lte-ie8-comment-wrapper
      p.lte-ie8-comment #{locals.lt_ie8_comment}
    <![endif]-->

where is wrong? and how to fix? thank you

Unable to use with node v0.12

https://github.com/emartech/gulp-jade-lint/blob/master/config_parser.js is causing an issue running node v0.12 and below(haven't tested any of the io.js versions).

$ gulp
E:\Users\Joshua\Documents\Development\Node\Dashboard\node_modules\gulp-jade-lint\config_parser.js:5
class ConfigParser {
^^^^^
SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (E:\Users\Joshua\Documents\Development\Node\Dashboard\node_modules\gulp-jade-lint\index.js:7:20)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (E:\Users\Joshua\Documents\Development\Node\Dashboard\tasks\lint.js:4:16)
    at Module._compile (module.js:460:26)

Outdated pug-lint dependency

I would like to use the new extends feature for pug-lint config files, which was added in version 2.2.0 of pug-lint. Unfortunately, this gulp plugin still has version 2.1.2 of pug-lint hardcoded as the dependency version. Could this be update to the latest version, or better yet, "^2.3.0"?

Rename repository and package

Because of reasons; pugjs/pug#2184, Jade is being renamed to Pug in the not so distant future. At this point jade-lint will be deprecated in favour of pug-lint.

I'll keep you posted as to when this is happening

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.