Skip to content

Commit ebd46fb

Browse files
authored
feat: integrate @e18e/eslint-plugin (#830)
1 parent 0c44d5a commit ebd46fb

File tree

30 files changed

+356
-21
lines changed

30 files changed

+356
-21
lines changed

fixtures/input/jsx.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import React from 'react';
2+
3+
const PATTERN = /\.\d+/ig
4+
25
export function HelloWorld({
36
greeting = "hello", greeted = '"World"', silent = false, onMouseOver,}) {
47

58
const [num] = React.useState(()=> Math
69
.floor (Math.random() * 1E+7).toString()
7-
.replace(/\.\d+/ig, ""))
10+
.replace(PATTERN, ""))
811

912
if(!greeting){
1013
return null};

fixtures/output/all/jsx.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from 'react'
22

3+
const PATTERN = /\.\d+/g
4+
35
export function HelloWorld({
46
greeting = 'hello',
57
greeted = '"World"',
@@ -9,7 +11,7 @@ export function HelloWorld({
911
const [num] = React.useState(() => Math
1012
.floor (Math.random() * 1e+7)
1113
.toString()
12-
.replace(/\.\d+/g, ''))
14+
.replace(PATTERN, ''))
1315

1416
if (!greeting) {
1517
return null

fixtures/output/js/jsx.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from 'react'
22

3+
const PATTERN = /\.\d+/g
4+
35
export function HelloWorld({
46
greeting = 'hello',
57
greeted = '"World"',
@@ -9,7 +11,7 @@ export function HelloWorld({
911
const [num] = React.useState(() => Math
1012
.floor (Math.random() * 1e+7)
1113
.toString()
12-
.replace(/\.\d+/g, ''))
14+
.replace(PATTERN, ''))
1315

1416
if (!greeting) {
1517
return null

fixtures/output/no-markdown-with-formatters/jsx.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from 'react'
22

3+
const PATTERN = /\.\d+/g
4+
35
export function HelloWorld({
46
greeting = 'hello',
57
greeted = '"World"',
@@ -9,7 +11,7 @@ export function HelloWorld({
911
const [num] = React.useState(() => Math
1012
.floor (Math.random() * 1e+7)
1113
.toString()
12-
.replace(/\.\d+/g, ''))
14+
.replace(PATTERN, ''))
1315

1416
if (!greeting) {
1517
return null

fixtures/output/no-style/jsx.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import React from 'react';
2+
3+
const PATTERN = /\.\d+/g
4+
25
export function HelloWorld({
36
greeting = "hello", greeted = '"World"', silent = false, onMouseOver,}) {
47

58
const [num] = React.useState(()=> Math
69
.floor (Math.random() * 1e+7).toString()
7-
.replace(/\.\d+/g, ""))
10+
.replace(PATTERN, ""))
811

912
if(!greeting){
1013
return null};

fixtures/output/tab-double-quotes/jsx.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from "react"
22

3+
const PATTERN = /\.\d+/g
4+
35
export function HelloWorld({
46
greeting = "hello",
57
greeted = "\"World\"",
@@ -9,7 +11,7 @@ export function HelloWorld({
911
const [num] = React.useState(() => Math
1012
.floor (Math.random() * 1e+7)
1113
.toString()
12-
.replace(/\.\d+/g, ""))
14+
.replace(PATTERN, ""))
1315

1416
if (!greeting) {
1517
return null

fixtures/output/ts-override/jsx.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from 'react'
22

3+
const PATTERN = /\.\d+/g
4+
35
export function HelloWorld({
46
greeting = 'hello',
57
greeted = '"World"',
@@ -9,7 +11,7 @@ export function HelloWorld({
911
const [num] = React.useState(() => Math
1012
.floor (Math.random() * 1e+7)
1113
.toString()
12-
.replace(/\.\d+/g, ''))
14+
.replace(PATTERN, ''))
1315

1416
if (!greeting) {
1517
return null

fixtures/output/ts-strict-with-react/jsx.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import * as React from 'react'
22

3+
const PATTERN = /\.\d+/g
4+
35
export function HelloWorld({
46
greeting = 'hello',
57
greeted = '"World"',
@@ -9,7 +11,7 @@ export function HelloWorld({
911
const [num] = React.useState(() => Math
1012
.floor (Math.random() * 1e+7)
1113
.toString()
12-
.replace(/\.\d+/g, ''))
14+
.replace(PATTERN, ''))
1315

1416
if (!greeting) {
1517
return null

fixtures/output/ts-strict/jsx.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from 'react'
22

3+
const PATTERN = /\.\d+/g
4+
35
export function HelloWorld({
46
greeting = 'hello',
57
greeted = '"World"',
@@ -9,7 +11,7 @@ export function HelloWorld({
911
const [num] = React.useState(() => Math
1012
.floor (Math.random() * 1e+7)
1113
.toString()
12-
.replace(/\.\d+/g, ''))
14+
.replace(PATTERN, ''))
1315

1416
if (!greeting) {
1517
return null

fixtures/output/with-formatters/jsx.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from 'react'
22

3+
const PATTERN = /\.\d+/g
4+
35
export function HelloWorld({
46
greeting = 'hello',
57
greeted = '"World"',
@@ -9,7 +11,7 @@ export function HelloWorld({
911
const [num] = React.useState(() => Math
1012
.floor (Math.random() * 1e+7)
1113
.toString()
12-
.replace(/\.\d+/g, ''))
14+
.replace(PATTERN, ''))
1315

1416
if (!greeting) {
1517
return null

0 commit comments

Comments
 (0)