@thepalaceproject/circulation-admin 1.41.0-post.33 → 1.41.0-post.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +3 -2
- package/README.md +1 -1
- package/dist/circulation-admin.js +1 -1
- package/eslint.config.mjs +14 -19
- package/jest.polyfills.js +0 -1
- package/package.json +7 -9
- package/scripts/syncPatronBlockingDocs.js +0 -1
- package/testReporter.js +0 -2
- package/tests/browser/commands/goHome.js +3 -4
- package/tests/browser/navigate.js +114 -124
- package/tests/browser/redirect.js +26 -41
- package/tests/jest/components/AdvancedSearchBuilder.test.tsx +1 -1
- package/tests/jest/components/CustomLists.test.tsx +0 -1
- package/tests/jest/components/DebugAuthentication.test.tsx +0 -2
- package/tests/jest/components/InventoryReportRequestModal.test.tsx +3 -5
- package/tests/jest/components/JsonField.test.tsx +0 -1
- package/tests/jest/components/LaneEditor.test.tsx +1 -1
- package/tests/jest/components/PatronBlockingRulesHelpModal.test.tsx +6 -8
- package/tests/jest/components/QuicksightDashboard.test.tsx +0 -1
- package/tests/jest/components/Stats.test.tsx +7 -13
- package/tests/jest/features/book.test.ts +2 -7
- package/webpack.common.js +0 -2
- package/webpack.dev-server.config.js +1 -3
- package/webpack.dev.config.js +3 -3
- package/webpack.prod.config.js +4 -4
- package/tslint.json +0 -56
package/CLAUDE.md
CHANGED
|
@@ -14,7 +14,8 @@ Built on `@thepalaceproject/web-opds-client` which provides the base OPDS catalo
|
|
|
14
14
|
npm run dev # Watch build (for use with local Circulation Manager)
|
|
15
15
|
npm run dev-server -- --env=backend=https://your-cm-url # Dev server against remote backend
|
|
16
16
|
npm run prod # Production build
|
|
17
|
-
npm run lint # Run
|
|
17
|
+
npm run lint # Run ESLint (lint:js) + sass-lint
|
|
18
|
+
npm run lint:js # Run ESLint over the whole tree (eslint . --max-warnings 0)
|
|
18
19
|
npm test # Full test suite (mocha legacy + jest)
|
|
19
20
|
npm run test-jest # Jest tests only
|
|
20
21
|
npm run test-jest-file <path> # Single jest test: npm run test-jest-file tests/jest/components/MyTest.test.tsx
|
|
@@ -70,7 +71,7 @@ The dev server can also read the backend URL from `.env` or `.env.local` with `B
|
|
|
70
71
|
## Code Style
|
|
71
72
|
|
|
72
73
|
- Prettier: double quotes, semicolons, trailing commas (es5), 80 char width
|
|
73
|
-
- ESLint with `jsx-a11y/strict` —
|
|
74
|
+
- ESLint (flat config, `eslint.config.mjs`) with `jsx-a11y/strict` — runs on the whole tree in CI via `npm run lint:js` (`eslint . --max-warnings 0`, so warnings fail the build) and on staged files via the husky pre-commit hook. `npm run lint` runs ESLint (`lint:js`) followed by sass-lint.
|
|
74
75
|
- `@typescript-eslint/no-explicit-any` is disabled (any is allowed)
|
|
75
76
|
- Prefer template literals over string concatenation for building strings with variables
|
|
76
77
|
- When an arrow function only passes its arguments through to another function with the same signature, pass the function directly instead of wrapping it (e.g., `onClick: this.handleClick` not `onClick: (e) => this.handleClick(e)`)
|
package/README.md
CHANGED
|
@@ -118,7 +118,7 @@ publish the release. The GitHub Actions workflow will automatically build, test,
|
|
|
118
118
|
|
|
119
119
|
## Accessibility
|
|
120
120
|
|
|
121
|
-
In order to develop user interfaces that are accessible to everyone, there are tools added to the workflow. Besides the
|
|
121
|
+
In order to develop user interfaces that are accessible to everyone, there are tools added to the workflow. Besides the ESLint `jsx-a11y` plugin, `react-axe` is also installed for local development. Using that module while running the app uses a lot of resources so it should be only when specifically testing for accessibility and not while actively developing new features or fixing bugs.
|
|
122
122
|
|
|
123
123
|
In order to run the app with `react-axe`, run `npm run dev-test-axe`. This will add a local global variable `process.env.TEST_AXE` (through webpack) that will trigger `react-axe` in `/src/index.tsx`. The output will be seen in the _browser's_ console terminal.
|
|
124
124
|
|