Skip to content

Commit 453584c

Browse files
authored
Merge pull request #2026 from no23reason/simple2
fix: trim published package, dead scripts, and lint config
2 parents c1844fd + e170fc1 commit 453584c

6 files changed

Lines changed: 11 additions & 187 deletions

File tree

.npmignore

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

eslint.config.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ import hooksPlugin from "eslint-plugin-react-hooks";
44

55
export default tseslint.config(
66
eslint.configs.recommended,
7-
tseslint.configs.recommended,
8-
tseslint.configs.strict,
9-
tseslint.configs.stylistic,
10-
tseslint.configs.recommendedTypeChecked,
117
tseslint.configs.strictTypeChecked,
128
tseslint.configs.stylisticTypeChecked,
139
{

package-lock.json

Lines changed: 4 additions & 164 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@
2222
"license": "MIT",
2323
"main": "dist-modules",
2424
"typings": "./dist-modules/index.d.ts",
25+
"files": [
26+
"dist-modules"
27+
],
2528
"sideEffects": false,
2629
"publishConfig": {
2730
"provenance": true
2831
},
2932
"scripts": {
3033
"dist": "rimraf ./dist-modules && tsc -p .",
3134
"prepublishOnly": "npm run dist",
32-
"prepush": "npm run test:lint && npm run test:js",
33-
"precommit": "pretty-quick --staged",
3435
"semantic-release": "semantic-release",
3536
"start": "npm run docs:dev",
3637
"test:js": "vitest run --coverage",
@@ -45,7 +46,6 @@
4546
},
4647
"devDependencies": {
4748
"@eslint/js": "^10.0.1",
48-
"@testing-library/jest-dom": "^6.0.0",
4949
"@testing-library/react": "^16.0.0",
5050
"@types/react": "^19.0.1",
5151
"@vitejs/plugin-react": "^6.0.3",
@@ -54,7 +54,6 @@
5454
"eslint-plugin-react-hooks": "^7.0.0",
5555
"jsdom": "^29.1.1",
5656
"prettier": "~3.8.0",
57-
"pretty-quick": "^4.0.0",
5857
"react": "^19.0.0",
5958
"react-dom": "^19.0.0",
6059
"react-github-corner": "^2.1.0",

tests/geolocated.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe("Geolocated", () => {
9090
};
9191

9292
const { findByText } = render(<Simple config={config} />);
93-
expect(await findByText("Location: 50, 20")).toBeInTheDocument();
93+
expect(await findByText("Location: 50, 20")).toBeTruthy();
9494
});
9595

9696
it("should throw on invalid geolocation provider", () => {
@@ -111,13 +111,13 @@ describe("Geolocated", () => {
111111

112112
const { findByText } = render(<Simple config={config} />);
113113

114-
expect(await findByText("Getting geolocation")).toBeInTheDocument();
114+
expect(await findByText("Getting geolocation")).toBeTruthy();
115115

116116
act(() => {
117117
vi.advanceTimersByTime(100);
118118
});
119119

120-
expect(await findByText("Geolocation NOT enabled")).toBeInTheDocument();
120+
expect(await findByText("Geolocation NOT enabled")).toBeTruthy();
121121
});
122122

123123
it("should cancel user decision timeout on success", async () => {
@@ -132,6 +132,6 @@ describe("Geolocated", () => {
132132
vi.advanceTimersByTime(200);
133133
});
134134

135-
expect(await findByText("Location: 50, 20")).toBeInTheDocument();
135+
expect(await findByText("Location: 50, 20")).toBeTruthy();
136136
});
137137
});

vitest.setup.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import "@testing-library/jest-dom";
21
import { vi } from "vitest";
32

43
// @testing-library detects installed fake timers via a global `jest`.

0 commit comments

Comments
 (0)