File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 17
17
"license" : " MIT" ,
18
18
"main" : " base.yaml" ,
19
19
"scripts" : {
20
- "test" : " echo 'No tests'; exit 0 "
20
+ "test" : " node --require ts-node/register --test test/index.ts "
21
21
},
22
22
"dependencies" : {
23
23
"@shopify/eslint-plugin" : " ^43.0.0"
Original file line number Diff line number Diff line change
1
+ root : true
2
+ extends :
3
+ - ' @dudeofawesome'
4
+ - ' @dudeofawesome/browser'
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 { testRuleFail , defaultTestSet } from '../../utils/testing/eslint' ;
4
+
5
+ const linter = new ESLint ( { cwd : __dirname } ) ;
6
+
7
+ describe ( 'eslint-config-browser' , ( ) => {
8
+ defaultTestSet ( linter ) ;
9
+
10
+ describe ( 'passes' , ( ) => { } ) ;
11
+
12
+ describe ( 'fails' , ( ) => {
13
+ it ( `should fail no-console` , ( ) =>
14
+ testRuleFail ( {
15
+ linter,
16
+ code : `console.log('foo');\n` ,
17
+ ruleId : 'no-console' ,
18
+ } ) ) ;
19
+
20
+ it ( `should fail radix` , async ( ) =>
21
+ testRuleFail ( { linter, code : `parseInt('10');\n` , ruleId : 'radix' } ) ) ;
22
+ } ) ;
23
+ } ) ;
You can’t perform that action at this time.
0 commit comments