bootlint icon indicating copy to clipboard operation
bootlint copied to clipboard

24-column-grid triggers E013 error

Open wtrbuit opened this issue 9 years ago • 8 comments

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...

wtrbuit avatar Oct 22 '14 08:10 wtrbuit

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.

zacechola avatar Oct 22 '14 14:10 zacechola

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.

wtrbuit avatar Oct 22 '14 14:10 wtrbuit

Could add the number of cols to use as an option in the CLI version?

iamphill avatar Oct 22 '14 15:10 iamphill

@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.

zacechola avatar Oct 22 '14 17:10 zacechola

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.

wtrbuit avatar Oct 23 '14 08:10 wtrbuit

+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.

mischah avatar Jul 16 '15 14:07 mischah

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] ) ?

bitcity avatar Nov 24 '15 08:11 bitcity

Nice to have for some future version but not necessarily for Bootstrap v4+ support.

Herst avatar Jul 29 '19 07:07 Herst