rrdelaney / jadelint

:dragon: A linter for the Jade templating language
https://rrdelaney.github.io/jadelint
MIT License
6 stars 1 forks source link

Problem with html5 tags with attributes without values #8

Closed patwork closed 9 years ago

patwork commented 9 years ago

Hello,

Looks like jadelint doesn't like tags with attributes without values, which are ok with jade and html5 specification.

Example jade file:

script(src="nope.js", async, defer)

Error:

/tmp/node_modules/jadelint/node_modules/text-table/index.js:59 return m ? m.index + 1 : c.length;

TypeError: Cannot read property 'length' of undefined at dotindex (/tmp/node_modules/jadelint/node_modules/text-table/index.js:59:31) at /tmp/node_modules/jadelint/node_modules/text-table/index.js:11:21 at Array.forEach (native) at forEach (/tmp/node_modules/jadelint/node_modules/text-table/index.js:73:31) at /tmp/node_modules/jadelint/node_modules/text-table/index.js:10:9 at Array.reduce (native) at reduce (/tmp/node_modules/jadelint/node_modules/text-table/index.js:63:30) at module.exports (/tmp/node_modules/jadelint/node_modules/text-table/index.js:9:20) at Reporter.aggregate (/tmp/node_modules/jadelint/target/Reporter.js:23:16) at module.exports.jadelint (/tmp/node_modules/jadelint/target/jadelint.js:44:16)

rrdelaney commented 9 years ago

Investigating now

rrdelaney commented 9 years ago

Fixed and published to npm. If you find any other bugs or have feature requests please don't hesitate to reach out :smile:

patwork commented 9 years ago

That was quick, thanks :)

But... sorry to bother you, there's new problem and it's a quite strange one. I'm assuming you're working in windows? After you've changed bin/jadelint it's no longer working in linux (ubuntu) because of CRLF line endings.

`

!/usr/bin/env node

`

Silly env is looking for "node" file and returns error.

rrdelaney commented 9 years ago

I have a split dev env between the two, but it seemed to work on my Linux machine fine last time I used it. I will update it now though.

rrdelaney commented 9 years ago

Version 0.2.10 should fix your issues

patwork commented 9 years ago

✔ No problems found!

great :+1:

rrdelaney commented 9 years ago

Glad I could help. If you have any feature requests, please make issues :)