GithubHelp home page GithubHelp logo

mrmlnc / grunt-puglint Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 3.0 14 KB

:boar: Grunt plugin for pug-lint (formerly Jade)

License: MIT License

JavaScript 100.00%
grunt-plugins grunt-plugin pug-lint grunt-puglint jade pug

grunt-puglint's Introduction

grunt-puglint

Grunt plugin for pug-lint (formerly Jade).

Travis NPM version devDependency Status devDependency Status

image

Getting Started

This plugin requires Grunt ~1.0.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-puglint --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-puglint');

Usage

To configure validator, use the property config.

puglint: {
  taskName: {
    options: {
      // Use preset: npm i -D pug-lint-config-clock
      config: {
        extends: 'clock'
      },
      // Or config
      config: {
        disallowHtmlText: true,
        validateIndentation: 4
      }
    },
    src: ['test/fixtures/**/*.jade']
  }

  // Or short version
  options: {
    // ..
  },
  taskName: ['...']
}

Configuration

Plugin can read .pug-lintrc file.

Rules

List of available rules.

Changelog

See the Releases section of our GitHub project for changelogs for each release version.

License

This software is released under the terms of the MIT license.

grunt-puglint's People

Contributors

antiavanti avatar mrmlnc avatar rdevaissiere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

grunt-puglint's Issues

does not respect .pug-lintrc.json

Hey, there.

So I was trying to add grunt-puglint in https://github.com/gruntjs/gruntjs.com/compare/pug-lint.

It seems the plugin ignores .pug-lintrc.json completely. For example, I set "validateLineBreaks": "LF", which should fail for me since I'm on Windows and I have CRLF but everything is passing.

Do I miss something?

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\xmr\Desktop\grunt\gruntjs.com>node -v && npm -v
v6.9.4
3.10.10

C:\Users\xmr\Desktop\grunt\gruntjs.com>grunt puglint --verbose
Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Initializing config...OK

Registering "tasks" tasks.
Registering "grunt-puglint" local Npm module tasks.
Reading C:\Users\xmr\Desktop\grunt\gruntjs.com\node_modules\grunt-puglint\package.json...OK
Parsing C:\Users\xmr\Desktop\grunt\gruntjs.com\node_modules\grunt-puglint\package.json...OK
Loading "puglint.js" tasks...OK
+ puglint
Loading "Gruntfile.js" tasks...OK
+ build, default, dev, test

Running tasks: puglint

Running "puglint" task

Running "puglint:all" (puglint) task
Verifying property puglint.all exists in config...OK
Files: src/tmpl/404.pug, src/tmpl/blocks/advertisements.pug, src/tmpl/blocks/footer.pug, src/tmpl/blocks/header.pug, src/tmpl/blog.pug, src/tmpl/docs.pug, src/tmpl/includes/disqus.pug, src/tmpl/index.pug, src/tmpl/layout.pug, src/tmpl/plugins.pug, src/tmpl/rss.pug
Options: config=".pug-lintrc.json"

Done.

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.