Skip to content

Commit 29f1e89

Browse files
committed
chore: update ESLint configuration and clean up unused rules
1 parent 7b9796c commit 29f1e89

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

eslint.config.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ export default [
2424
'test-results',
2525
'playwright-report',
2626
'storybook-static',
27+
'public',
2728
'.nx',
28-
'jest.config.ts',
2929
'**/*.js',
30-
'public',
3130
'applitools.config.cjs',
3231
],
3332
},
@@ -41,7 +40,10 @@ export default [
4140
},
4241
},
4342
{
44-
settings: { 'import/resolver': { typescript: true }, react: { version: 'detect' } },
43+
settings: {
44+
'import/resolver': { typescript: true },
45+
react: { version: 'detect' },
46+
},
4547
languageOptions: {
4648
parser: typescriptEslintParser,
4749
parserOptions: {
@@ -54,21 +56,22 @@ export default [
5456
},
5557
{
5658
rules: {
57-
...typescriptEslintEslintPlugin.configs.recommended.rules,
58-
...typescriptEslintEslintPlugin.configs['recommended-requiring-type-checking'].rules,
59-
...eslintPluginReact.configs.recommended.rules,
59+
// React
6060
'react-hooks/rules-of-hooks': 'error',
6161
'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
6262
'react/react-in-jsx-scope': 'off',
63+
// TypeScript
6364
'@typescript-eslint/no-explicit-any': 'warn',
6465
'@typescript-eslint/no-unsafe-call': 'off',
6566
'@typescript-eslint/no-unsafe-member-access': 'off',
6667
'@typescript-eslint/no-floating-promises': 'off',
6768
'@typescript-eslint/restrict-template-expressions': 'off',
6869
'@typescript-eslint/no-base-to-string': 'off',
6970
'@typescript-eslint/no-unsafe-assignment': 'off',
71+
// Import
7072
'import/no-unused-modules': 'error',
7173
'import/order': 'error',
74+
// Prettier
7275
'prettier/prettier': 'error',
7376
},
7477
},

src/pages/BugReportForm .tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ const BugReportForm = () => {
8686
<Form
8787
form={form}
8888
name="bug-report"
89-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
9089
onFinish={onFinish}
9190
onFinishFailed={onFinishFailed}
9291
labelCol={{ span: 6 }}

src/pages/components/Preloader.stories.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ let promise: Promise<void> | null = null
4949

5050
const useTimeout = (ms: number) => {
5151
if (!fulfilled) {
52-
// eslint-disable-next-line @typescript-eslint/only-throw-error
5352
throw (promise ||= new Promise((resolve) => {
5453
setTimeout(() => {
5554
fulfilled = true

src/pages/components/map-related/MapLayers/BusToolTip.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ export function BusToolTip({ position, icon, children }: BusToolTipProps) {
112112
<li>
113113
{`${t('sample_time')}: `}
114114
<span>
115-
{/* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion */}
116115
{dayjs(position.point!.recorded_at_time as string)
117116
.tz('Israel')
118117
.format(`l [${t('at_time')}] LT`)}

tests/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return */
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import * as fs from 'fs'
33
import * as path from 'path'
44
import * as crypto from 'crypto'

0 commit comments

Comments
 (0)