Skip to content

Commit 7c1e11b

Browse files
committed
feat(build): migrate to oxlint/oxfmt
1 parent 25c83d1 commit 7c1e11b

File tree

67 files changed

+3235
-4493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+3235
-4493
lines changed

.eslintrc.js

Lines changed: 0 additions & 70 deletions
This file was deleted.

.oxfmtrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 80,
4+
"singleQuote": true,
5+
"trailingComma": "es5",
6+
"arrowParens": "always",
7+
"sortPackageJson": false,
8+
"ignorePatterns": []
9+
}

.oxlintrc.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["import"],
4+
"env": {
5+
"es2020": true,
6+
"es6": true,
7+
"browser": true
8+
},
9+
"globals": {
10+
"__BASE_PATH__": "readonly",
11+
"__VTK_TEST_NO_WEBGL__": "readonly",
12+
"__VTK_TEST_WEBGPU__": "readonly",
13+
"VRFrameData": "readonly"
14+
},
15+
"rules": {
16+
"linebreak-style": "off",
17+
"no-console": "off",
18+
"no-param-reassign": [
19+
"warn",
20+
{
21+
"props": false
22+
}
23+
],
24+
"no-plusplus": "off",
25+
"no-underscore-dangle": "off",
26+
"no-unused-vars": [
27+
"warn",
28+
{
29+
"args": "none"
30+
}
31+
],
32+
"prefer-destructuring": "off"
33+
},
34+
"ignorePatterns": [
35+
"**/example_/*.js",
36+
"Utilities/**/*.js",
37+
"vite.config.js",
38+
"vitest.config.js",
39+
".eslintrc.js"
40+
]
41+
}

Examples/Rendering/ImageResliceMapperLabelOutline/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,8 @@ async function update() {
292292
}
293293
});
294294

295-
const { image: itkImage } = await window.itk.readImageDICOMArrayBufferSeries(
296-
arrayBuffers
297-
);
295+
const { image: itkImage } =
296+
await window.itk.readImageDICOMArrayBufferSeries(arrayBuffers);
298297

299298
const vtkImage = vtkITKHelper.convertItkToVtkImage(itkImage);
300299
setImage(vtkImage);

Sources/Common/DataModel/AbstractPointLocator/index.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import vtkLocator, { ILocatorInitialValues } from '../Locator';
55
/**
66
*
77
*/
8-
export interface IAbstractPointLocatorInitialValues
9-
extends ILocatorInitialValues {
8+
export interface IAbstractPointLocatorInitialValues extends ILocatorInitialValues {
109
bounds?: Bounds;
1110
numberOfBuckets: number;
1211
}

Sources/Common/DataModel/CardinalSpline1D/index.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import vtkSpline1D, {
44
BoundaryCondition,
55
} from '../Spline1D';
66

7-
export interface ICardinalSpline1DInitialValues
8-
extends ISpline1DInitialValues {}
7+
export interface ICardinalSpline1DInitialValues extends ISpline1DInitialValues {}
98

109
export interface vtkCardinalSpline1D extends vtkSpline1D {
1110
/**

Sources/Common/DataModel/DataSetAttributes/index.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ export enum DesiredOutputPrecision {
8888
/**
8989
*
9090
*/
91-
export interface IDataSetAttributesInitialValues
92-
extends IFieldDataInitialValues {
91+
export interface IDataSetAttributesInitialValues extends IFieldDataInitialValues {
9392
activeScalars?: number;
9493
activeVectors?: number;
9594
activeTensors?: number;

Sources/Common/DataModel/IncrementalOctreePointLocator/index.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { IAbstractPointLocatorInitialValues } from '../AbstractPointLocator';
66
/**
77
*
88
*/
9-
export interface IIncrementalOctreePointLocatorInitialValues
10-
extends IAbstractPointLocatorInitialValues {
9+
export interface IIncrementalOctreePointLocatorInitialValues extends IAbstractPointLocatorInitialValues {
1110
fudgeFactor: number;
1211
octreeMaxDimSize: number;
1312
buildCubicOctree: boolean;
@@ -20,8 +19,7 @@ export interface IIncrementalOctreePointLocatorInitialValues
2019

2120
type vtkIncrementalOctreePointLocatorBase = vtkObject;
2221

23-
export interface vtkIncrementalOctreePointLocator
24-
extends vtkIncrementalOctreePointLocatorBase {}
22+
export interface vtkIncrementalOctreePointLocator extends vtkIncrementalOctreePointLocatorBase {}
2523

2624
// ----------------------------------------------------------------------------
2725
// Static API

Sources/Common/DataModel/PointLocator/index.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import vtkPolyData from '../PolyData';
88
/**
99
*
1010
*/
11-
export interface IPointLocatorInitialValues
12-
extends IAbstractPointLocatorInitialValues {
11+
export interface IPointLocatorInitialValues extends IAbstractPointLocatorInitialValues {
1312
numberOfPointsPerBucket?: number;
1413
bucketSize?: number;
1514
}

Sources/Filters/General/ImageDataOutlineFilter/index.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ export interface IImageDataOutlineFilterInitialValues {}
88

99
type vtkImageDataOutlineFilterBase = vtkObject & vtkAlgorithm;
1010

11-
export interface vtkImageDataOutlineFilter
12-
extends vtkImageDataOutlineFilterBase {
11+
export interface vtkImageDataOutlineFilter extends vtkImageDataOutlineFilterBase {
1312
/**
1413
*
1514
* @param inData

0 commit comments

Comments
 (0)