Skip to content

Commit 7d7c94b

Browse files
format
1 parent ded3726 commit 7d7c94b

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/rules/__tests__/use-next-tooltip.test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const ruleTester = new RuleTester({
66
ecmaVersion: 'latest',
77
sourceType: 'module',
88
ecmaFeatures: {
9-
jsx: true
10-
}
11-
}
9+
jsx: true,
10+
},
11+
},
1212
})
1313

1414
ruleTester.run('use-next-tooltip', rule, {
@@ -17,16 +17,16 @@ ruleTester.run('use-next-tooltip', rule, {
1717
`import {UnderlineNav, Button} from '@primer/react';
1818
import {Tooltip} from '@primer/react/next';`,
1919
`import {UnderlineNav, Button} from '@primer/react';
20-
import {Tooltip, SelectPanel} from '@primer/react/next';`
20+
import {Tooltip, SelectPanel} from '@primer/react/next';`,
2121
],
2222
invalid: [
2323
{
2424
code: `import {Tooltip} from '@primer/react'`,
25-
errors: [{messageId: 'useNextTooltip'}]
25+
errors: [{messageId: 'useNextTooltip'}],
2626
},
2727
{
2828
code: `import {Tooltip, Button} from '@primer/react'`,
29-
errors: [{messageId: 'useNextTooltip'}]
30-
}
31-
]
29+
errors: [{messageId: 'useNextTooltip'}],
30+
},
31+
],
3232
})

src/rules/use-next-tooltip.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ module.exports = {
66
docs: {
77
description: 'recommends the use of @primer/react/next Tooltip component',
88
category: 'Best Practices',
9-
recommended: true
9+
recommended: true,
1010
},
1111
fixable: null,
1212
schema: [],
1313
messages: {
14-
useNextTooltip: 'Please use @primer/react/next Tooltip component that has accessibility improvements'
15-
}
14+
useNextTooltip: 'Please use @primer/react/next Tooltip component that has accessibility improvements',
15+
},
1616
},
1717
create(context) {
1818
return {
@@ -21,16 +21,16 @@ module.exports = {
2121
return
2222
}
2323
const hasTooltip = node.specifiers.some(
24-
specifier => specifier.imported && specifier.imported.name === 'Tooltip'
24+
specifier => specifier.imported && specifier.imported.name === 'Tooltip',
2525
)
2626
if (!hasTooltip) {
2727
return
2828
}
2929
context.report({
3030
node,
31-
messageId: 'useNextTooltip'
31+
messageId: 'useNextTooltip',
3232
})
33-
}
33+
},
3434
}
35-
}
35+
},
3636
}

0 commit comments

Comments
 (0)