File tree Expand file tree Collapse file tree 2 files changed +11
-15
lines changed
Expand file tree Collapse file tree 2 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -25,18 +25,6 @@ function lte(a, b) {
2525 return a . line < b . line || ( a . line === b . line && a . column <= b . column )
2626}
2727
28- /**
29- * Checks `a` is less than `b`.
30- *
31- * @param {{line: number, column: number} } a - A location to compare.
32- * @param {{line: number, column: number} } b - Another location to compare.
33- * @returns {boolean } `true` if `a` is less than `b`.
34- * @private
35- */
36- function lt ( a , b ) {
37- return a . line < b . line || ( a . line === b . line && a . column < b . column )
38- }
39-
4028//------------------------------------------------------------------------------
4129// Exports
4230//------------------------------------------------------------------------------
@@ -182,9 +170,6 @@ module.exports = class DisabledArea {
182170 for ( let i = this . areas . length - 1 ; i >= 0 ; -- i ) {
183171 const area = this . areas [ i ]
184172
185- if ( lt ( location , area . start ) ) {
186- break
187- }
188173 if ( ( area . ruleId === null || area . ruleId === ruleId ) &&
189174 lte ( area . start , location ) &&
190175 ( area . end === null || lte ( location , area . end ) )
Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ var a = b
5656/*eslint-disable no-undef,no-unused-vars*/
5757var a = b
5858/*eslint-enable no-undef*/` ,
59+
60+ `
61+ /*eslint no-shadow:error */
62+ var foo = 1
63+ function bar() {
64+ var foo = 2 //eslint-disable-line no-shadow
65+ }
66+ function baz() {
67+ var foo = 3 //eslint-disable-line no-shadow
68+ }
69+ ` ,
5970 ] ,
6071 invalid : [
6172 {
You can’t perform that action at this time.
0 commit comments