adamantite 0.44.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 (64) hide show
  1. package/README.md +413 -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/jest.d.ts +13 -0
  10. package/dist/presets/lint/jest.js +88 -68
  11. package/dist/presets/lint/plugin/glob.d.ts +7 -0
  12. package/dist/presets/lint/plugin/glob.js +48 -0
  13. package/dist/presets/lint/plugin/imports.d.ts +4 -0
  14. package/dist/presets/lint/plugin/imports.js +4 -1
  15. package/dist/presets/lint/plugin/index.d.ts +3 -0
  16. package/dist/presets/lint/plugin/index.js +14 -8
  17. package/dist/presets/lint/plugin/options.d.ts +5 -5
  18. package/dist/presets/lint/plugin/options.js +19 -7
  19. package/dist/presets/lint/plugin/resolver.d.ts +8 -0
  20. package/dist/presets/lint/plugin/resolver.js +79 -0
  21. package/dist/presets/lint/plugin/rules/import-owners.d.ts +67 -0
  22. package/dist/presets/lint/plugin/rules/import-owners.js +310 -0
  23. package/dist/presets/lint/plugin/rules/layers.d.ts +136 -0
  24. package/dist/presets/lint/plugin/rules/layers.js +479 -0
  25. package/dist/presets/lint/plugin/rules/no-query-data-in-state.js +1 -1
  26. package/dist/presets/lint/plugin/rules/no-react-state-hooks.d.ts +0 -5
  27. package/dist/presets/lint/plugin/rules/no-react-state-hooks.js +3 -47
  28. package/dist/presets/lint/plugin/rules/query-from-loader.js +2 -2
  29. package/dist/presets/lint/plugin/rules/require-suppression-reason.d.ts +5 -0
  30. package/dist/presets/lint/plugin/rules/require-suppression-reason.js +32 -0
  31. package/dist/presets/lint/react-strict.js +22 -2
  32. package/dist/presets/lint/strict.js +35 -2
  33. package/dist/presets/lint/{antislop.d.ts → tailwind.d.ts} +1 -1
  34. package/dist/presets/lint/{shadcn.js → tailwind.js} +1 -1
  35. package/dist/presets/lint/vendor/antislop/license.md +26 -1
  36. package/dist/presets/lint/vendor/antislop/plugin.d.mts +3 -0
  37. package/dist/presets/lint/vendor/antislop/plugin.mjs +940 -31
  38. package/dist/presets/lint/vendor/antislop-effect/license.md +27 -0
  39. package/dist/presets/lint/vendor/antislop-effect/plugin.d.mts +17 -0
  40. package/dist/presets/lint/vendor/antislop-effect/plugin.mjs +579 -0
  41. package/dist/presets/lint/vitest.d.ts +13 -0
  42. package/dist/presets/lint/vitest.js +111 -91
  43. package/dist/presets/{lint → rules}/custom.d.ts +3 -20
  44. package/dist/presets/{lint → rules}/custom.js +50 -46
  45. package/dist/presets/rules/folder.d.ts +34 -0
  46. package/dist/presets/rules/folder.js +52 -0
  47. package/dist/presets/rules/index.d.ts +2 -9
  48. package/dist/presets/rules/index.js +1 -29
  49. package/dist/presets/rules/load.d.ts +8 -0
  50. package/dist/presets/rules/load.js +29 -0
  51. package/dist/presets/rules/plugin.d.ts +3 -0
  52. package/dist/presets/rules/plugin.js +1 -0
  53. package/dist/presets/rules/testing.d.ts +2 -0
  54. package/dist/presets/rules/testing.js +14 -0
  55. package/dist/presets/tsconfig.json +3 -0
  56. package/dist/runtime-CVZPDpfE.js +11 -0
  57. package/package.json +79 -18
  58. package/skills/adamantite/SKILL.md +112 -200
  59. package/skills/adamantite/references/custom-rules.md +120 -0
  60. package/skills/adamantite/references/lint-rules.md +158 -0
  61. package/skills/adamantite/references/setup.md +64 -0
  62. package/dist/presets/lint/antislop.js +0 -28
  63. package/dist/presets/lint/react-doctor.js +0 -20
  64. package/dist/presets/lint/shadcn.d.ts +0 -5
@@ -4,14 +4,47 @@ const config = {
4
4
  jsPlugins: [{
5
5
  name: "adamantite",
6
6
  specifier: new URL(`plugin/index.${PLUGIN_EXTENSION}`, import.meta.url).href
7
+ }, {
8
+ name: "anti-slop",
9
+ specifier: new URL("vendor/antislop/plugin.mjs", import.meta.url).href
7
10
  }],
8
11
  overrides: [{
9
12
  files: ["**/*.{test,spec}.{ts,tsx,mts,cts}", "**/__tests__/**"],
10
- rules: { "typescript/consistent-type-assertions": "error" }
13
+ rules: {
14
+ "anti-slop/no-chained-type-assertions": "error",
15
+ "anti-slop/no-widen-then-assert": "error",
16
+ "anti-slop/require-safety-comment-for-type-assertion": "error",
17
+ "typescript/consistent-type-assertions": "error"
18
+ }
11
19
  }],
12
20
  rules: {
13
21
  "adamantite/no-overzealous-destructuring": "error",
14
- "typescript/consistent-type-assertions": ["error", { assertionStyle: "never" }]
22
+ "adamantite/require-suppression-reason": "error",
23
+ "anti-slop/no-array-filter-map": "error",
24
+ "anti-slop/no-conditional-empty-object-spread": "error",
25
+ "anti-slop/no-known-value-widening": "error",
26
+ "anti-slop/no-module-mocking": "error",
27
+ "anti-slop/no-object-parameters": "error",
28
+ "anti-slop/no-reduce-accumulator-copy": "error",
29
+ "anti-slop/no-reflect-apply": "error",
30
+ "anti-slop/no-reflect-get": "error",
31
+ "anti-slop/no-runtime-typeof": ["error", { allowInTypeGuards: true }],
32
+ "anti-slop/no-shape-in-symbol-names": "error",
33
+ "anti-slop/no-unknown-parameters": "error",
34
+ "anti-slop/no-unknown-returns": "error",
35
+ "anti-slop/no-unknown-type-aliases": "error",
36
+ "anti-slop/no-unsafe-dictionary-type": "error",
37
+ "anti-slop/require-readable-spacing": "error",
38
+ "no-console": ["error", { allow: ["info"] }],
39
+ "no-warning-comments": ["error", { terms: [
40
+ "todo",
41
+ "fixme",
42
+ "xxx",
43
+ "hack"
44
+ ] }],
45
+ "typescript/consistent-indexed-object-style": "off",
46
+ "typescript/consistent-type-assertions": ["error", { assertionStyle: "never" }],
47
+ "unicorn/no-immediate-mutation": "off"
15
48
  }
16
49
  };
17
50
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { OxlintConfig } from "oxlint";
2
- //#region presets/lint/antislop.d.ts
2
+ //#region presets/lint/tailwind.d.ts
3
3
  declare const config: OxlintConfig;
4
4
  //#endregion
5
5
  export { config as default };
@@ -1,4 +1,4 @@
1
- //#region presets/lint/shadcn.ts
1
+ //#region presets/lint/tailwind.ts
2
2
  const config = {
3
3
  jsPlugins: ["@shadcn/lint"],
4
4
  overrides: [{
@@ -1,7 +1,7 @@
1
1
  # anti-slop license
2
2
 
3
3
  The bundled `plugin.mjs` is a build of
4
- [anti-slop](https://github.com/dmmulroy/anti-slop) at commit e8c4880471b23ab7f216fba7b27d173a6ef07d4c,
4
+ [anti-slop](https://github.com/dmmulroy/anti-slop) at commit 13909c9e07590f5a85d93c62712259fe14a883f7,
5
5
  with its dependencies (MIT) inlined.
6
6
 
7
7
  MIT License
@@ -25,3 +25,28 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
25
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
26
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
27
  SOFTWARE.
28
+
29
+ ## src/vendor/eslint-stylistic/LICENSE
30
+
31
+ MIT License
32
+
33
+ Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
34
+ Copyright (c) 2023-PRESENT ESLint Stylistic contributors
35
+
36
+ Permission is hereby granted, free of charge, to any person obtaining a copy
37
+ of this software and associated documentation files (the "Software"), to deal
38
+ in the Software without restriction, including without limitation the rights
39
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
40
+ copies of the Software, and to permit persons to whom the Software is
41
+ furnished to do so, subject to the following conditions:
42
+
43
+ The above copyright notice and this permission notice shall be included in all
44
+ copies or substantial portions of the Software.
45
+
46
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
47
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
49
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
50
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
51
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
52
+ SOFTWARE.
@@ -6,11 +6,13 @@ interface VendoredPluginRule {
6
6
  declare const vendoredPlugin: {
7
7
  readonly meta: { readonly name: string }
8
8
  readonly rules: {
9
+ readonly "no-array-filter-map": VendoredPluginRule
9
10
  readonly "no-chained-type-assertions": VendoredPluginRule
10
11
  readonly "no-conditional-empty-object-spread": VendoredPluginRule
11
12
  readonly "no-known-value-widening": VendoredPluginRule
12
13
  readonly "no-module-mocking": VendoredPluginRule
13
14
  readonly "no-object-parameters": VendoredPluginRule
15
+ readonly "no-reduce-accumulator-copy": VendoredPluginRule
14
16
  readonly "no-reflect-apply": VendoredPluginRule
15
17
  readonly "no-reflect-get": VendoredPluginRule
16
18
  readonly "no-runtime-typeof": VendoredPluginRule
@@ -20,6 +22,7 @@ declare const vendoredPlugin: {
20
22
  readonly "no-unknown-type-aliases": VendoredPluginRule
21
23
  readonly "no-unsafe-dictionary-type": VendoredPluginRule
22
24
  readonly "no-widen-then-assert": VendoredPluginRule
25
+ readonly "require-readable-spacing": VendoredPluginRule
23
26
  readonly "require-safety-comment-for-type-assertion": VendoredPluginRule
24
27
  }
25
28
  }