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) {
25
25
return a . line < b . line || ( a . line === b . line && a . column <= b . column )
26
26
}
27
27
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
-
40
28
//------------------------------------------------------------------------------
41
29
// Exports
42
30
//------------------------------------------------------------------------------
@@ -182,9 +170,6 @@ module.exports = class DisabledArea {
182
170
for ( let i = this . areas . length - 1 ; i >= 0 ; -- i ) {
183
171
const area = this . areas [ i ]
184
172
185
- if ( lt ( location , area . start ) ) {
186
- break
187
- }
188
173
if ( ( area . ruleId === null || area . ruleId === ruleId ) &&
189
174
lte ( area . start , location ) &&
190
175
( area . end === null || lte ( location , area . end ) )
Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ var a = b
56
56
/*eslint-disable no-undef,no-unused-vars*/
57
57
var a = b
58
58
/*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
+ ` ,
59
70
] ,
60
71
invalid : [
61
72
{
You can’t perform that action at this time.
0 commit comments