Skip to content

Commit

Permalink
build: upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed Sep 29, 2024
1 parent e5f28f5 commit 4792ced
Show file tree
Hide file tree
Showing 12 changed files with 1,451 additions and 5,957 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.cjs

This file was deleted.

324 changes: 162 additions & 162 deletions .yarn/releases/yarn-4.4.1.cjs → .yarn/releases/yarn-4.5.0.cjs

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
packageExtensions:
eslint-module-utils@*:
dependencies:
eslint-import-resolver-node: "*"

yarnPath: .yarn/releases/yarn-4.4.1.cjs
yarnPath: .yarn/releases/yarn-4.5.0.cjs
61 changes: 61 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettier from 'eslint-plugin-prettier';

export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, {
plugins: { prettier },
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'max-classes-per-file': 'off',
'no-underscore-dangle': 'off',
'import/extensions': 'off',
},
});

// 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
// });

// export default [...fixupConfigRules(compat.extends(
// "airbnb-typescript",
// "react-app",
// "plugin:prettier/recommended",
// "prettier",
// )), {
// plugins: {
// prettier: fixupPluginRules(prettier),
// },

// languageOptions: {
// ecmaVersion: 5,
// sourceType: "script",

// parserOptions: {
// project: "./tsconfig.eslint.json",
// },
// },

// settings: {
// react: {
// version: "99.99.99",
// },
// },

// rules: {
// "@typescript-eslint/no-explicit-any": "off",
// "max-classes-per-file": "off",
// "no-underscore-dangle": "off",
// "import/extensions": "off",
// },
// }];
6 changes: 0 additions & 6 deletions jest.config.js

This file was deleted.

52 changes: 18 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,62 +54,46 @@
],
"devDependencies": {
"@chiogen/rollup-plugin-terser": "^7.1.3",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.7",
"@rollup/plugin-typescript": "^11.1.6",
"@types/jest": "^29.5.12",
"@eslint/js": "^9.11.1",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-replace": "^6.0.1",
"@rollup/plugin-typescript": "^12.1.0",
"@types/jest-image-snapshot": "^6.4.0",
"@types/node": "^22.5.4",
"@types/seedrandom": "^3.0.8",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"@types/node": "^22.7.4",
"@yarnpkg/sdks": "^3.2.0",
"canvas": "^2.11.2",
"canvas-5-polyfill": "^0.1.5",
"chart.js": "^4.4.4",
"d3-scale": "^4.0.2",
"d3-scale-chromatic": "^3.1.0",
"eslint": "^9.10.0",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint": "^9.11.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.2",
"eslint-plugin-react-hooks": "^4.6.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-image-snapshot": "^6.4.0",
"jsdom": "^25.0.1",
"prettier": "^3.3.3",
"rimraf": "^6.0.1",
"rollup": "^4.21.2",
"rollup": "^4.22.5",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-dts": "^6.1.1",
"seedrandom": "^3.0.5",
"ts-jest": "^29.2.5",
"tslib": "^2.7.0",
"typedoc": "^0.26.6",
"typedoc-plugin-markdown": "^4.2.7",
"typedoc": "^0.26.7",
"typedoc-plugin-markdown": "^4.2.8",
"typedoc-vitepress-theme": "^1.0.1",
"typescript": "^5.5.4",
"typescript": "^5.6.2",
"typescript-eslint": "^8.7.0",
"vite": "^5.4.8",
"vitepress": "^1.3.4",
"vue": "^3.5.3",
"vitest": "^2.1.1",
"vue": "^3.5.10",
"vue-chartjs": "^5.3.1"
},
"resolutions": {
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0"
},
"scripts": {
"clean": "rimraf --glob build node_modules \"*.tgz\" \"*.tsbuildinfo\"",
"compile": "tsc -b tsconfig.c.json",
"start": "yarn run watch",
"watch": "rollup -c -w",
"build": "rollup -c",
"test": "yarn node --experimental-vm-modules $(yarn bin jest) --passWithNoTests --detectOpenHandles --forceExit",
"test": "vitest --passWithNoTests",
"test:watch": "yarn run test --watch",
"test:coverage": "yarn run test --coverage",
"lint": "yarn run eslint && yarn run prettier",
Expand All @@ -124,5 +108,5 @@
"docs:build": "yarn run docs:api && vitepress build docs",
"docs:preview": "vitepress preview docs"
},
"packageManager": "yarn@4.4.1"
"packageManager": "yarn@4.5.0"
}
3 changes: 1 addition & 2 deletions src/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import {
determineVisible,
ISpanLogicResult,
} from './utils';
// import 'jest';
import type { ILabelNode, IRawLabelNode } from './model';

import { describe, test } from 'vitest';
function nodeTest(
n: ILabelNode,
label: string,
Expand Down
2 changes: 1 addition & 1 deletion src/utils_bug_7.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { toNodes, parentsOf, lastOfLevel, countExpanded } from './utils';
import type { ILabelNodes, ILabelNode } from './model';

import { describe, test } from 'vitest';
describe('bug_#7', () => {
let nodes: ILabelNodes;
test('setup', () => {
Expand Down
4 changes: 0 additions & 4 deletions tsconfig.eslint.json

This file was deleted.

6 changes: 4 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"moduleResolution": "Bundler",
"jsx": "react",
"esModuleInterop": true,
"rootDir": "./src",
"baseUrl": "./",
"noEmit": true,
"paths": {
"@": ["./src"],
"*": ["*", "node_modules/*"]
"*": ["*", "node_modules/*"],
// workaround for: https:/vitest-dev/vitest/issues/4567
"rollup/parseAst": ["./node_modules/rollup/dist/parseAst"]
}
},
"include": ["src/**/*.ts", "src/**/*.tsx", "docs/**/*.tsx"]
Expand Down
9 changes: 9 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference types="vitest/config" />
import { defineConfig } from 'vite';

export default defineConfig({
test: {
environment: 'jsdom',
root: './src',
},
});
Loading

0 comments on commit 4792ced

Please sign in to comment.