Skip to content
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
4 changes: 2 additions & 2 deletions .clean-publish
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"withoutPublish": true,
"tempDir": "package",
"fields": ["tsd"],
"files": ["website"]
"fields": ["scripts", "publishConfig"],
"files": ["website", "sandboxes", "**/*.spec.{ts,tsx}"]
}
38 changes: 32 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"plugins": [
"@typescript-eslint",
"prettier"
],
"extends": [
"standard",
"standard-react",
Expand All @@ -22,11 +25,21 @@
}
},
"rules": {
"curly": [2, "multi-line"],
"quotes": [2, "single", "avoid-escape"],
"curly": [
2,
"multi-line"
],
"quotes": [
2,
"single",
"avoid-escape"
],
"react/display-name": 0,
"react/jsx-boolean-value": 1,
"jsx-quotes": [1, "prefer-single"],
"jsx-quotes": [
1,
"prefer-single"
],
"react/jsx-no-undef": 1,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 1,
Expand All @@ -37,11 +50,24 @@
"react/prop-types": 0,
"react/react-in-jsx-scope": 0,
"react/self-closing-comp": 1,
"semi": [2, "always"],
"semi": [
2,
"always"
],
"strict": 0,
"no-use-before-define": 0,
"@typescript-eslint/no-use-before-define": 2,
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-import-type-side-effects": "error"
}
},
"overrides": [
{
"files": [
"**/*.spec.tsx"
],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
}
]
}
6 changes: 2 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ jobs:
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build package
run: pnpm build
- name: Check types
run: pnpm test:typings
run: pnpm test:types
lint:
runs-on: ubuntu-latest
name: lint
Expand All @@ -47,7 +45,7 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Lint files
run: pnpm test:lint
run: pnpm lint
unit:
runs-on: ubuntu-latest
name: unit
Expand Down
6 changes: 6 additions & 0 deletions .size-limit.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,11 @@
"path": "dist/index.js",
"import": "{ Line }",
"limit": "600 B"
},
{
"name": "Event helper",
"path": "dist/index.js",
"import": "{ getElementAtEvent }",
"limit": "100 B"
}
]
37 changes: 12 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,27 @@
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"directory": "package"
"directory": "package",
"linkDirectory": false
},
"files": [
"dist"
],
"scripts": {
"prepublishOnly": "pnpm test && pnpm build && del ./package && clean-publish",
"postpublish": "del ./package",
"emitDeclarations": "tsc --emitDeclarationOnly",
"build": "rollup -c && pnpm emitDeclarations",
"clear:package": "del ./package",
"clear": "del ./package ./dist ./coverage ./storybook-static",
"prepublishOnly": "run test build clear:package clean-publish",
"postpublish": "pnpm clear:package",
"emitDeclarations": "tsc --emitDeclarationOnly -p tsconfig.build.json",
"build": "run -p [ vite build ] emitDeclarations",
"start:storybook": "storybook dev -p 6006 --ci",
"build:storybook": "del ./storybook-static; NODE_ENV=production storybook build",
"test:lint": "eslint \"src/**/*.{ts,tsx}\" \"stories/**/*.{ts,tsx}\" \"sandboxes/**/*.{ts,tsx}\" \"test/**/*.{ts,tsx}\"",
"lint": "eslint \"src/**/*.{ts,tsx}\" \"stories/**/*.{ts,tsx}\" \"sandboxes/**/*.{ts,tsx}\"",
"test:unit": "vitest run --coverage",
"test:unit:watch": "vitest watch",
"test:types": "tsc --noEmit",
"test:size": "size-limit",
"test:typings": "tsd",
"test": "pnpm test:lint && pnpm test:unit",
"test": "run -p lint test:unit test:types",
"format": "prettier --write src",
"commit": "cz",
"updateGitHooks": "simple-git-hooks"
Expand All @@ -63,7 +66,6 @@
"@commitlint/cli": "^17.0.0",
"@commitlint/config-conventional": "^17.0.0",
"@commitlint/cz-commitlint": "^17.0.0",
"@rollup/plugin-node-resolve": "^16.0.3",
"@size-limit/preset-small-lib": "^11.2.0",
"@storybook/addon-actions": "^8.4.7",
"@storybook/addon-controls": "^8.4.7",
Expand All @@ -74,11 +76,10 @@
"@storybook/react": "^8.4.7",
"@storybook/react-vite": "^8.4.7",
"@storybook/theming": "^8.4.7",
"@swc/core": "^1.13.5",
"@swc/helpers": "^0.5.17",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@trigen/scripts": "^12.0.0",
"@types/faker": "^5.5.8",
"@types/node": "^18.0.0",
"@types/react": "^19.2.2",
Expand All @@ -87,7 +88,6 @@
"@typescript-eslint/parser": "^8.18.0",
"@vitejs/plugin-react": "^5.0.0",
"@vitest/coverage-v8": "^4.0.0",
"browserslist": "^4.24.2",
"chart.js": "^4.4.7",
"chartjs-adapter-date-fns": "^3.0.0",
"chartjs-plugin-annotation": "^3.1.0",
Expand All @@ -111,25 +111,12 @@
"prettier": "^3.4.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"rollup": "^4.0.0",
"rollup-plugin-swc3": "^0.12.0",
"simple-git-hooks": "^2.6.1",
"size-limit": "^11.1.6",
"storybook": "^8.4.7",
"tsd": "^0.33.0",
"typescript": "^5.7.2",
"vite": "^7.0.0",
"vitest": "^4.0.0",
"vitest-canvas-mock": "^0.3.3"
},
"tsd": {
"directory": "./test",
"compilerOptions": {
"paths": {
"react-chartjs-2": [
"./src"
]
}
}
}
}
Loading
Loading