Skip to content

Commit 9f6f4f5

Browse files
committed
Update eslint and prettier dependencies and settings
- Add eslint-config-prettier, eslint-plugin-import, eslint-plugin-no-null and eslint-plugin-react - Add prettier to .eslintrc.js files - Configure specific prettier indentation rule - Update eslint versions to align across packages - disable eslint no-shallow for @typescript-eslint/no-shadow" - disable @typescript-eslint/no-unsafe-declaration-merging (due to new eslint verison) - Some code fixes due new eslint Signed-off-by: Bernd Hufmann <[email protected]>
1 parent e2729f9 commit 9f6f4f5

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

base/.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ module.exports = {
1515
'plugin:@typescript-eslint/recommended',
1616
'../../../configs/base.eslintrc.json',
1717
'../../../configs/warnings.eslintrc.json',
18-
'../../../configs/errors.eslintrc.json'
18+
'../../../configs/errors.eslintrc.json',
19+
'prettier'
1920
],
2021
ignorePatterns: [
2122
'node_modules',

base/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
"tsp-typescript-client": "^0.7.0"
2020
},
2121
"devDependencies": {
22-
"@typescript-eslint/eslint-plugin": "^3.4.0",
23-
"@typescript-eslint/parser": "^3.4.0",
24-
"eslint": "^7.3.0",
22+
"@typescript-eslint/eslint-plugin": "^6.0.0",
23+
"@typescript-eslint/parser": "^6.0.0",
24+
"eslint": "^8.43.0",
2525
"eslint-plugin-import": "^2.21.2",
2626
"eslint-plugin-no-null": "^1.0.2",
2727
"eslint-plugin-react": "^7.20.0",
28+
"eslint-config-prettier": "^9.0.0",
2829
"prettier": "^3.6.2",
2930
"rimraf": "^5.0.0",
3031
"typescript": "4.9.5"

react-components/.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ module.exports = {
1919
'plugin:@typescript-eslint/recommended',
2020
'../../../configs/base.eslintrc.json',
2121
'../../../configs/warnings.eslintrc.json',
22-
'../../../configs/errors.eslintrc.json'
22+
'../../../configs/errors.eslintrc.json',
23+
'prettier'
2324
],
2425
ignorePatterns: [
2526
'node_modules',

react-components/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@
4949
"@types/react-modal": "^3.8.2",
5050
"@types/react-test-renderer": "^18.3.0",
5151
"@types/react-virtualized": "^9.21.1",
52-
"@typescript-eslint/eslint-plugin": "^3.4.0",
53-
"@typescript-eslint/parser": "^3.4.0",
54-
"eslint": "^7.3.0",
52+
"@typescript-eslint/eslint-plugin": "^6.0.0",
53+
"@typescript-eslint/parser": "^6.0.0",
54+
"eslint": "^8.43.0",
5555
"eslint-plugin-import": "^2.21.2",
5656
"eslint-plugin-no-null": "^1.0.2",
5757
"eslint-plugin-react": "^7.20.0",
58+
"eslint-config-prettier": "^9.0.0",
5859
"jest": "^28.1.3",
5960
"jest-canvas-mock": "^2.4.0",
6061
"jest-environment-jsdom": "^28.1.3",

react-components/src/components/utils/unit-controller-history-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class UnitControllerHistoryHandler {
8484
let oneIsDifferent = false;
8585
const { selectionRange: itemSR, viewRange: itemVR } = item;
8686
const { selectionRange: prevSR, viewRange: prevVR } = this.history[this.index];
87-
const check = (value1: BigInt | undefined, value2: BigInt | undefined) => {
87+
const check = (value1: bigint | undefined, value2: bigint | undefined) => {
8888
if (oneIsDifferent) {
8989
return;
9090
}

react-components/src/trace-explorer/trace-explorer-views-widget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export class ReactAvailableViewsWidget extends React.Component<ReactAvailableVie
300300
private handleCustomizeClick = async (entry: OutputDescriptor, e: React.MouseEvent) => {
301301
e.stopPropagation();
302302
if (this.props.onCustomizationClick && this._selectedExperiment) {
303-
await this.props.onCustomizationClick(entry, this._selectedExperiment);
303+
this.props.onCustomizationClick(entry, this._selectedExperiment);
304304
this.updateAvailableViews();
305305
}
306306
};

0 commit comments

Comments
 (0)