File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ root : true
2
+ extends :
3
+ - ' @dudeofawesome'
4
+ - ' @dudeofawesome/react'
5
+ parserOptions :
6
+ ecmaVersion : 2022
Original file line number Diff line number Diff line change
1
+ import { describe , it } from 'node:test' ;
2
+ import { ESLint } from 'eslint' ;
3
+ import {
4
+ testRuleFail ,
5
+ testNoFail ,
6
+ defaultTestSet ,
7
+ } from '../../utils/testing/eslint' ;
8
+
9
+ const linter = new ESLint ( { cwd : __dirname } ) ;
10
+
11
+ describe ( 'eslint-config-react' , ( ) => {
12
+ defaultTestSet ( linter ) ;
13
+
14
+ describe ( 'passes' , ( ) => {
15
+ it ( `should pass radix` , async ( ) =>
16
+ testNoFail ( {
17
+ linter,
18
+ code : `parseInt('10');\n` ,
19
+ file_path : 'index.jsx' ,
20
+ } ) ) ;
21
+ } ) ;
22
+
23
+ describe ( 'fails' , ( ) => {
24
+ it ( `should fail radix` , async ( ) =>
25
+ testRuleFail ( {
26
+ linter,
27
+ code : `parseInt('10');\n` ,
28
+ ruleId : 'radix' ,
29
+ file_path : 'index.jsx' ,
30
+ } ) ) ;
31
+
32
+ it ( `should fail no-console` , ( ) =>
33
+ testRuleFail ( {
34
+ linter,
35
+ code : `console.log('foo');\n` ,
36
+ ruleId : 'no-console' ,
37
+ file_path : 'index.jsx' ,
38
+ } ) ) ;
39
+ } ) ;
40
+ } ) ;
You can’t perform that action at this time.
0 commit comments