Skip to content

Commit 3636330

Browse files
committed
fix(eslint-config): fix curly-newline
1 parent 3551cc7 commit 3636330

File tree

2 files changed

+13
-4
lines changed
  • packages

2 files changed

+13
-4
lines changed

packages/eslint-config/src/subconfigs/basic.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ export default [
120120
exceptRange: true
121121
}
122122
],
123+
'no-empty': [
124+
'error',
125+
{
126+
allowEmptyCatch: true
127+
}
128+
],
123129

124130
// Variables
125131
'no-label-var': 'error',
@@ -223,7 +229,12 @@ export default [
223229
'@stylistic/no-trailing-spaces': 'error',
224230
'no-unneeded-ternary': 'error',
225231
'@stylistic/no-whitespace-before-property': 'error',
226-
'@stylistic/curly-newline': ['error', 'always'],
232+
'@stylistic/curly-newline': [
233+
'error',
234+
{
235+
minElements: 1
236+
}
237+
],
227238
'@stylistic/object-curly-newline': [
228239
'error',
229240
{

packages/project-files/src/fs.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ export async function writeFile(path, contents) {
1818
await mkdir(dir, {
1919
recursive: true
2020
})
21-
} catch {
22-
/* Ignore error */
23-
}
21+
} catch {}
2422

2523
return wf(path, contents)
2624
}

0 commit comments

Comments
 (0)