@@ -11,12 +11,7 @@ const path = require('path');
1111const { ESLint} = require ( 'eslint' ) ;
1212const plugin = require ( '..' ) ;
1313
14- const FIXTURES_DIR = path . join (
15- __dirname ,
16- 'fixtures' ,
17- 'src' ,
18- 'content'
19- ) ;
14+ const FIXTURES_DIR = path . join ( __dirname , 'fixtures' , 'src' , 'content' ) ;
2015const PARSER_PATH = path . join ( __dirname , '..' , 'parser.js' ) ;
2116
2217function createESLint ( { fix = false } = { } ) {
@@ -53,11 +48,7 @@ async function lintFixture(name, {fix = false} = {}) {
5348
5449async function run ( ) {
5550 const basicResult = await lintFixture ( 'basic-error.md' ) ;
56- assert . strictEqual (
57- basicResult . messages . length ,
58- 1 ,
59- 'expected one diagnostic'
60- ) ;
51+ assert . strictEqual ( basicResult . messages . length , 1 , 'expected one diagnostic' ) ;
6152 assert (
6253 basicResult . messages [ 0 ] . message . includes ( 'Calling setState during render' ) ,
6354 'expected message to mention setState during render'
@@ -91,9 +82,7 @@ async function run() {
9182 fix : true ,
9283 } ) ;
9384 assert (
94- duplicateFixed . output . includes (
95- "{expectedErrors: {'react-compiler': [4]}}"
96- ) ,
85+ duplicateFixed . output . includes ( "{expectedErrors: {'react-compiler': [4]}}" ) ,
9786 'expected duplicates to be rewritten to a single canonical block'
9887 ) ;
9988 assert (
@@ -118,14 +107,12 @@ async function run() {
118107 fix : true ,
119108 } ) ;
120109 assert (
121- malformedFixed . output . includes (
122- "{expectedErrors: {'react-compiler': [4]}}"
123- ) ,
110+ malformedFixed . output . includes ( "{expectedErrors: {'react-compiler': [4]}}" ) ,
124111 'expected malformed metadata to be replaced with canonical form'
125112 ) ;
126113}
127114
128- run ( ) . catch ( error => {
115+ run ( ) . catch ( ( error ) => {
129116 console . error ( error ) ;
130117 process . exitCode = 1 ;
131118} ) ;
0 commit comments