Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade many packages #681

Merged
merged 4 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import prettier from "eslint-plugin-prettier";
import tsParser from "@typescript-eslint/parser";
import { includeIgnoreFile } from "@eslint/compat";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
const gitignorePath = path.resolve(__dirname, ".gitignore");


export default [
includeIgnoreFile(gitignorePath),
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier",
), {
plugins: {
"@typescript-eslint": typescriptEslint,
prettier,
},
languageOptions: {
parser: tsParser,
},

rules: {
"prettier/prettier": ["error", {
endOfLine: "auto",
}],

"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-this-alias": "off",
},
}];
21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,25 @@
"docs:coverage": "yarn workspace phoenix-event-display docs:coverage"
},
"devDependencies": {
"@eslint/compat": "^1.1.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.1",
"@types/jest": "~29.5.12",
"@types/node": "^20.14.2",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"eslint": "^8.57.0",
"@types/node": "^22.5.2",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"eslint": "^9.9.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.1.3",
"husky": "^9.1.5",
"jest": "~29.7.0",
"jest-environment-jsdom": "~29.7.0",
"lerna": "^8.1.7",
"lint-staged": "^15.2.7",
"lerna": "^8.1.8",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"rimraf": "^5.0.9",
"rimraf": "^6.0.1",
"ts-jest-mock-import-meta": "^1.2.0",
"typescript": "~5.4.5"
"typescript": "~5.5.4"
},
"packageManager": "yarn@3.3.1",
"peerDependencies": {
Expand Down
20 changes: 10 additions & 10 deletions packages/phoenix-event-display/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,30 @@
"prettier": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore",
"prettier:check": "yarn prettier --check .",
"prettier:write": "yarn prettier --write .",
"eslint": "eslint src/**/*.ts --ignore-path ../../.gitignore",
"eslint": "eslint src/**/*.ts ",
"eslint:fix": "yarn eslint --fix"
},
"dependencies": {
"@babel/core": "^7.24.7",
"@babel/core": "^7.25.2",
"@tweenjs/tween.js": "^23.1.2",
"dat.gui": "^0.7.9",
"html2canvas": "^1.4.1",
"jsroot": "^7.7.2",
"jsroot": "^7.7.3",
"jszip": "^3.10.1",
"stats-js": "^1.0.1",
"three": "^0.167.0"
"three": "^0.168.0"
},
"devDependencies": {
"@babel/helper-string-parser": "^7.24.7",
"@babel/plugin-transform-runtime": "^7.24.7",
"@babel/helper-string-parser": "^7.24.8",
"@babel/plugin-transform-runtime": "^7.25.4",
"@compodoc/compodoc": "^1.1.25",
"@types/dat.gui": "^0.7.13",
"@types/three": "^0.167.1",
"@types/three": "^0.168.0",
"esbuild-loader": "^4.2.2",
"jest": "^29.7.0",
"ts-jest": "~29.2.3",
"typescript": "~5.4.5",
"webpack": "^5.93.0",
"ts-jest": "~29.2.5",
"typescript": "~5.5.4",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ export class JiveXMLLoader extends PhoenixLoader {
track.pos = pos;
}
if (
// eslint-disable-next-line no-constant-condition
// eslint-disable-next-line
false &&
numHits.length > 0 &&
trackCollectionName?.includes('Muon')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ export class ImportManager {
private processGLTFSceneName(sceneName?: string, menuNodeName?: string) {
if (sceneName) {
const nodes = sceneName.split('_>_');
menuNodeName && nodes.unshift(menuNodeName);
menuNodeName && nodes.unshift(menuNodeName); // eslint-disable-line
const fullNodeName = nodes.join(' > ');
nodes.pop();
const menuName = nodes.join(' > ');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ export class SceneManager {
if (objectChild.material) {
// Changing renderOrder to make event data render on top of geometry
// Arbitrarily setting a high value of 999
// eslint-disable-next-line
value
? (objectChild.renderOrder = 0)
: (objectChild.renderOrder = 999);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export class SelectionManager {
*/
public setSelecting(enable: boolean) {
if (this.isInit) {
// eslint-disable-next-line
enable ? this.enableSelecting() : this.disableSelecting();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export class PhoenixMenuNode {

this.childrenActive = jsonObject['childrenActive'];
this.toggleState = jsonObject['toggleState'];
// eslint-disable-next-line
this.toggleState !== undefined && this.onToggle?.(this.toggleState);

for (const configState of jsonObject['configs']) {
Expand Down
18 changes: 9 additions & 9 deletions packages/phoenix-ng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"prettier": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore",
"prettier:check": "yarn prettier --check .",
"prettier:write": "yarn prettier --write .",
"eslint": "eslint projects/**/*.ts --ignore-path ../../.gitignore",
"eslint": "eslint projects/**/*.ts",
"eslint:fix": "yarn eslint --fix",
"deploy": "mv ../../docs/api-docs ../../api-docs && yarn build:app --output-path ../../docs --base-href \"/phoenix/\" && cp ../../docs/index.html ../../docs/404.html && mv ../../api-docs ../../docs/api-docs",
"version": "yarn deploy",
Expand All @@ -39,12 +39,12 @@
"jszip": "^3.10.1",
"phoenix-event-display": "^2.16.0",
"phoenix-ui-components": "^2.16.0",
"qrcode": "1.5.3",
"qrcode": "1.5.4",
"rxjs": "^7.8.1",
"three": "^0.167.0",
"tslib": "^2.6.3",
"typescript": "~5.4.5",
"zone.js": "^0.14.8"
"three": "^0.168.0",
"tslib": "^2.7.0",
"typescript": "~5.5.4",
"zone.js": "^0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.2.2",
Expand All @@ -53,11 +53,11 @@
"@angular/language-service": "^18.2.2",
"@types/qrcode": "^1.5.5",
"concurrently": "^8.2.2",
"cypress": "^13.13.1",
"cypress": "^13.14.1",
"jest": "^29.7.0",
"jest-preset-angular": "^14.2.0",
"jest-preset-angular": "^14.2.2",
"ng-packagr": "^18.2.1",
"ts-jest": "^29.2.3"
"ts-jest": "^29.2.5"
},
"peerDependencies": {
"jspdf": "*"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { initPlugin } = require('cypress-plugin-snapshots/plugin');

module.exports = (on, config) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export class ConfigSliderComponent {
@Input() allowCustomValue: boolean = false;
@Output() onChange: EventEmitter<number> = new EventEmitter<number>();

onValueChange(value: number) {
value && this.onChange.emit(value);
onValueChange(value: number): void {
if (value) this.onChange.emit(value);
}

toggleMinCut(change: MatCheckboxChange) {
toggleMinCut(change: MatCheckboxChange): void {
const value = change.checked;
if (value) {
this.min = this.oldMin;
Expand All @@ -31,7 +31,7 @@ export class ConfigSliderComponent {
// We should probably disable the min input too, and change text to be infinity symbol or something?
}

toggleMaxCut(change: MatCheckboxChange) {
toggleMaxCut(change: MatCheckboxChange): void {
const value = change.checked;
if (value) {
this.max = this.oldMax;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ export class CollectionsInfoComponent implements OnInit, OnDestroy {
toggleOverlay() {
this.showObjectsInfo = !this.showObjectsInfo;
this.overlayWindow.instance.showObjectsInfo = this.showObjectsInfo;
this.showObjectsInfo
? this.overlayWindow.instance.enableHighlighting()
: this.overlayWindow.instance.disableHighlighting();
if (this.showObjectsInfo) {
this.overlayWindow.instance.enableHighlighting();
} else {
this.overlayWindow.instance.disableHighlighting();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class GeometryBrowserComponent implements OnInit, OnDestroy {
toggleOverlay() {
this.browseDetectorParts = !this.browseDetectorParts;
this.overlayWindow.instance.browseDetectorParts = this.browseDetectorParts;
// eslint-disable-next-line
this.browseDetectorParts
? this.overlayWindow.instance.enableHighlighting()
: this.overlayWindow.instance.disableHighlighting();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
"@angular/material": "^18.2.2",
"@angular/platform-browser": "^18.2.2",
"css-element-queries": "^1.2.3",
"qrcode": "1.5.3",
"qrcode": "1.5.4",
"rxjs": "^7.8.1",
"three": "^0.167.0",
"tslib": "^2.6.3"
"three": "^0.168.0",
"tslib": "^2.7.0"
},
"devDependencies": {
"node-fetch": "^3.3.2",
"rimraf": "^5.0.9"
"rimraf": "^6.0.1"
},
"module": "dist/fesm2022/phoenix-ui-components.mjs",
"typings": "dist/index.d.ts",
Expand Down
Loading
Loading