File tree 3 files changed +6
-6
lines changed
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 = {}) {
73
73
74
74
let eslintConfigContent : string = ''
75
75
76
- const coderwydConfig = `${ eslintIgnores . length ? `ignores: ${ JSON . stringify ( eslintIgnores ) } ` : '' } `
76
+ const coderwydConfig = `${ eslintIgnores . length > 0 ? `ignores: ${ JSON . stringify ( eslintIgnores ) } ` : '' } `
77
77
if ( pkg . type === 'module' ) {
78
78
eslintConfigContent = `
79
79
import { defineConfig } from '@coderwyd/eslint-config'
@@ -96,7 +96,7 @@ module.exports = defineConfig({\n${coderwydConfig}\n})
96
96
files . forEach ( file => {
97
97
if ( file . includes ( 'eslint' ) || file . includes ( 'prettier' ) ) legacyConfig . push ( file )
98
98
} )
99
- if ( legacyConfig . length ) {
99
+ if ( legacyConfig . length > 0 ) {
100
100
console . log ( `${ WARN } you can now remove those files manually:` )
101
101
console . log ( ` ${ c . dim ( legacyConfig . join ( ', ' ) ) } ` )
102
102
}
@@ -122,8 +122,8 @@ module.exports = defineConfig({\n${coderwydConfig}\n})
122
122
} ,
123
123
} ,
124
124
)
125
- } catch ( cancelled : any ) {
126
- console . log ( cancelled . message )
125
+ } catch ( error : any ) {
126
+ console . log ( error . message )
127
127
return
128
128
}
129
129
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export function isGitClean() {
4
4
try {
5
5
execSync ( 'git diff-index --quiet HEAD --' )
6
6
return true
7
- } catch ( error ) {
7
+ } catch {
8
8
return false
9
9
}
10
10
}
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ export async function defineConfig(
175
175
if ( key in options ) acc [ key ] = options [ key ] as any
176
176
return acc
177
177
} , { } as FlatConfigItem )
178
- if ( Object . keys ( fusedConfig ) . length ) configs . push ( [ fusedConfig ] )
178
+ if ( Object . keys ( fusedConfig ) . length > 0 ) configs . push ( [ fusedConfig ] )
179
179
180
180
const merged = combine ( ...configs , ...userConfigs )
181
181
You can’t perform that action at this time.
0 commit comments