@webority/repo-checks 0.164.0 → 0.167.0
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/LICENSE +1 -1
- package/README.md +4 -3
- package/dist/repo-checks.js +55 -52
- package/package.json +4 -4
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Copyright (c) Webority Technologies. All rights reserved.
|
|
2
2
|
|
|
3
|
-
This software and its
|
|
3
|
+
This software and its Webority packages are the proprietary and confidential property
|
|
4
4
|
of Webority Technologies. They are published publicly only for the convenience of
|
|
5
5
|
Webority's own projects and internal consumption.
|
|
6
6
|
|
package/README.md
CHANGED
|
@@ -67,6 +67,7 @@ The `missing-export:<file>` check runs the Biome installed beside the app or in
|
|
|
67
67
|
| `raw-bootstrap:<file>` | A `.jsx`, `.tsx` or `.cshtml` file writes a raw Bootstrap component class (`btn`, `card`, `modal`, `table`, `badge`, `alert`, `form-control`, `form-select`, `form-check-input`, `pagination`, `nav-tabs`, `dropdown-menu`, `offcanvas`, `breadcrumb`, `progress`, `spinner-border`, `accordion`); the message names the library component (`badge` names `AppBadge` / `<app-badge>`, and `AppStatusBadge` / `<app-status-badge>` for a badge that shows a status). A modifier such as `btn-primary` alone is not counted. Counted per file. |
|
|
68
68
|
| `bootstrap-overlay:<file>` | A `.cshtml` or `.html` file writes a Bootstrap overlay attribute (`data-bs-toggle` set to `modal`, `dropdown`, `tooltip`, `popover` or `offcanvas`, or `data-bs-dismiss` set to `modal` or `offcanvas`) or a hand-written `<dialog` or `popover` attribute, or a page script calls `bootstrap.Modal`, `bootstrap.Tooltip`, `bootstrap.Popover`, `bootstrap.Dropdown`, `bootstrap.Offcanvas`, `.showModal(` or `.showPopover(`. The message names `data-wui-open`, `data-wui-dismiss` or the app tag. Never recorded in the baseline; fix the finding. |
|
|
69
69
|
| `library-class-restyle:<file>` | A product `.scss` or `.css` selector names a class the library theme defines (a `wui-*` component class, an `app-*` shell, navigation or tab class, or a Bootstrap component class the theme skins: `btn`, `card`, `modal`, `table`, `form-control`, `form-select`, `form-check`, `form-label`, `form-text`, `badge`, `alert`, `dropdown`, `nav-tabs`, `nav-pills`, `nav-link`, `pagination`, `page-item`, `page-link`, `offcanvas`, `accordion`, `breadcrumb`, `progress`, `spinner-border`, `list-group`, `input-group`, each also with a `-suffix`), including as an ancestor (`.my-page .wui-card-body`, `.app-shell.collapsed .app-sidebar .brand-logo`); use a library prop or token, or a product class. A token file that only sets custom properties names no class and is not counted. Counted per file. |
|
|
70
|
+
| `unknown-icon:<file>` | A .cshtml or script file names an icon the library does not have, in an icon, left-icon, right-icon, leading-icon, trailing-icon, header-icon or title-icon attribute (or the React props of the same names) or the name of an app-icon / AppIcon. Names built at run time are not read. Counted per file. |
|
|
70
71
|
| `shadowed-library-name:<file>` | A `.jsx` or `.tsx` file imports a catalogue component from `@webority/ui-react` under another name and declares a component under the catalogue name (`import { AppButton as LibraryAppButton }` with `function AppButton`), so its call sites read as the library component. Use the library component and its props, or give the product component its own name. Counted per file. |
|
|
71
72
|
| `rename-wrapper:<file>` | A re-export of `@webority/ui-react`, a component whose body only returns one catalogue component, or a `_Name.cshtml` partial that is one `<app-*>` element: import the library name. Counted per file. |
|
|
72
73
|
| `single-use-component:<file>` | A file under `src/components/<feature>/` (not `layout/`), or a shared partial under `Pages/Shared/` or a `*.Web.Common` project, that fewer than two files use; move it next to the page that uses it. A layout is skipped: a `_…Layout.cshtml` file, or one that a `_ViewStart.cshtml` of the same project names with `Layout = "<name>"`, because areas find it by that name. A Razor file whose first line is `@* layering-allow single-use-component: <reason> *@` is skipped too; a mark with no reason is a finding. Counted per file. |
|
|
@@ -78,7 +79,7 @@ The `missing-export:<file>` check runs the Biome installed beside the app or in
|
|
|
78
79
|
| `api-thunk:<file>` | A call of `createAsyncThunk`, or of a name the file binds to `createAsyncThunk.withTypes`, in an app's source; an API call moves to an RTK Query endpoint in `services/api` (react.md: API data). An app's session module, `src/redux/action/accountAction` on a phone or web head, is not counted: its sign-in, token refresh, session restore and sign-out thunks are session flows, not API reads (react.md, react-native.md). Counted per file. |
|
|
79
80
|
| `screen-service-import:<file>` | A file under `src/screens/` imports from its head's `services/` folder other than the RTK Query api module (`services/api` or `services/api/*`); a screen reads data through that module. Counted per file. |
|
|
80
81
|
| `api-call:<file>` | A hand-written URL in an app's `src`: a `.get(`, `.post(`, `.put(`, `.patch(` or `.delete(` call whose first argument is a string or template starting with `/` or `api/`, or a function in a `services` folder declared to return `Promise<unknown>`. The reply type and the URL come from the generated contract: call the operation through `api("<OperationId>", request)` from `src/services/api/api.ts`. Counted per file. Warns until a release enforces it (`REPO_CHECKS_ENFORCE=api-call` fails it now). |
|
|
81
|
-
| `page-lint:<file>` | A Biome check finding (error or warning) in a server-rendered site's own page script or style: a tracked `.js`, `.mjs` or `.css` file under a `wwwroot` folder, linted from the repo root by the root `biome.json`. Vendored and minified files are never read: the token rules' exemptions apply, plus a `.min.js` or `.min.mjs` name and a path the root `.gitattributes` marks `linguist-vendored` (for example `MySite/wwwroot/external/** linguist-vendored`). With no Biome installed at the repo root the run prints a note naming how many page files went unread. A repo adopting it records today's counts once with `--baseline-adopt page-lint`. Counted per file. |
|
|
82
|
+
| `page-lint:<file>` | A Biome check finding (error or warning) in a server-rendered site's own page script or style: a tracked `.js`, `.mjs` or `.css` file under a `wwwroot` folder, linted from the repo root by the root `biome.json`. Vendored and minified files are never read: the token rules' exemptions apply, plus a `.min.js` or `.min.mjs` name and a path the root `.gitattributes` marks `linguist-vendored` (for example `MySite/wwwroot/external/** linguist-vendored`). With no Biome installed at the repo root the run prints a note naming how many page files went unread. A repo adopting it records today's counts once with `--baseline-adopt page-lint`. A page file over 200,000 bytes is skipped by the page lint and reported as one finding. Counted per file. |
|
|
82
83
|
| `oversize:<file>` | A `.jsx`, `.tsx` or `.cshtml` file over 600 lines (over 800 says to split it along its concerns). A warning only: it never fails, even outside the baseline. Counted per file. |
|
|
83
84
|
| `hook:drift` | The root `.husky/pre-commit` is missing or differs from the shared hook this package ships (CRLF is ignored) |
|
|
84
85
|
| `tracked-case:<path>` | A tracked file or folder whose name on disk differs only by letter case, a rename done by hand on a Mac that git never saw; a Linux checkout cannot find the import. Run the `git mv` the message gives. A folder is reported once. Always fails. |
|
|
@@ -111,7 +112,7 @@ Comment lines (`//`, `/*`, `*`) and `.test.` or `.spec.` files are not read by t
|
|
|
111
112
|
| `advisory` | Known advisories from `pnpm audit` (needs the network) | no | yes |
|
|
112
113
|
| `raw-measure`, `palette-read`, `raw-colour`, `root-font-size`, `raw-motion`, `dark-read` | Counted style rules: raw sizes, colours and motion, palette reads and the root font size | no | yes |
|
|
113
114
|
| `missing-canvas-key`, `repeated-canvas-key` | List items without a key, and repeated keys | no | yes |
|
|
114
|
-
| `raw-bootstrap`, `library-class-restyle`, `rename-wrapper`, `shadowed-library-name`, `single-use-component` | Raw Bootstrap classes, product CSS restyling the library, wrappers, shadowed names and single-use components | no | yes |
|
|
115
|
+
| `raw-bootstrap`, `library-class-restyle`, `unknown-icon`, `rename-wrapper`, `shadowed-library-name`, `single-use-component` | Raw Bootstrap classes, product CSS restyling the library, unknown icon names, wrappers, shadowed names and single-use components | no | yes |
|
|
115
116
|
| `bootstrap-overlay` | Bootstrap or native overlay markup (`data-bs-*` modal, dropdown, tooltip, popover or offcanvas, a hand-written `<dialog` or `popover`) and page-script overlay calls, which the app tags or `AppModal` replace | no | yes |
|
|
116
117
|
| `error-summary-title`, `route-internal-id`, `oversize` | Error summary titles, internal ids in routes and file size | no | yes |
|
|
117
118
|
| `script-integrity` | Scripts loaded from another host with no integrity hash | yes | yes |
|
|
@@ -129,7 +130,7 @@ Comment lines (`//`, `/*`, `*`) and `.test.` or `.spec.` files are not read by t
|
|
|
129
130
|
|
|
130
131
|
## Build mode
|
|
131
132
|
|
|
132
|
-
A portal's `build` script runs `pnpm exec webority-repo-checks --build` as its first step, so every build fails on a new finding (exit 1). Build mode skips these 33 rules: `lint`, `missing-export`, `stale-theme-name`, `advisory`, `raw-measure`, `palette-read`, `raw-colour`, `root-font-size`, `raw-motion`, `dark-read`, `missing-canvas-key`, `repeated-canvas-key`, `raw-bootstrap`, `library-class-restyle`, `rename-wrapper`, `shadowed-library-name`, `single-use-component`, `error-summary-title`, `route-internal-id`, `razor-page-handler`, `razor-page-link`, `web-route-literal`, `api-thunk`, `screen-service-import`, `api-call`, `oversize`, `page-lint`, `deprecated-import`, `react-string-ref`, `legacy-component-props`, `legacy-react-test-api`, `navigation-shim` and `legacy-node-sqlite`. Those rules run only in a full run (`pnpm exec webority-repo-checks` with no `--build`), which the push check still runs. Any rule not named here runs in both.
|
|
133
|
+
A portal's `build` script runs `pnpm exec webority-repo-checks --build` as its first step, so every build fails on a new finding (exit 1). Build mode skips these 33 rules: `lint`, `missing-export`, `stale-theme-name`, `advisory`, `raw-measure`, `palette-read`, `raw-colour`, `root-font-size`, `raw-motion`, `dark-read`, `missing-canvas-key`, `repeated-canvas-key`, `raw-bootstrap`, `library-class-restyle`, `unknown-icon`, `rename-wrapper`, `shadowed-library-name`, `single-use-component`, `error-summary-title`, `route-internal-id`, `razor-page-handler`, `razor-page-link`, `web-route-literal`, `api-thunk`, `screen-service-import`, `api-call`, `oversize`, `page-lint`, `deprecated-import`, `react-string-ref`, `legacy-component-props`, `legacy-react-test-api`, `navigation-shim` and `legacy-node-sqlite`. Those rules run only in a full run (`pnpm exec webority-repo-checks` with no `--build`), which the push check still runs. Any rule not named here runs in both.
|
|
133
134
|
|
|
134
135
|
`--skip-lint` skips only the `lint` rule; it combines with `--json`, `--offline` and folder arguments, and with `--build`, but not with the `--baseline-*` flags or `--sync-hook`.
|
|
135
136
|
|