bootlint
bootlint copied to clipboard
24-column-grid triggers E013 error
Since bootlint check for selectors within the 12-column-grid setting it triggers an E013 error on other col-- classes that have other numbers.
Perhaps a setting for the number of grid columns...
We do make an assumption that you're using Bootstrap in a rather "vanilla" way.
This could be added as an option within Bootlint, I think, by exposing NUM_COLS
.
Anyway, the tests in master will pass or fail depending on the value entered here, so we'll need to investigate this a bit. Looks like anything greater than 12 should be fine as far as the tests go, but different column divisibility could cause other, subtler issues for the Bootstrap grid.
I haven't had any problems yet with this "bug", the tests run fine except for the E013, but I just started using bootlint and came across this little problem.
Anyway, thanks for the reply and I'm looking forward to updates.
Could add the number of cols to use as an option in the CLI version?
@iamphill That's my thought, but we'd need some caveats. I assume people changing the number of columns know what they're doing, but sometimes I assume too much. :laughing:
@wtrbuit I meant this project's tests. What you're seeing is a false positive since Bootlint's NUM_COLS
defaults to 12 and craps out when it sees columns it doesn't recognize.
I know what you mean. I was just saying that it hasn't let to any other weird errors. But since I just started using Bootlint I'm not sure if it will turnup with more errors due to the default 12 cols.
+1 for exposing NUM_COLS
(https://github.com/twbs/bootlint/blob/master/src/bootlint.js#L19) as option for the cli-tool/grunt-task
I just stumbled upon this issue while I used a »custom« grid (20 columns in my case). Im using the bootlint Grunt task.
And im not feeling fine with »relaxing« this error. Because its pretty useful to prevent possible markup errors by other co-workers and myself.
Can we modify the selector to simply check for prefix e.g. col-xs-
instead of col-xs-n
(where n
is in [1,12] ) ?
Nice to have for some future version but not necessarily for Bootstrap v4+ support.