adamantite 0.35.0 → 0.37.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 (38) hide show
  1. package/CHANGELOG.md +1156 -0
  2. package/README.md +35 -15
  3. package/dist/index.js +32 -45
  4. package/dist/presets/analyze.d.ts +5 -3
  5. package/dist/presets/analyze.js +22 -24
  6. package/dist/presets/format.d.ts +3 -1
  7. package/dist/presets/format.js +73 -63
  8. package/dist/presets/lint/antislop.d.ts +5 -0
  9. package/dist/presets/lint/antislop.js +28 -0
  10. package/dist/presets/lint/core.d.ts +17 -1
  11. package/dist/presets/lint/core.js +511 -481
  12. package/dist/presets/lint/jest.d.ts +3 -1
  13. package/dist/presets/lint/jest.js +66 -68
  14. package/dist/presets/lint/nextjs.d.ts +3 -1
  15. package/dist/presets/lint/nextjs.js +28 -30
  16. package/dist/presets/lint/node.d.ts +3 -1
  17. package/dist/presets/lint/node.js +12 -14
  18. package/dist/presets/lint/react.d.ts +3 -1
  19. package/dist/presets/lint/react.js +117 -105
  20. package/dist/presets/lint/vendor/antislop/license.md +27 -0
  21. package/dist/presets/lint/vendor/antislop/plugin.d.mts +11 -0
  22. package/dist/presets/lint/vendor/antislop/plugin.mjs +1629 -0
  23. package/dist/presets/lint/vitest.d.ts +3 -1
  24. package/dist/presets/lint/vitest.js +71 -73
  25. package/dist/presets/lint/vue.d.ts +3 -1
  26. package/dist/presets/lint/vue.js +50 -52
  27. package/package.json +25 -22
  28. package/skills/adamantite/SKILL.md +2 -1
  29. package/presets/analyze.ts +0 -24
  30. package/presets/format.ts +0 -63
  31. package/presets/lint/core.ts +0 -481
  32. package/presets/lint/jest.ts +0 -68
  33. package/presets/lint/nextjs.ts +0 -30
  34. package/presets/lint/node.ts +0 -14
  35. package/presets/lint/react.ts +0 -105
  36. package/presets/lint/vitest.ts +0 -73
  37. package/presets/lint/vue.ts +0 -52
  38. package/presets/tsconfig.json +0 -28
@@ -1,3 +1,5 @@
1
- import { RawConfiguration } from "./types/config.ts";
2
- declare const config: RawConfiguration;
3
- export { config as default };
1
+ import { KnipConfiguration } from "knip";
2
+ //#region presets/analyze.d.ts
3
+ declare const config: KnipConfiguration;
4
+ //#endregion
5
+ export { config as default };
@@ -1,25 +1,23 @@
1
- // presets/analyze.ts
2
- var config = {
3
- ignoreExportsUsedInFile: true,
4
- rules: {
5
- binaries: "error",
6
- catalog: "error",
7
- dependencies: "error",
8
- devDependencies: "error",
9
- duplicates: "warn",
10
- enumMembers: "off",
11
- exports: "warn",
12
- files: "error",
13
- namespaceMembers: "warn",
14
- nsExports: "warn",
15
- nsTypes: "warn",
16
- optionalPeerDependencies: "warn",
17
- types: "warn",
18
- unlisted: "error",
19
- unresolved: "error"
20
- }
21
- };
22
- var analyze_default = config;
23
- export {
24
- analyze_default as default
1
+ //#region presets/analyze.ts
2
+ const config = {
3
+ ignoreExportsUsedInFile: true,
4
+ rules: {
5
+ binaries: "error",
6
+ catalog: "error",
7
+ dependencies: "error",
8
+ devDependencies: "error",
9
+ duplicates: "warn",
10
+ enumMembers: "off",
11
+ exports: "warn",
12
+ files: "error",
13
+ namespaceMembers: "warn",
14
+ nsExports: "warn",
15
+ nsTypes: "warn",
16
+ optionalPeerDependencies: "warn",
17
+ types: "warn",
18
+ unlisted: "error",
19
+ unresolved: "error"
20
+ }
25
21
  };
22
+ //#endregion
23
+ export { config as default };
@@ -1,3 +1,5 @@
1
1
  import { FormatConfig } from "oxfmt";
2
+ //#region presets/format.d.ts
2
3
  declare const config: FormatConfig;
3
- export { config as default };
4
+ //#endregion
5
+ export { config as default };
@@ -1,64 +1,74 @@
1
- // presets/format.ts
2
- var config = {
3
- arrowParens: "always",
4
- bracketSameLine: false,
5
- bracketSpacing: true,
6
- embeddedLanguageFormatting: "auto",
7
- endOfLine: "lf",
8
- htmlWhitespaceSensitivity: "css",
9
- insertFinalNewline: true,
10
- jsdoc: {
11
- addDefaultToDescription: true,
12
- bracketSpacing: false,
13
- capitalizeDescriptions: true,
14
- commentLineStrategy: "multiline",
15
- descriptionTag: false,
16
- descriptionWithDot: false,
17
- keepUnparsableExampleIndent: false,
18
- lineWrappingStyle: "greedy",
19
- preferCodeFences: false,
20
- separateReturnsFromParam: true
21
- },
22
- jsxSingleQuote: false,
23
- objectWrap: "preserve",
24
- printWidth: 100,
25
- quoteProps: "as-needed",
26
- semi: false,
27
- singleAttributePerLine: false,
28
- singleQuote: false,
29
- sortImports: {
30
- groups: [
31
- ["value-builtin", "type-import"],
32
- ["value-external"],
33
- ["type-internal"],
34
- ["value-internal"],
35
- ["type-subpath"],
36
- ["value-subpath"],
37
- ["type-parent", "type-sibling", "type-index"],
38
- ["value-parent", "value-sibling", "value-index"],
39
- ["unknown"]
40
- ],
41
- ignoreCase: true,
42
- newlinesBetween: false,
43
- order: "asc",
44
- partitionByComment: true,
45
- partitionByNewline: true,
46
- sortSideEffects: false
47
- },
48
- sortPackageJson: {
49
- sortScripts: true
50
- },
51
- sortTailwindcss: {
52
- attributes: ["className", "class"],
53
- functions: ["clsx", "cn", "cva", "tw", "twMerge"],
54
- preserveDuplicates: false,
55
- preserveWhitespace: false
56
- },
57
- tabWidth: 2,
58
- trailingComma: "es5",
59
- useTabs: false
60
- };
61
- var format_default = config;
62
- export {
63
- format_default as default
1
+ //#region presets/format.ts
2
+ const config = {
3
+ arrowParens: "always",
4
+ bracketSameLine: false,
5
+ bracketSpacing: true,
6
+ embeddedLanguageFormatting: "auto",
7
+ endOfLine: "lf",
8
+ htmlWhitespaceSensitivity: "css",
9
+ insertFinalNewline: true,
10
+ jsdoc: {
11
+ addDefaultToDescription: true,
12
+ bracketSpacing: false,
13
+ capitalizeDescriptions: true,
14
+ commentLineStrategy: "multiline",
15
+ descriptionTag: false,
16
+ descriptionWithDot: false,
17
+ keepUnparsableExampleIndent: false,
18
+ lineWrappingStyle: "greedy",
19
+ preferCodeFences: false,
20
+ separateReturnsFromParam: true
21
+ },
22
+ jsxSingleQuote: false,
23
+ objectWrap: "preserve",
24
+ printWidth: 100,
25
+ quoteProps: "as-needed",
26
+ semi: false,
27
+ singleAttributePerLine: false,
28
+ singleQuote: false,
29
+ sortImports: {
30
+ groups: [
31
+ ["value-builtin", "type-import"],
32
+ ["value-external"],
33
+ ["type-internal"],
34
+ ["value-internal"],
35
+ ["type-subpath"],
36
+ ["value-subpath"],
37
+ [
38
+ "type-parent",
39
+ "type-sibling",
40
+ "type-index"
41
+ ],
42
+ [
43
+ "value-parent",
44
+ "value-sibling",
45
+ "value-index"
46
+ ],
47
+ ["unknown"]
48
+ ],
49
+ ignoreCase: true,
50
+ newlinesBetween: false,
51
+ order: "asc",
52
+ partitionByComment: true,
53
+ partitionByNewline: true,
54
+ sortSideEffects: false
55
+ },
56
+ sortPackageJson: { sortScripts: true },
57
+ sortTailwindcss: {
58
+ attributes: ["className", "class"],
59
+ functions: [
60
+ "clsx",
61
+ "cn",
62
+ "cva",
63
+ "tw",
64
+ "twMerge"
65
+ ],
66
+ preserveDuplicates: false,
67
+ preserveWhitespace: false
68
+ },
69
+ tabWidth: 2,
70
+ trailingComma: "es5",
71
+ useTabs: false
64
72
  };
73
+ //#endregion
74
+ export { config as default };
@@ -0,0 +1,5 @@
1
+ import { OxlintConfig } from "oxlint";
2
+ //#region presets/lint/antislop.d.ts
3
+ declare const config: OxlintConfig;
4
+ //#endregion
5
+ export { config as default };
@@ -0,0 +1,28 @@
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,3 +1,19 @@
1
1
  import { OxlintConfig } from "oxlint";
2
+ //#region presets/lint/core.d.ts
3
+ /**
4
+ * Canonical ignore patterns for dependencies, build output, and generated code.
5
+ *
6
+ * Oxlint does not merge `ignorePatterns` from extended configs — only the root config's patterns
7
+ * apply — so extending the core preset is not enough. Hoist them explicitly:
8
+ *
9
+ * ```ts
10
+ * export default defineConfig({
11
+ * extends: [core],
12
+ * ignorePatterns: core.ignorePatterns,
13
+ * })
14
+ * ```
15
+ */
16
+ declare const ignorePatterns: string[];
2
17
  declare const config: OxlintConfig;
3
- export { config as default };
18
+ //#endregion
19
+ export { config as default, ignorePatterns };