chore(prettier): full repo linting and code reformatting once and for all (#3627)

This commit is contained in:
Alireza authored and GitHub committed 2023-09-01 16:19:39 -04:00
1 parent 01500a2d4c
commit 9045ddaedc
656 files changed
+21737 -20628

No files matched your search

@@ -7,7 +7,6 @@ const ENTRY = {
app: `${SRC_DIR}/index.tsx`,
};
module.exports = (env, argv) => {
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR, ENTRY });
};
@@ -1,5 +1,5 @@
const webpack = require('webpack');
const {merge} = require('webpack-merge');
const { merge } = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.base.js');
const pkg = require('./../package.json');
@@ -38,13 +38,7 @@ module.exports = (env, argv) => {
libraryExport: 'default',
filename: pkg.main,
},
externals: [
/\b(vtk.js)/,
/\b(dcmjs)/,
/\b(gl-matrix)/,
/^@ohif/,
/^@cornerstonejs/,
],
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
@@ -1,4 +1,2 @@
export default (study, extraData) =>
Math.max(
...(extraData?.displaySets?.map?.(ds => ds.numImageFrames ?? 0) || [0])
);
Math.max(...(extraData?.displaySets?.map?.(ds => ds.numImageFrames ?? 0) || [0]));
@@ -6,7 +6,7 @@
* `sameDisplaySetId` as the display set id to look for
* From `options`, it looks for
*/
export default function(displaySet, options) {
export default function (displaySet, options) {
const { sameAttribute, sameDisplaySetId } = this;
if (!sameAttribute) {
console.log('sameAttribute not defined in', this);
@@ -23,16 +23,9 @@ export default function(displaySet, options) {
return false;
}
const { displaySetInstanceUID } = match;
const altDisplaySet = displaySets.find(
it => it.displaySetInstanceUID == displaySetInstanceUID
);
const altDisplaySet = displaySets.find(it => it.displaySetInstanceUID == displaySetInstanceUID);
if (!altDisplaySet) {
console.log(
'No display set found with',
displaySetInstanceUID,
'in',
displaySets
);
console.log('No display set found with', displaySetInstanceUID, 'in', displaySets);
return false;
}
const testValue = altDisplaySet[sameAttribute];
@@ -2,7 +2,7 @@ const codeMenuItem = {
id: '@ohif/contextMenuAnnotationCode',
/** Applies the code value setup for this item */
transform: function(customizationService) {
transform: function (customizationService) {
const { code: codeRef } = this;
if (!codeRef) {
throw new Error(`item ${this} has no code ref`);
@@ -1,8 +1,4 @@
import {
codingValues,
contextMenuCodeItem,
findingsContextMenu,
} from './custom-context-menu';
import { codingValues, contextMenuCodeItem, findingsContextMenu } from './custom-context-menu';
export default function getCustomizationModule() {
return [
@@ -220,14 +220,7 @@ const hpTestSwitch: Types.HangingProtocol.Protocol = {
viewportStructure: viewportStructure32,
// Note the following structure simply preserves the viewportId for
// a given screen position
viewports: [
viewport0a,
viewport1b,
viewport4e,
viewport2c,
viewport3d,
viewport5f,
],
viewports: [viewport0a, viewport1b, viewport4e, viewport2c, viewport3d, viewport5f],
},
{
name: '2x2 1c0d3a2b',