Skip to content

Commit

Permalink
Merge pull request #33 from storybookjs/fix/hierarchy-separator-highl…
Browse files Browse the repository at this point in the history
…ight

hierarchy-separator: fix node highlight
  • Loading branch information
yannbf committed Nov 10, 2021
2 parents 7a15844 + 9d5aa8a commit 698028c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/rules/hierarchy-separator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export = createStorybookRule({

if (metaTitle.includes('|') || metaTitle.includes('.')) {
context.report({
node,
node: titleNode,
messageId: 'deprecatedHierarchySeparator',
data: { metaTitle },
// In case we want this to be auto fixed by --fix
Expand Down
6 changes: 3 additions & 3 deletions tests/lib/rules/hierarchy-separator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ruleTester.run('hierarchy-separator', rule, {
output: "export default { title: 'Examples/Components/Button' }",
errors: [
{
type: AST_NODE_TYPES.ExportDefaultDeclaration,
type: AST_NODE_TYPES.Property,
messageId: 'deprecatedHierarchySeparator',
suggestions: [
{
Expand All @@ -45,7 +45,7 @@ ruleTester.run('hierarchy-separator', rule, {
output: "export default { title: 'Examples/Components/Button' }",
errors: [
{
type: AST_NODE_TYPES.ExportDefaultDeclaration,
type: AST_NODE_TYPES.Property,
messageId: 'deprecatedHierarchySeparator',
suggestions: [
{
Expand All @@ -67,7 +67,7 @@ ruleTester.run('hierarchy-separator', rule, {
`,
errors: [
{
type: AST_NODE_TYPES.ExportDefaultDeclaration,
type: AST_NODE_TYPES.Property,
messageId: 'deprecatedHierarchySeparator',
suggestions: [
{
Expand Down

0 comments on commit 698028c

Please sign in to comment.