adamantite 0.30.2 → 0.32.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.
@@ -1,22 +1,22 @@
1
1
  declare const _default: {
2
- plugins: "vue"[];
3
- rules: {
4
- "vue/define-emits-declaration": "error";
5
- "vue/define-props-declaration": "error";
6
- "vue/define-props-destructuring": "error";
7
- "vue/max-props": "error";
8
- "vue/no-arrow-functions-in-watch": "error";
9
- "vue/no-deprecated-destroyed-lifecycle": "error";
10
- "vue/no-export-in-script-setup": "error";
11
- "vue/no-import-compiler-macros": "error";
12
- "vue/no-lifecycle-after-await": "error";
13
- "vue/no-multiple-slot-args": "error";
14
- "vue/no-required-prop-with-default": "error";
15
- "vue/prefer-import-from-vue": "error";
16
- "vue/require-default-export": "error";
17
- "vue/require-typed-ref": "error";
18
- "vue/valid-define-emits": "error";
19
- "vue/valid-define-props": "error";
2
+ readonly plugins: readonly ["vue"];
3
+ readonly rules: {
4
+ readonly "vue/define-emits-declaration": "error";
5
+ readonly "vue/define-props-declaration": "error";
6
+ readonly "vue/define-props-destructuring": "error";
7
+ readonly "vue/max-props": "error";
8
+ readonly "vue/no-arrow-functions-in-watch": "error";
9
+ readonly "vue/no-deprecated-destroyed-lifecycle": "error";
10
+ readonly "vue/no-export-in-script-setup": "error";
11
+ readonly "vue/no-import-compiler-macros": "error";
12
+ readonly "vue/no-lifecycle-after-await": "error";
13
+ readonly "vue/no-multiple-slot-args": "error";
14
+ readonly "vue/no-required-prop-with-default": "error";
15
+ readonly "vue/prefer-import-from-vue": "error";
16
+ readonly "vue/require-default-export": "error";
17
+ readonly "vue/require-typed-ref": "error";
18
+ readonly "vue/valid-define-emits": "error";
19
+ readonly "vue/valid-define-props": "error";
20
20
  };
21
21
  };
22
22
  export { _default as default };
@@ -1,6 +1,5 @@
1
1
  // presets/lint/vue.ts
2
- import { defineConfig } from "oxlint";
3
- var vue_default = defineConfig({
2
+ var vue_default = {
4
3
  plugins: ["vue"],
5
4
  rules: {
6
5
  "vue/define-emits-declaration": "error",
@@ -20,7 +19,7 @@ var vue_default = defineConfig({
20
19
  "vue/valid-define-emits": "error",
21
20
  "vue/valid-define-props": "error"
22
21
  }
23
- });
22
+ };
24
23
  export {
25
24
  vue_default as default
26
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adamantite",
3
- "version": "0.30.2",
3
+ "version": "0.32.0",
4
4
  "description": "An strict and opinionated set of presets for modern TypeScript applications",
5
5
  "keywords": [
6
6
  "adamantite",
@@ -36,8 +36,14 @@
36
36
  "#presets/*": "./presets/*"
37
37
  },
38
38
  "exports": {
39
- "./analyze": "./dist/presets/knip.json",
40
- "./format": "./dist/presets/format.json",
39
+ "./analyze": {
40
+ "types": "./dist/presets/analyze.d.ts",
41
+ "default": "./dist/presets/analyze.js"
42
+ },
43
+ "./format": {
44
+ "types": "./dist/presets/format.d.ts",
45
+ "default": "./dist/presets/format.js"
46
+ },
41
47
  "./lint": {
42
48
  "types": "./dist/presets/lint/core.d.ts",
43
49
  "default": "./dist/presets/lint/core.js"
@@ -50,7 +56,7 @@
50
56
  },
51
57
  "scripts": {
52
58
  "analyze": "bun run src/index.ts analyze",
53
- "build": "bunup && cp presets/*.json dist/presets/",
59
+ "build": "bunup && cp presets/tsconfig.json dist/presets/",
54
60
  "bump:deps": "bun update --interactive",
55
61
  "check": "bun run src/index.ts check",
56
62
  "dev": "bunup --watch",
@@ -60,29 +66,31 @@
60
66
  "test": "bun test",
61
67
  "test:coverage": "bun test --coverage",
62
68
  "test:watch": "bun --watch test",
63
- "typecheck": "bun run src/index.ts typecheck",
64
69
  "version": "changeset version"
65
70
  },
66
71
  "dependencies": {
67
- "@clack/prompts": "1.1.0",
68
- "@effect/platform-node": "4.0.0-beta.29",
69
- "defu": "6.1.4",
70
- "effect": "4.0.0-beta.29",
72
+ "@clack/prompts": "1.2.0",
73
+ "@effect/platform-node": "4.0.0-beta.56",
74
+ "defu": "6.1.7",
75
+ "effect": "4.0.0-beta.56",
76
+ "esrap": "2.2.5",
71
77
  "jsonc-parser": "3.3.1",
72
- "nypm": "0.6.5"
78
+ "nypm": "0.6.5",
79
+ "oxc-parser": "^0.127.0"
73
80
  },
74
81
  "devDependencies": {
75
- "@changesets/cli": "2.30.0",
76
- "@types/bun": "1.3.10",
77
- "@typescript/native-preview": "^7.0.0-dev.20260310.1",
82
+ "@changesets/cli": "2.31.0",
83
+ "@types/bun": "1.3.13",
84
+ "@types/figlet": "1.7.0",
85
+ "@typescript/native-preview": "7.0.0-dev.20260422.1",
78
86
  "bunup": "0.16.31",
79
- "knip": "5.85.0",
80
- "oxfmt": "0.35.0",
81
- "oxlint": "1.50.0",
82
- "oxlint-tsgolint": "0.14.2",
83
- "sherif": "1.10.0",
84
- "type-fest": "5.4.4",
85
- "typescript": "5.9.3"
87
+ "figlet": "1.11.0",
88
+ "knip": "6.6.1",
89
+ "oxfmt": "0.46.0",
90
+ "oxlint": "1.61.0",
91
+ "oxlint-tsgolint": "0.21.1",
92
+ "sherif": "1.11.1",
93
+ "type-fest": "5.6.0"
86
94
  },
87
95
  "engines": {
88
96
  "bun": ">=1.3.6"
@@ -0,0 +1,31 @@
1
+ import type { KnipConfig } from "knip"
2
+
3
+ export default {
4
+ ignore: ["**/*.d.ts"],
5
+ ignoreExportsUsedInFile: true,
6
+ ignoreFiles: [
7
+ "**/dist/**",
8
+ "**/build/**",
9
+ "**/coverage/**",
10
+ "**/.next/**",
11
+ "**/.vercel/**",
12
+ "**/.turbo/**",
13
+ ],
14
+ rules: {
15
+ binaries: "error",
16
+ catalog: "error",
17
+ dependencies: "error",
18
+ devDependencies: "error",
19
+ duplicates: "warn",
20
+ enumMembers: "off",
21
+ exports: "warn",
22
+ files: "error",
23
+ namespaceMembers: "warn",
24
+ nsExports: "warn",
25
+ nsTypes: "warn",
26
+ optionalPeerDependencies: "warn",
27
+ types: "warn",
28
+ unlisted: "error",
29
+ unresolved: "error",
30
+ },
31
+ } as const satisfies KnipConfig
@@ -0,0 +1,61 @@
1
+ import type { FormatConfig } from "oxfmt"
2
+
3
+ export default {
4
+ arrowParens: "always",
5
+ bracketSameLine: false,
6
+ bracketSpacing: true,
7
+ embeddedLanguageFormatting: "auto",
8
+ endOfLine: "lf",
9
+ htmlWhitespaceSensitivity: "css",
10
+ insertFinalNewline: true,
11
+ jsdoc: {
12
+ addDefaultToDescription: true,
13
+ bracketSpacing: false,
14
+ capitalizeDescriptions: true,
15
+ commentLineStrategy: "multiline",
16
+ descriptionTag: false,
17
+ descriptionWithDot: false,
18
+ keepUnparsableExampleIndent: false,
19
+ lineWrappingStyle: "greedy",
20
+ preferCodeFences: false,
21
+ separateReturnsFromParam: true,
22
+ },
23
+ jsxSingleQuote: false,
24
+ objectWrap: "preserve",
25
+ printWidth: 100,
26
+ quoteProps: "as-needed",
27
+ semi: false,
28
+ singleAttributePerLine: false,
29
+ singleQuote: false,
30
+ sortImports: {
31
+ groups: [
32
+ ["value-builtin", "type-import"],
33
+ ["value-external"],
34
+ ["type-internal"],
35
+ ["value-internal"],
36
+ ["type-subpath"],
37
+ ["value-subpath"],
38
+ ["type-parent", "type-sibling", "type-index"],
39
+ ["value-parent", "value-sibling", "value-index"],
40
+ ["unknown"],
41
+ ],
42
+ ignoreCase: true,
43
+ newlinesBetween: false,
44
+ order: "asc",
45
+ partitionByComment: true,
46
+ partitionByNewline: true,
47
+ sortSideEffects: false,
48
+ },
49
+ sortPackageJson: {
50
+ sortScripts: true,
51
+ },
52
+ sortTailwindcss: {
53
+ attributes: ["className", "class"],
54
+ functions: ["clsx", "cn", "cva", "tw", "twMerge"],
55
+ preserveDuplicates: false,
56
+ preserveWhitespace: false,
57
+ },
58
+ tabWidth: 2,
59
+ trailingComma: "es5",
60
+ useTabs: false,
61
+ } as const satisfies FormatConfig
@@ -1,7 +1,6 @@
1
- import { defineConfig } from "oxlint"
1
+ import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default defineConfig({
4
- ignorePatterns: ["**/node_modules", "**/.git", "**/build", "**/dist", "**/.next", "**/.vercel"],
3
+ export default {
5
4
  plugins: ["eslint", "typescript", "unicorn", "oxc", "import", "jsdoc", "promise"],
6
5
  rules: {
7
6
  "accessor-pairs": "error",
@@ -17,7 +16,6 @@ export default defineConfig({
17
16
  },
18
17
  ],
19
18
  "class-methods-use-this": "warn",
20
- "comma-dangle": ["error"],
21
19
  "constructor-super": "error",
22
20
  "default-case": "off",
23
21
  "default-case-last": "error",
@@ -161,6 +159,7 @@ export default defineConfig({
161
159
  "no-unused-labels": "error",
162
160
  "no-unused-private-class-members": "error",
163
161
  "no-unused-vars": "error",
162
+ "no-useless-assignment": "error",
164
163
  "no-useless-backreference": "error",
165
164
  "no-useless-call": "error",
166
165
  "no-useless-catch": "error",
@@ -172,6 +171,7 @@ export default defineConfig({
172
171
  "no-useless-return": "error",
173
172
  "no-var": "error",
174
173
  "no-with": "error",
174
+ "object-shorthand": "error",
175
175
  "operator-assignment": "error",
176
176
  "oxc/approx-constant": "error",
177
177
  "oxc/bad-array-method-on-arguments": "error",
@@ -347,6 +347,8 @@ export default defineConfig({
347
347
  "unicorn/consistent-empty-array-spread": "error",
348
348
  "unicorn/consistent-existence-index-check": "error",
349
349
  "unicorn/consistent-function-scoping": "error",
350
+ "unicorn/consistent-template-literal-escape": "error",
351
+ "unicorn/custom-error-definition": "error",
350
352
  "unicorn/empty-brace-spaces": "error",
351
353
  "unicorn/error-message": "error",
352
354
  "unicorn/escape-case": "error",
@@ -390,6 +392,7 @@ export default defineConfig({
390
392
  "unicorn/no-useless-collection-argument": "error",
391
393
  "unicorn/no-useless-error-capture-stack-trace": "error",
392
394
  "unicorn/no-useless-fallback-in-spread": "error",
395
+ "unicorn/no-useless-iterator-to-array": "error",
393
396
  "unicorn/no-useless-length-check": "error",
394
397
  "unicorn/no-useless-promise-resolve-reject": "error",
395
398
  "unicorn/no-useless-spread": "error",
@@ -418,6 +421,7 @@ export default defineConfig({
418
421
  "unicorn/prefer-dom-node-text-content": "error",
419
422
  "unicorn/prefer-event-target": "error",
420
423
  "unicorn/prefer-global-this": "error",
424
+ "unicorn/prefer-import-meta-properties": "error",
421
425
  "unicorn/prefer-keyboard-event-key": "error",
422
426
  "unicorn/prefer-logical-operator-over-ternary": "error",
423
427
  "unicorn/prefer-math-min-max": "error",
@@ -450,6 +454,7 @@ export default defineConfig({
450
454
  "unicorn/require-number-to-fixed-digits-argument": "error",
451
455
  "unicorn/require-post-message-target-origin": "error",
452
456
  "unicorn/switch-case-braces": ["error", "avoid"],
457
+ "unicorn/switch-case-break-position": "error",
453
458
  "unicorn/text-encoding-identifier-case": "error",
454
459
  "unicorn/throw-new-error": "error",
455
460
  "use-isnan": "error",
@@ -457,4 +462,4 @@ export default defineConfig({
457
462
  "vars-on-top": "error",
458
463
  yoda: "error",
459
464
  },
460
- })
465
+ } as const satisfies OxlintConfig
@@ -1,6 +1,6 @@
1
- import { defineConfig } from "oxlint"
1
+ import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default defineConfig({
3
+ export default {
4
4
  plugins: ["jest"],
5
5
  rules: {
6
6
  "jest/consistent-test-it": "error",
@@ -30,10 +30,12 @@ export default defineConfig({
30
30
  "jest/no-test-prefixes": "error",
31
31
  "jest/no-test-return-statement": "error",
32
32
  "jest/no-untyped-mock-factory": "error",
33
+ "jest/padding-around-after-all-blocks": "error",
33
34
  "jest/padding-around-test-blocks": "error",
34
35
  "jest/prefer-called-with": "error",
35
36
  "jest/prefer-comparison-matcher": "error",
36
37
  "jest/prefer-each": "error",
38
+ "jest/prefer-ending-with-an-expect": "error",
37
39
  "jest/prefer-equality-matcher": "error",
38
40
  "jest/prefer-expect-resolves": "error",
39
41
  "jest/prefer-hooks-in-order": "error",
@@ -54,6 +56,7 @@ export default defineConfig({
54
56
  "jest/require-top-level-describe": "error",
55
57
  "jest/valid-describe-callback": "error",
56
58
  "jest/valid-expect": "error",
59
+ "jest/valid-expect-in-promise": "error",
57
60
  "jest/valid-title": "error",
58
61
  },
59
- })
62
+ } as const satisfies OxlintConfig
@@ -1,6 +1,6 @@
1
- import { defineConfig } from "oxlint"
1
+ import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default defineConfig({
3
+ export default {
4
4
  plugins: ["nextjs"],
5
5
  rules: {
6
6
  "nextjs/google-font-display": "error",
@@ -25,4 +25,4 @@ export default defineConfig({
25
25
  "nextjs/no-typos": "error",
26
26
  "nextjs/no-unwanted-polyfillio": "error",
27
27
  },
28
- })
28
+ } as const satisfies OxlintConfig
@@ -1,10 +1,10 @@
1
- import { defineConfig } from "oxlint"
1
+ import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default defineConfig({
3
+ export default {
4
4
  plugins: ["node"],
5
5
  rules: {
6
6
  "node/no-exports-assign": "error",
7
7
  "node/no-new-require": "error",
8
8
  "node/no-path-concat": "error",
9
9
  },
10
- })
10
+ } as const satisfies OxlintConfig
@@ -1,6 +1,6 @@
1
- import { defineConfig } from "oxlint"
1
+ import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default defineConfig({
3
+ export default {
4
4
  plugins: ["react", "react-perf", "jsx-a11y"],
5
5
  rules: {
6
6
  "jsx-a11y/alt-text": "error",
@@ -35,6 +35,7 @@ export default defineConfig({
35
35
  "react/checked-requires-onchange-or-readonly": "error",
36
36
  "react/display-name": "off",
37
37
  "react/exhaustive-deps": "error",
38
+ "react/hook-use-state": "error",
38
39
  "react/iframe-missing-sandbox": "error",
39
40
  "react/jsx-boolean-value": "error",
40
41
  "react/jsx-curly-brace-presence": [
@@ -72,10 +73,11 @@ export default defineConfig({
72
73
  "react/no-unknown-property": "error",
73
74
  "react/no-unsafe": "error",
74
75
  "react/prefer-es6-class": ["error", "always"],
76
+ "react/prefer-function-component": "error",
75
77
  "react/rules-of-hooks": "error",
76
78
  "react/self-closing-comp": "error",
77
79
  "react/state-in-constructor": ["error", "never"],
78
80
  "react/style-prop-object": "error",
79
81
  "react/void-dom-elements-no-children": "error",
80
82
  },
81
- })
83
+ } as const satisfies OxlintConfig
@@ -1,6 +1,6 @@
1
- import { defineConfig } from "oxlint"
1
+ import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default defineConfig({
3
+ export default {
4
4
  plugins: ["vitest"],
5
5
  rules: {
6
6
  "vitest/consistent-each-for": "error",
@@ -9,14 +9,16 @@ export default defineConfig({
9
9
  "vitest/no-import-node-test": "error",
10
10
  "vitest/no-importing-vitest-globals": "error",
11
11
  "vitest/no-unneeded-async-expect-function": "error",
12
+ "vitest/prefer-called-exactly-once-with": "error",
12
13
  "vitest/prefer-called-once": "error",
13
14
  "vitest/prefer-called-times": "error",
14
15
  "vitest/prefer-describe-function-title": "error",
15
16
  "vitest/prefer-expect-type-of": "error",
16
17
  "vitest/prefer-import-in-mock": "error",
17
- "vitest/prefer-to-be-falsy": "error",
18
+ "vitest/prefer-strict-boolean-matchers": "error",
18
19
  "vitest/prefer-to-be-object": "error",
19
- "vitest/prefer-to-be-truthy": "error",
20
+ "vitest/require-awaited-expect-poll": "error",
20
21
  "vitest/require-local-test-context-for-concurrent-snapshots": "error",
22
+ "vitest/require-mock-type-parameters": "error",
21
23
  },
22
- })
24
+ } as const satisfies OxlintConfig
@@ -1,6 +1,6 @@
1
- import { defineConfig } from "oxlint"
1
+ import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default defineConfig({
3
+ export default {
4
4
  plugins: ["vue"],
5
5
  rules: {
6
6
  "vue/define-emits-declaration": "error",
@@ -20,4 +20,4 @@ export default defineConfig({
20
20
  "vue/valid-define-emits": "error",
21
21
  "vue/valid-define-props": "error",
22
22
  },
23
- })
23
+ } as const satisfies OxlintConfig
@@ -1,44 +0,0 @@
1
- {
2
- "$schema": "../node_modules/oxfmt/configuration_schema.json",
3
- "arrowParens": "always",
4
- "bracketSameLine": false,
5
- "bracketSpacing": true,
6
- "embeddedLanguageFormatting": "auto",
7
- "endOfLine": "lf",
8
- "sortImports": {
9
- "groups": [
10
- ["value-builtin", "type-import"],
11
- ["value-external"],
12
- ["type-internal"],
13
- ["value-internal"],
14
- ["type-subpath"],
15
- ["value-subpath"],
16
- ["type-parent", "type-sibling", "type-index"],
17
- ["value-parent", "value-sibling", "value-index"],
18
- ["unknown"]
19
- ],
20
- "ignoreCase": true,
21
- "newlinesBetween": false,
22
- "partitionByNewline": true,
23
- "order": "asc",
24
- "partitionByComment": true,
25
- "sortSideEffects": false
26
- },
27
- "sortTailwindcss": {
28
- "attributes": ["className", "class"],
29
- "functions": ["clsx", "cn", "cva", "tw", "twMerge"],
30
- "preserveDuplicates": false,
31
- "preserveWhitespace": false
32
- },
33
- "insertFinalNewline": true,
34
- "jsxSingleQuote": false,
35
- "objectWrap": "preserve",
36
- "printWidth": 100,
37
- "quoteProps": "as-needed",
38
- "semi": false,
39
- "singleAttributePerLine": false,
40
- "singleQuote": false,
41
- "tabWidth": 2,
42
- "trailingComma": "es5",
43
- "useTabs": false
44
- }
@@ -1,29 +0,0 @@
1
- {
2
- "$schema": "https://unpkg.com/knip@5/schema.json",
3
- "rules": {
4
- "files": "error",
5
- "dependencies": "error",
6
- "devDependencies": "error",
7
- "optionalPeerDependencies": "warn",
8
- "unlisted": "error",
9
- "binaries": "error",
10
- "unresolved": "error",
11
- "exports": "warn",
12
- "nsExports": "warn",
13
- "types": "warn",
14
- "nsTypes": "warn",
15
- "enumMembers": "off",
16
- "classMembers": "off",
17
- "duplicates": "warn"
18
- },
19
- "ignoreExportsUsedInFile": true,
20
- "ignoreFiles": [
21
- "**/dist/**",
22
- "**/build/**",
23
- "**/coverage/**",
24
- "**/.next/**",
25
- "**/.vercel/**",
26
- "**/.turbo/**"
27
- ],
28
- "ignore": ["**/*.d.ts"]
29
- }
@@ -1,44 +0,0 @@
1
- {
2
- "$schema": "../node_modules/oxfmt/configuration_schema.json",
3
- "arrowParens": "always",
4
- "bracketSameLine": false,
5
- "bracketSpacing": true,
6
- "embeddedLanguageFormatting": "auto",
7
- "endOfLine": "lf",
8
- "sortImports": {
9
- "groups": [
10
- ["value-builtin", "type-import"],
11
- ["value-external"],
12
- ["type-internal"],
13
- ["value-internal"],
14
- ["type-subpath"],
15
- ["value-subpath"],
16
- ["type-parent", "type-sibling", "type-index"],
17
- ["value-parent", "value-sibling", "value-index"],
18
- ["unknown"]
19
- ],
20
- "ignoreCase": true,
21
- "newlinesBetween": false,
22
- "partitionByNewline": true,
23
- "order": "asc",
24
- "partitionByComment": true,
25
- "sortSideEffects": false
26
- },
27
- "sortTailwindcss": {
28
- "attributes": ["className", "class"],
29
- "functions": ["clsx", "cn", "cva", "tw", "twMerge"],
30
- "preserveDuplicates": false,
31
- "preserveWhitespace": false
32
- },
33
- "insertFinalNewline": true,
34
- "jsxSingleQuote": false,
35
- "objectWrap": "preserve",
36
- "printWidth": 100,
37
- "quoteProps": "as-needed",
38
- "semi": false,
39
- "singleAttributePerLine": false,
40
- "singleQuote": false,
41
- "tabWidth": 2,
42
- "trailingComma": "es5",
43
- "useTabs": false
44
- }
package/presets/knip.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "$schema": "https://unpkg.com/knip@5/schema.json",
3
- "rules": {
4
- "files": "error",
5
- "dependencies": "error",
6
- "devDependencies": "error",
7
- "optionalPeerDependencies": "warn",
8
- "unlisted": "error",
9
- "binaries": "error",
10
- "unresolved": "error",
11
- "exports": "warn",
12
- "nsExports": "warn",
13
- "types": "warn",
14
- "nsTypes": "warn",
15
- "enumMembers": "off",
16
- "classMembers": "off",
17
- "duplicates": "warn"
18
- },
19
- "ignoreExportsUsedInFile": true,
20
- "ignoreFiles": [
21
- "**/dist/**",
22
- "**/build/**",
23
- "**/coverage/**",
24
- "**/.next/**",
25
- "**/.vercel/**",
26
- "**/.turbo/**"
27
- ],
28
- "ignore": ["**/*.d.ts"]
29
- }