Skip to content

Commit eb3d3f7

Browse files
committed
build: upgrade
1 parent 448b422 commit eb3d3f7

13 files changed

+1459
-5911
lines changed

.eslintrc.cjs

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

.yarn/releases/yarn-4.4.1.cjs renamed to .yarn/releases/yarn-4.5.0.cjs

Lines changed: 162 additions & 162 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
packageExtensions:
2-
eslint-module-utils@*:
3-
dependencies:
4-
eslint-import-resolver-node: "*"
5-
6-
yarnPath: .yarn/releases/yarn-4.4.1.cjs
1+
yarnPath: .yarn/releases/yarn-4.5.0.cjs

eslint.config.mjs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
import prettier from 'eslint-plugin-prettier';
6+
7+
export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, {
8+
plugins: { prettier },
9+
rules: {
10+
'@typescript-eslint/no-explicit-any': 'off',
11+
'max-classes-per-file': 'off',
12+
'no-underscore-dangle': 'off',
13+
'import/extensions': 'off',
14+
},
15+
});
16+
17+
// import path from "node:path";
18+
// import { fileURLToPath } from "node:url";
19+
// import js from "@eslint/js";
20+
// import { FlatCompat } from "@eslint/eslintrc";
21+
22+
// const __filename = fileURLToPath(import.meta.url);
23+
// const __dirname = path.dirname(__filename);
24+
// const compat = new FlatCompat({
25+
// baseDirectory: __dirname,
26+
// recommendedConfig: js.configs.recommended,
27+
// allConfig: js.configs.all
28+
// });
29+
30+
// export default [...fixupConfigRules(compat.extends(
31+
// "airbnb-typescript",
32+
// "react-app",
33+
// "plugin:prettier/recommended",
34+
// "prettier",
35+
// )), {
36+
// plugins: {
37+
// prettier: fixupPluginRules(prettier),
38+
// },
39+
40+
// languageOptions: {
41+
// ecmaVersion: 5,
42+
// sourceType: "script",
43+
44+
// parserOptions: {
45+
// project: "./tsconfig.eslint.json",
46+
// },
47+
// },
48+
49+
// settings: {
50+
// react: {
51+
// version: "99.99.99",
52+
// },
53+
// },
54+
55+
// rules: {
56+
// "@typescript-eslint/no-explicit-any": "off",
57+
// "max-classes-per-file": "off",
58+
// "no-underscore-dangle": "off",
59+
// "import/extensions": "off",
60+
// },
61+
// }];

jest.config.js

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

package.json

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -64,75 +64,59 @@
6464
},
6565
"devDependencies": {
6666
"@chiogen/rollup-plugin-terser": "^7.1.3",
67-
"@rollup/plugin-commonjs": "^26.0.1",
68-
"@rollup/plugin-node-resolve": "^15.2.3",
69-
"@rollup/plugin-replace": "^5.0.7",
70-
"@rollup/plugin-typescript": "^11.1.6",
71-
"@types/jest": "^29.5.12",
67+
"@eslint/js": "^9.11.1",
68+
"@rollup/plugin-commonjs": "^28.0.0",
69+
"@rollup/plugin-node-resolve": "^15.3.0",
70+
"@rollup/plugin-replace": "^6.0.1",
71+
"@rollup/plugin-typescript": "^12.1.0",
7272
"@types/jest-image-snapshot": "^6.4.0",
73-
"@types/node": "^22.5.4",
74-
"@types/seedrandom": "^3.0.8",
75-
"@typescript-eslint/eslint-plugin": "^8.4.0",
76-
"@typescript-eslint/parser": "^8.4.0",
73+
"@types/node": "^22.7.4",
7774
"@yarnpkg/sdks": "^3.2.0",
7875
"canvas": "^2.11.2",
7976
"canvas-5-polyfill": "^0.1.5",
8077
"chart.js": "^4.4.4",
81-
"chartjs-plugin-datalabels": "^2.2.0",
82-
"chartjs-plugin-zoom": "^2.0.1",
83-
"eslint": "^9.10.0",
84-
"eslint-config-airbnb-typescript": "^18.0.0",
85-
"eslint-config-prettier": "^9.1.0",
86-
"eslint-config-react-app": "^7.0.1",
87-
"eslint-plugin-flowtype": "^8.0.3",
88-
"eslint-plugin-import": "^2.30.0",
89-
"eslint-plugin-jsx-a11y": "^6.10.0",
78+
"eslint": "^9.11.1",
9079
"eslint-plugin-prettier": "^5.2.1",
91-
"eslint-plugin-react": "^7.35.2",
92-
"eslint-plugin-react-hooks": "^4.6.2",
93-
"jest": "^29.7.0",
94-
"jest-environment-jsdom": "^29.7.0",
9580
"jest-image-snapshot": "^6.4.0",
81+
"jsdom": "^25.0.1",
9682
"prettier": "^3.3.3",
9783
"rimraf": "^6.0.1",
98-
"rollup": "~4.21.2",
84+
"rollup": "^4.22.5",
9985
"rollup-plugin-cleanup": "^3.2.1",
10086
"rollup-plugin-dts": "^6.1.1",
101-
"seedrandom": "^3.0.5",
10287
"ts-jest": "^29.2.5",
10388
"tslib": "^2.7.0",
104-
"typedoc": "^0.26.6",
105-
"typedoc-plugin-markdown": "^4.2.7",
89+
"typedoc": "^0.26.7",
90+
"typedoc-plugin-markdown": "^4.2.8",
10691
"typedoc-vitepress-theme": "^1.0.1",
107-
"typescript": "^5.5.4",
92+
"typescript": "^5.6.2",
93+
"typescript-eslint": "^8.7.0",
94+
"vite": "^5.4.8",
10895
"vitepress": "^1.3.4",
109-
"vue": "^3.5.3",
96+
"vitest": "^2.1.1",
97+
"vue": "^3.5.10",
11098
"vue-chartjs": "^5.3.1"
11199
},
112-
"resolutions": {
113-
"@typescript-eslint/eslint-plugin": "^7.2.0",
114-
"@typescript-eslint/parser": "^7.2.0"
115-
},
116100
"scripts": {
117101
"clean": "rimraf --glob build node_modules \"*.tgz\" \"*.tsbuildinfo\"",
118102
"compile": "tsc -b tsconfig.c.json",
119103
"start": "yarn run watch",
120104
"watch": "rollup -c -w",
121105
"build": "rollup -c",
122-
"test": "yarn node --experimental-vm-modules $(yarn bin jest) --passWithNoTests --detectOpenHandles --forceExit",
106+
"test": "vitest --passWithNoTests",
123107
"test:watch": "yarn run test --watch",
124108
"test:coverage": "yarn run test --coverage",
125109
"lint": "yarn run eslint && yarn run prettier",
126110
"fix": "yarn run eslint:fix && yarn run prettier:write",
127111
"prettier:write": "prettier \"*\" \"*/**\" --write",
128112
"prettier": "prettier \"*\" \"*/**\" --check",
129-
"eslint": "eslint src --ext .ts,.tsx --cache",
113+
"eslint": "eslint src --cache",
130114
"eslint:fix": "yarn run eslint --fix",
131115
"prepare": "yarn run build",
132116
"docs:api": "typedoc --options typedoc.json",
133117
"docs:dev": "vitepress dev docs",
134118
"docs:build": "yarn run docs:api && vitepress build docs",
135119
"docs:preview": "vitepress preview docs"
136120
},
137-
"packageManager": "yarn@4.4.1"
121+
"packageManager": "yarn@4.5.0"
138122
}

src/__tests__/createChart.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/// <reference types="jest" />
21
/// <reference types="node" />
32

3+
import { expect } from 'vitest';
44
import { Chart, ChartConfiguration, defaults, ChartType, DefaultDataPoint } from 'chart.js';
55
import { toMatchImageSnapshot, MatchImageSnapshotOptions } from 'jest-image-snapshot';
66
import 'canvas-5-polyfill';
@@ -12,7 +12,7 @@ function toBuffer(canvas: HTMLCanvasElement) {
1212
canvas.toBlob((b) => {
1313
const file = new FileReader();
1414
file.onload = () => resolve(Buffer.from(file.result as ArrayBuffer));
15-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
15+
1616
file.readAsArrayBuffer(b!);
1717
});
1818
});
@@ -40,7 +40,7 @@ export default function createChart<
4040
canvas.height = height;
4141
Object.assign(defaults.font, { family: 'Courier New' });
4242
// defaults.color = 'transparent';
43-
// eslint-disable-next-line no-param-reassign
43+
4444
config.options = {
4545
responsive: false,
4646
animation: {
@@ -56,7 +56,7 @@ export default function createChart<
5656
},
5757
...(config.options || {}),
5858
} as any;
59-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
59+
6060
const ctx = canvas.getContext('2d')!;
6161

6262
const t = new Chart<TYPE, DATA, LABEL>(ctx, config);

src/controllers/DendrogramController.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import createChart from '../__tests__/createChart';
33
import { DendrogramController } from './DendrogramController';
44
import nodes from './__tests__/tree';
55
import { EdgeLine } from '../elements';
6-
6+
import { describe, beforeAll, test } from 'vitest';
77
describe('dendrogram', () => {
88
beforeAll(() => {
99
registry.addControllers(DendrogramController);

src/controllers/forceDirected.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import createChart from '../__tests__/createChart';
33
import { ForceDirectedGraphController } from './ForceDirectedGraphController';
44
import data from './__tests__/miserables';
55
import { EdgeLine } from '../elements';
6-
6+
import { describe, beforeAll, test } from 'vitest';
77
describe('dendrogram', () => {
88
beforeAll(() => {
99
registry.addControllers(ForceDirectedGraphController);

tsconfig.eslint.json

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

0 commit comments

Comments
 (0)