-
-
Notifications
You must be signed in to change notification settings - Fork 311
Conversation
…ypes that bootstrap supports styling with this class
… of the bootstrap structure
The tests are failing for the same reason on Travis too, so it's not just your machine. |
weird... any ideas why this is happening? I can't figure it out. I mean this code seems pretty simple, and it's nearly identical to the rule below it for radio buttons. Why would this checkbox failure get thrown on every test but the radios one does not? |
Nothing obvious jumps out at me. I'd recommend opening one of the failing test pages in a web browser and tracing through its execution. |
Did some debugging. Found the cause of the failures and added a workaround in 000e4aa. Can you rebase against |
I got latest from master on my fork, and merged that into my branch. All tests now pass locally now. I'm not sure what the merge issue here is though... |
Use rebase instead of merge next time... |
src/bootlint.js
Outdated
)); | ||
if (inputs.length) { | ||
inputs.each(function (i, el) { | ||
reporter('The `.form-control` class must appear on all textual `<input/>` elements, `<textarea>` elements, and `<select>` elements', $(el)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<input>
instead of <input/>
`<input/>` becomes `<input>`
src/bootlint.js
Outdated
}).join(',') | ||
)); | ||
if (inputs.length) { | ||
inputs.each(function (i, el) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for each
here, I believe. Just pass inputs
as the 2nd arg to reporter
@ChrisMBarr: please fetch and rebase this. |
@XhmikosR ok, done |
Here are the docs to add for these rules. I know there are pending PR's to add more rules, so these ID's might not match up right now with what's in the code... but you get the idea. Just wanted to get these in here before I forgot. E052Require all supported
|
3 new rules added based on discussions around issue #369
1️⃣ Disallow textual inputs that are missing the
.form-control
class<input>
types,<textarea>
and<select>
2️⃣ Disallow radio buttons that are not enclosed in the proper structure
.radio>label>input[type="radio"]
structure, or thelabel.radio-inline>input[type="radio"]
structure3️⃣ Disallow checkboxes that are not enclosed in the proper structure
.checkbox>label>input[type="checkbox"]
structure, or thelabel.checkbox-inline>input[type="checkbox"]
structurenote: right now these all have tests written for them that are passing with the
nodeunit
grunt task. However, i cannot figure out why every single test fails in thequnit
grunt task. Each test reports that it gets a failure from rule 3️⃣ (about the checkboxes), even when that test HTML does not contain checkboxes....I can't tell if there is something I am overlooking, or if these tests just aren't working on my computer.