diff --git a/eslint.config.mjs b/eslint.config.mjs index 341d2bbbf..b1c2bc7d0 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -129,8 +129,7 @@ export default [ 'unicorn/catch-error-name': [ 'error', { - name: 'err', - ignore: ['^err.*$'], + ignore: ['err'], }, ], 'unicorn/switch-case-braces': 'off', diff --git a/node-src/ui/messages/errors/invalidConfigurationFile.stories.ts b/node-src/ui/messages/errors/invalidConfigurationFile.stories.ts index 7d8f6a835..4e6cdf222 100644 --- a/node-src/ui/messages/errors/invalidConfigurationFile.stories.ts +++ b/node-src/ui/messages/errors/invalidConfigurationFile.stories.ts @@ -12,8 +12,8 @@ try { a: z.string(), b: z.number(), }).parse({ a: 1, b: '1' }); -} catch (aErr) { - err = aErr; +} catch (error) { + err = error; } export const InvalidConfigurationFile = () => invalidConfigurationFile('./my.config.json', err); diff --git a/node-src/ui/messages/errors/unparseableConfigurationFile.stories.ts b/node-src/ui/messages/errors/unparseableConfigurationFile.stories.ts index 4f41b0181..84b37af0c 100644 --- a/node-src/ui/messages/errors/unparseableConfigurationFile.stories.ts +++ b/node-src/ui/messages/errors/unparseableConfigurationFile.stories.ts @@ -7,8 +7,8 @@ export default { let err; try { JSON.parse('foo'); -} catch (aErr) { - err = aErr; +} catch (error) { + err = error; } export const UnparseableConfigurationFile = () =>