Skip to content

Commit 3189c3c

Browse files
committed
fix: update linting
1 parent e54c7d9 commit 3189c3c

File tree

6 files changed

+79
-8
lines changed

6 files changed

+79
-8
lines changed

eslint.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import tseslint from 'typescript-eslint';
2+
import reactPlugin from 'eslint-plugin-react';
3+
import reactHooksPlugin from 'eslint-plugin-react-hooks';
4+
5+
export default {
6+
files: ['src/**/*.{js,jsx,ts,tsx}'],
7+
languageOptions: {
8+
parser: tseslint.parser,
9+
parserOptions: {
10+
project: './tsconfig.json',
11+
tsconfigRootDir: '.',
12+
ecmaFeatures: { jsx: true },
13+
},
14+
},
15+
plugins: {
16+
'@typescript-eslint': tseslint.plugin,
17+
'react': reactPlugin,
18+
'react-hooks': reactHooksPlugin,
19+
},
20+
rules: {
21+
'@typescript-eslint/no-unused-vars': 'error',
22+
'react/prop-types': 'off',
23+
'sort-imports': ['error', { ignoreDeclarationSort: true }],
24+
'@typescript-eslint/explicit-function-return-type': 'off',
25+
'react-hooks/rules-of-hooks': 'error',
26+
'react-hooks/exhaustive-deps': 'warn',
27+
'@typescript-eslint/interface-name-prefix': 'off',
28+
},
29+
settings: {
30+
react: {
31+
version: 'detect',
32+
},
33+
},
34+
};

package-lock.json

Lines changed: 41 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"clean": "rimraf dist"
2525
},
2626
"devDependencies": {
27+
"@eslint/js": "^9.29.0",
2728
"@testing-library/jest-dom": "^6.6.3",
2829
"@testing-library/react": "^16.3.0",
2930
"@testing-library/user-event": "^14.6.1",
@@ -61,6 +62,7 @@
6162
"tsconfig-paths-webpack-plugin": "^4.2.0",
6263
"tslib": "^2.8.1",
6364
"typescript": "^5.8.3",
65+
"typescript-eslint": "^8.34.0",
6466
"url-loader": "^4.1.1",
6567
"webpack": "^5.99.9",
6668
"webpack-bundle-analyzer": "^4.10.2",
@@ -76,5 +78,6 @@
7678
"react-dom": "^18",
7779
"sirv-cli": "^3.0.1"
7880
},
79-
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
81+
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
82+
"type": "module"
8083
}

src/app/Support/Support.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export interface ISupportProps {
1616
sampleProp?: string;
1717
}
1818

19-
// eslint-disable-next-line prefer-const
2019
let Support: React.FunctionComponent<ISupportProps> = () => (
2120
<PageSection hasBodyWrapper={false}>
2221
<EmptyState variant={EmptyStateVariant.full} titleText="Empty State (Stub Support Module)" icon={CubesIcon}>

src/app/routes.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import { NotFound } from '@app/NotFound/NotFound';
88

99
export interface IAppRoute {
1010
label?: string; // Excluding the label will exclude the route from the nav sidebar in AppLayout
11-
/* eslint-disable @typescript-eslint/no-explicit-any */
1211
element: React.ReactElement;
13-
/* eslint-enable @typescript-eslint/no-explicit-any */
1412
exact?: boolean;
1513
path: string;
1614
title: string;

src/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ if (process.env.NODE_ENV !== "production") {
1111
}
1212
]
1313
};
14-
// eslint-disable-next-line @typescript-eslint/no-require-imports
1514
const axe = require("react-axe");
1615
axe(React, ReactDOM, 1000, config);
1716
}

0 commit comments

Comments
 (0)