adamantite 0.45.0 → 0.46.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.
Files changed (60) hide show
  1. package/README.md +368 -122
  2. package/dist/index.js +638 -57
  3. package/dist/oxlint.js +1 -0
  4. package/dist/presets/analyze.js +1 -0
  5. package/dist/presets/lint/{react-doctor.d.ts → architecture.d.ts} +1 -1
  6. package/dist/presets/lint/architecture.js +8 -0
  7. package/dist/presets/lint/core.js +0 -1
  8. package/dist/presets/lint/effect.js +26 -1
  9. package/dist/presets/lint/plugin/glob.d.ts +7 -0
  10. package/dist/presets/lint/plugin/glob.js +48 -0
  11. package/dist/presets/lint/plugin/imports.d.ts +4 -0
  12. package/dist/presets/lint/plugin/imports.js +4 -1
  13. package/dist/presets/lint/plugin/index.d.ts +3 -0
  14. package/dist/presets/lint/plugin/index.js +14 -8
  15. package/dist/presets/lint/plugin/options.d.ts +5 -5
  16. package/dist/presets/lint/plugin/options.js +19 -7
  17. package/dist/presets/lint/plugin/resolver.d.ts +8 -0
  18. package/dist/presets/lint/plugin/resolver.js +79 -0
  19. package/dist/presets/lint/plugin/rules/import-owners.d.ts +67 -0
  20. package/dist/presets/lint/plugin/rules/import-owners.js +310 -0
  21. package/dist/presets/lint/plugin/rules/layers.d.ts +136 -0
  22. package/dist/presets/lint/plugin/rules/layers.js +479 -0
  23. package/dist/presets/lint/plugin/rules/no-query-data-in-state.js +1 -1
  24. package/dist/presets/lint/plugin/rules/no-react-state-hooks.d.ts +0 -5
  25. package/dist/presets/lint/plugin/rules/no-react-state-hooks.js +3 -47
  26. package/dist/presets/lint/plugin/rules/query-from-loader.js +2 -2
  27. package/dist/presets/lint/plugin/rules/require-suppression-reason.d.ts +5 -0
  28. package/dist/presets/lint/plugin/rules/require-suppression-reason.js +32 -0
  29. package/dist/presets/lint/react-strict.js +22 -2
  30. package/dist/presets/lint/strict.js +35 -2
  31. package/dist/presets/lint/{antislop.d.ts → tailwind.d.ts} +1 -1
  32. package/dist/presets/lint/{shadcn.js → tailwind.js} +1 -1
  33. package/dist/presets/lint/vendor/antislop/license.md +26 -1
  34. package/dist/presets/lint/vendor/antislop/plugin.d.mts +3 -0
  35. package/dist/presets/lint/vendor/antislop/plugin.mjs +940 -31
  36. package/dist/presets/lint/vendor/antislop-effect/license.md +27 -0
  37. package/dist/presets/lint/vendor/antislop-effect/plugin.d.mts +17 -0
  38. package/dist/presets/lint/vendor/antislop-effect/plugin.mjs +579 -0
  39. package/dist/presets/{lint → rules}/custom.d.ts +3 -20
  40. package/dist/presets/{lint → rules}/custom.js +50 -46
  41. package/dist/presets/rules/folder.d.ts +34 -0
  42. package/dist/presets/rules/folder.js +52 -0
  43. package/dist/presets/rules/index.d.ts +2 -9
  44. package/dist/presets/rules/index.js +1 -29
  45. package/dist/presets/rules/load.d.ts +8 -0
  46. package/dist/presets/rules/load.js +29 -0
  47. package/dist/presets/rules/plugin.d.ts +3 -0
  48. package/dist/presets/rules/plugin.js +1 -0
  49. package/dist/presets/rules/testing.d.ts +2 -0
  50. package/dist/presets/rules/testing.js +14 -0
  51. package/dist/presets/tsconfig.json +3 -0
  52. package/dist/runtime-CVZPDpfE.js +11 -0
  53. package/package.json +79 -18
  54. package/skills/adamantite/SKILL.md +112 -207
  55. package/skills/adamantite/references/custom-rules.md +120 -0
  56. package/skills/adamantite/references/lint-rules.md +158 -0
  57. package/skills/adamantite/references/setup.md +64 -0
  58. package/dist/presets/lint/antislop.js +0 -28
  59. package/dist/presets/lint/react-doctor.js +0 -20
  60. package/dist/presets/lint/shadcn.d.ts +0 -5
@@ -0,0 +1,64 @@
1
+ # How to set up Adamantite
2
+
3
+ ## Select the setup
4
+
5
+ Read `adamantite init --help` for the available scripts, presets, and editors.
6
+ Use explicit `--non-interactive` setup as an agent. Include at least one `--script`.
7
+ For example, to configure checks, fixes, TypeScript, and agent instructions, run:
8
+
9
+ ```sh
10
+ npx adamantite init --non-interactive --script check --script fix --typescript --agents
11
+ ```
12
+
13
+ Adapt the selected options to the request. Omitted boolean flags are disabled.
14
+ `--agents` adds instructions to `AGENTS.md` and writes this skill to `.agents/skills`, and
15
+ to `.claude/skills` or `.grok/skills` when the project has `.claude/` or `.grok/`.
16
+
17
+ Before selecting `react-strict`, tell the user about its modified MIT license.
18
+ The installed `oxlint-plugin-react-doctor` license requires written permission for use as
19
+ machine learning training or evaluation data, and for certain paid or hosted services.
20
+ Read that license for the exact restrictions.
21
+
22
+ Continue when each selected option serves the requested setup.
23
+
24
+ ## Create the selected setup
25
+
26
+ Run `init` with those options. It preserves existing package scripts whose commands differ
27
+ from its managed commands. Use `--overwrite-scripts` only when the task includes replacing them.
28
+ Read the output for preserved configuration that needs a Doctor repair.
29
+
30
+ Adamantite requires TypeScript 7 or later in the target project's own `package.json`.
31
+ Check that declaration if npm cannot install or update a managed plugin.
32
+
33
+ Continue when the selected dependencies are installed and the generated files match the request.
34
+
35
+ ## Complete managed plugin setup
36
+
37
+ If the selected presets include a managed plugin, check its setup:
38
+
39
+ - For `react-strict`, include the `react` preset and keep `oxlint-plugin-react-doctor`
40
+ installed. Init installs the pinned package, and Doctor and update maintain it.
41
+ Its React Doctor checks also apply in hook modules.
42
+ - For `effect`, run Oxlint through Adamantite. A plain `oxlint` call cannot load the
43
+ `effecttsgo` rules and stops with `Unknown plugin: 'effecttsgo'`. Replace that call with
44
+ `adamantite check --only lint` instead of removing the preset.
45
+ Keep `{ "name": "@effect/language-service", "diagnostics": true }` in
46
+ `compilerOptions.plugins`. In a monorepo, add it to each package's tsconfig or a shared base.
47
+ Use `ignoreDependencies.effect` from `adamantite/analyze` in `knip.config.ts`.
48
+ - For Effect editor support, follow Doctor's editor findings. After a dependency install or
49
+ update, run `adamantite init --non-interactive --script check --editor vscode` to prepare
50
+ or refresh the VS Code SDK cache. Keep the project's other setup options when needed.
51
+ Select the workspace TypeScript version in VS Code. Zed uses the installed Effect CLI.
52
+ - For `tailwind`, check that the project uses Tailwind v4. Init installs `@shadcn/lint`.
53
+ If components are outside the directories that `components.json` identifies, set
54
+ `settings.shadcn.ui` in `oxlint.config.ts`.
55
+ Without `components.json`, the plugin looks in `components/ui` or `src/components/ui`.
56
+ For another component directory, copy the preset's component-owned rule override to that directory.
57
+
58
+ Continue when Doctor reports no findings for the selected plugins and editors.
59
+
60
+ ## Check the setup
61
+
62
+ - Each selected managed script runs successfully.
63
+ - Doctor reports no findings, and its assessment warnings are recorded.
64
+ - Existing scripts and configuration are preserved unless the task includes replacing them.
@@ -1,28 +0,0 @@
1
- //#region presets/lint/antislop.ts
2
- const config = {
3
- jsPlugins: [{
4
- name: "anti-slop",
5
- specifier: new URL("vendor/antislop/plugin.mjs", import.meta.url).href
6
- }],
7
- rules: {
8
- "anti-slop/no-chained-type-assertions": "error",
9
- "anti-slop/no-conditional-empty-object-spread": "error",
10
- "anti-slop/no-known-value-widening": "error",
11
- "anti-slop/no-module-mocking": "error",
12
- "anti-slop/no-object-parameters": "error",
13
- "anti-slop/no-reflect-apply": "error",
14
- "anti-slop/no-reflect-get": "error",
15
- "anti-slop/no-runtime-typeof": ["error", { allowInTypeGuards: true }],
16
- "anti-slop/no-shape-in-symbol-names": "error",
17
- "anti-slop/no-unknown-parameters": "error",
18
- "anti-slop/no-unknown-returns": "error",
19
- "anti-slop/no-unknown-type-aliases": "error",
20
- "anti-slop/no-unsafe-dictionary-type": "error",
21
- "anti-slop/no-widen-then-assert": "error",
22
- "anti-slop/require-safety-comment-for-type-assertion": "error",
23
- "typescript/consistent-indexed-object-style": "off",
24
- "unicorn/no-immediate-mutation": "off"
25
- }
26
- };
27
- //#endregion
28
- export { config as default };
@@ -1,20 +0,0 @@
1
- //#region presets/lint/react-doctor.ts
2
- const config = {
3
- jsPlugins: ["oxlint-plugin-react-doctor"],
4
- rules: {
5
- "react-doctor/no-create-store-in-render": "error",
6
- "react-doctor/no-direct-state-mutation": "error",
7
- "react-doctor/no-eager-new-in-use-state-initializer": "error",
8
- "react-doctor/no-impure-state-updater": "error",
9
- "react-doctor/no-mutating-reducer-state": "error",
10
- "react-doctor/effect-observer-needs-disconnect": "error",
11
- "react-doctor/effect-raf-loop-needs-cancel": "error",
12
- "react-doctor/no-effect-event-handler": "error",
13
- "react-doctor/no-event-trigger-state": "error",
14
- "react-doctor/no-fetch-in-effect": "error",
15
- "react-doctor/no-pass-live-state-to-parent": "error",
16
- "react-doctor/no-set-state-after-await-in-effect": "error"
17
- }
18
- };
19
- //#endregion
20
- export { config as default };
@@ -1,5 +0,0 @@
1
- import { OxlintConfig } from "oxlint";
2
- //#region presets/lint/shadcn.d.ts
3
- declare const config: OxlintConfig;
4
- //#endregion
5
- export { config as default };