Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Relax Errors/Warnings Per File #371

Open
FesterCluck opened this issue Mar 26, 2016 · 4 comments
Open

Relax Errors/Warnings Per File #371

FesterCluck opened this issue Mar 26, 2016 · 4 comments

Comments

@FesterCluck
Copy link

Error & Warning Problem IDs should be relaxable per file/path.

This would make problems like HTML partials & templates a much more manageable issue, while also allowing for exemptions to be written on a case-by-case basis.
#370 #183 #190

@cvrebert
Copy link
Collaborator

cvrebert commented Apr 6, 2016

@FesterCluck Do magic HTML comment pragmas (e.g. <!--bootlint disable:W017,E007 -->) sound like a reasonable approach?

@ChrisMBarr
Copy link
Contributor

I like this idea & the comment approach. I assume it would only be possible to do this on a per-file basis, and not on a per-line/block basis, right? For example, the TSLint project allows you to disable a rule for a whole for, or just for a few lines until it is enabled again

@FesterCluck
Copy link
Author

My team's issue was resolved in finding that grunt-bootlint now supports this configuration.

@cvrebert HTML comment pragmas have been a great means of accomplishing this in other packages. Even if extended functionality is needed later, comment pragmas would make the frameworks at least as usable as other linters.

@ChrisMBarr Generally the approach @cvrebert describes utilizes start and end tags, therefore applying to it's content.

@cvrebert
Copy link
Collaborator

I assume it would only be possible to do this on a per-file basis, and not on a per-line/block basis, right?

Per-line basis wouldn't work for the in-browser version since source location info isn't preserved by the DOM.

Per-block is probably possible, but a little tricky.

Patches welcomed for either a per-file or per-block approach.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants