File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change
1
+ const url = require ( '../url' )
1
2
const { getJSXOpeningElementAttribute} = require ( '../utils/get-jsx-opening-element-attribute' )
2
3
3
4
module . exports = {
4
5
meta : {
5
- type : 'error' , // TODO: Confirm the type
6
+ type : 'error' ,
6
7
docs : {
7
8
description : 'Disallow usage of title attribute on some components' ,
8
9
recommended : true ,
9
- url : null , // TODO: Add URL
10
+ url : url ( module ) ,
10
11
} ,
11
12
messages : {
12
13
noTitleOnRelativeTime : 'Avoid using the title attribute on RelativeTime.' ,
13
14
} ,
14
15
fixable : 'code' ,
15
- schema : [ ] ,
16
16
} ,
17
17
18
18
create ( context ) {
@@ -25,7 +25,7 @@ module.exports = {
25
25
node : title ,
26
26
messageId : 'noTitleOnRelativeTime' ,
27
27
fix ( fixer ) {
28
- const start = title . range [ 0 ] - 1 // Accounts for whitespace
28
+ const start = title . range [ 0 ] - 1
29
29
const end = title . range [ 1 ]
30
30
return fixer . removeRange ( [ start , end ] )
31
31
} ,
You can’t perform that action at this time.
0 commit comments