Skip to content

Commit 8c05f27

Browse files
committed
Fix test, format
1 parent 199637a commit 8c05f27

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

docs/rules/a11y-no-title-usage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ This rule aims to prevent the use of the `title` attribute with some components
77
```jsx
88
import {RelativeTime} from '@primer/react'
99

10-
<RelativeTime date={new Date('2020-01-01T00:00:00Z')} noTitle={false} />
10+
const App = () => <RelativeTime date={new Date('2020-01-01T00:00:00Z')} noTitle={false} />
1111
```
1212

1313
👍 Examples of **correct** code for this rule:
1414

1515
```jsx
1616
import {RelativeTime} from '@primer/react'
1717

18-
<RelativeTime date={new Date('2020-01-01T00:00:00Z')} />
18+
const App = () => <RelativeTime date={new Date('2020-01-01T00:00:00Z')} />
1919
```
2020

21-
The `noTitle` attribute can be omitted because its default value is `true` internally.
21+
The `noTitle` attribute can be omitted because its default value is `true` internally.

src/rules/__tests__/a11y-no-title-usage.test.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@ const rule = require('../a11y-no-title-usage')
22
const {RuleTester} = require('eslint')
33

44
const ruleTester = new RuleTester({
5-
languageOptions: {
6-
parserOptions: {
7-
ecmaVersion: 'latest',
8-
sourceType: 'module',
9-
ecmaFeatures: {
10-
jsx: true,
11-
},
5+
parserOptions: {
6+
ecmaVersion: 'latest',
7+
sourceType: 'module',
8+
ecmaFeatures: {
9+
jsx: true,
1210
},
1311
},
1412
})

0 commit comments

Comments
 (0)