mrmlnc / grunt-puglint

:boar: Grunt plugin for pug-lint (formerly Jade)
MIT License
5 stars 3 forks source link

does not respect .pug-lintrc.json #13

Open XhmikosR opened 7 years ago

XhmikosR commented 7 years ago

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.
mrmlnc commented 7 years ago

Thanks for your report 👍

Unfortunately, I can work on this issue only in the coming weekend.

XhmikosR commented 7 years ago

There's no real hurry, take your time. :)

mrmlnc commented 7 years ago

Sorry, I move this issue on the next week. Now you can use options.extends. For example:

options: {
  extends: './test/fixtures/.pug-lintrc' // config file
},
src: ['test/fixtures/**/*.jade']
XhmikosR commented 7 years ago

Thanks, I switched to extends and works.