File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export async function run(options: RuleOptions = {}) {
7373
7474 let eslintConfigContent : string = ''
7575
76- const coderwydConfig = `${ eslintIgnores . length ? `ignores: ${ JSON . stringify ( eslintIgnores ) } ` : '' } `
76+ const coderwydConfig = `${ eslintIgnores . length > 0 ? `ignores: ${ JSON . stringify ( eslintIgnores ) } ` : '' } `
7777 if ( pkg . type === 'module' ) {
7878 eslintConfigContent = `
7979import { defineConfig } from '@coderwyd/eslint-config'
@@ -96,7 +96,7 @@ module.exports = defineConfig({\n${coderwydConfig}\n})
9696 files . forEach ( file => {
9797 if ( file . includes ( 'eslint' ) || file . includes ( 'prettier' ) ) legacyConfig . push ( file )
9898 } )
99- if ( legacyConfig . length ) {
99+ if ( legacyConfig . length > 0 ) {
100100 console . log ( `${ WARN } you can now remove those files manually:` )
101101 console . log ( ` ${ c . dim ( legacyConfig . join ( ', ' ) ) } ` )
102102 }
@@ -122,8 +122,8 @@ module.exports = defineConfig({\n${coderwydConfig}\n})
122122 } ,
123123 } ,
124124 )
125- } catch ( cancelled : any ) {
126- console . log ( cancelled . message )
125+ } catch ( error : any ) {
126+ console . log ( error . message )
127127 return
128128 }
129129 }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export function isGitClean() {
44 try {
55 execSync ( 'git diff-index --quiet HEAD --' )
66 return true
7- } catch ( error ) {
7+ } catch {
88 return false
99 }
1010}
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ export async function defineConfig(
175175 if ( key in options ) acc [ key ] = options [ key ] as any
176176 return acc
177177 } , { } as FlatConfigItem )
178- if ( Object . keys ( fusedConfig ) . length ) configs . push ( [ fusedConfig ] )
178+ if ( Object . keys ( fusedConfig ) . length > 0 ) configs . push ( [ fusedConfig ] )
179179
180180 const merged = combine ( ...configs , ...userConfigs )
181181
You can’t perform that action at this time.
0 commit comments