@kamaal111/kamaal-quality-config 0.0.4 → 0.1.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @kamaal111/kamaal-quality-config
2
2
 
3
- Kamaal Farah's shared [oxlint](https://oxc.rs) quality config.
3
+ Kamaal Farah's shared [oxlint](https://oxc.rs) quality configs.
4
4
 
5
5
  Currently enables every rule from [`@kamaal111/oxlint-plugin-anti-slop`](https://github.com/kamaal111/anti-slop),
6
6
  Kamaal's fork of [`dmmulroy/anti-slop`](https://github.com/dmmulroy/anti-slop), plus a curated set of
@@ -37,20 +37,30 @@ Extend it from your `.oxlintrc.json`:
37
37
  The package ships a plain, statically-generated `dist/oxlintrc.json` — no `oxlint.config.ts` or
38
38
  package-import support is needed, since `.oxlintrc.json`'s `extends` field accepts plain file paths.
39
39
 
40
- Alternatively, if your project already uses `oxlint.config.ts`, you can import the same config as a
41
- JS object instead:
40
+ Alternatively, if your project already uses `oxlint.config.ts`, import the config directly:
42
41
 
43
42
  ```ts
44
- import kamaalQualityConfig from '@kamaal111/kamaal-quality-config';
43
+ import kamaalOxlintConfig from '@kamaal111/kamaal-quality-config/oxlint';
45
44
  import { defineConfig } from 'oxlint';
46
45
 
47
46
  export default defineConfig({
48
- extends: [kamaalQualityConfig],
47
+ extends: [kamaalOxlintConfig],
49
48
  });
50
49
  ```
51
50
 
52
- Both forms carry the same rules — `dist/oxlintrc.json` is generated from the same config object at
53
- build time.
51
+ The package root also exposes every config through a namespace object:
52
+
53
+ ```ts
54
+ import kamaalQuality from '@kamaal111/kamaal-quality-config';
55
+ import { defineConfig } from 'oxlint';
56
+
57
+ export default defineConfig({
58
+ extends: [kamaalQuality.oxlint],
59
+ });
60
+ ```
61
+
62
+ Both forms carry the same rules — `dist/oxlintrc.json` is generated from the oxlint config at build
63
+ time.
54
64
 
55
65
  ### oxfmt
56
66
 
@@ -69,6 +79,8 @@ export default defineConfig({
69
79
  });
70
80
  ```
71
81
 
82
+ The same style is also available as `kamaalQuality.oxfmt` from the package-root namespace.
83
+
72
84
  `./oxfmt` exports a plain style object (`printWidth`, `arrowParens`, `singleQuote`) with no
73
85
  `ignorePatterns` — those are inherently project-specific, so each consumer supplies its own via the
74
86
  spread above.
package/dist/index.d.ts CHANGED
@@ -1,77 +1,87 @@
1
+ import oxfmt from './oxfmt.ts';
2
+ import oxlint from './oxlint.ts';
3
+ export { oxfmt, oxlint };
1
4
  declare const _default: {
2
- plugins: ("oxc" | "typescript" | "unicorn" | "vitest")[];
3
- jsPlugins: {
4
- name: string;
5
- specifier: string;
6
- }[];
7
- options: {
8
- typeAware: true;
5
+ oxfmt: {
6
+ readonly printWidth: 120;
7
+ readonly arrowParens: 'avoid';
8
+ readonly singleQuote: true;
9
9
  };
10
- categories: {
11
- correctness: "error";
12
- };
13
- rules: {
14
- curly: "error";
15
- 'typescript/no-deprecated': "error";
16
- 'typescript/consistent-type-imports': "error";
17
- 'typescript/no-non-null-assertion': "error";
18
- 'typescript/consistent-type-assertions': ["error", {
19
- assertionStyle: "never";
20
- }];
21
- 'typescript/no-explicit-any': "error";
22
- 'typescript/ban-ts-comment': ["error", {
23
- minimumDescriptionLength: number;
24
- }];
25
- 'typescript/no-duplicate-enum-values': "error";
26
- 'typescript/no-empty-object-type': "error";
27
- 'typescript/no-extra-non-null-assertion': "error";
28
- 'typescript/no-misused-new': "error";
29
- 'typescript/no-namespace': "error";
30
- 'typescript/no-non-null-asserted-optional-chain': "error";
31
- 'typescript/no-require-imports': "error";
32
- 'typescript/no-this-alias': "error";
33
- 'typescript/no-unnecessary-type-constraint': "error";
34
- 'typescript/no-unsafe-declaration-merging': "error";
35
- 'typescript/no-unsafe-function-type': "error";
36
- 'typescript/no-wrapper-object-types': "error";
37
- 'typescript/prefer-as-const': "error";
38
- 'typescript/prefer-namespace-keyword': "error";
39
- 'typescript/triple-slash-reference': "error";
40
- 'typescript/no-dynamic-delete': "error";
41
- 'typescript/no-extraneous-class': "error";
42
- 'typescript/no-invalid-void-type': "error";
43
- 'typescript/no-non-null-asserted-nullish-coalescing': "error";
44
- 'typescript/prefer-literal-enum-member': "error";
45
- 'typescript/unified-signatures': "error";
46
- 'typescript/adjacent-overload-signatures': "error";
47
- 'typescript/array-type': "error";
48
- 'typescript/ban-tslint-comment': "error";
49
- 'typescript/class-literal-property-style': "error";
50
- 'typescript/consistent-generic-constructors': "error";
51
- 'typescript/consistent-indexed-object-style': "error";
52
- 'typescript/consistent-type-definitions': "error";
53
- 'typescript/no-confusing-non-null-assertion': "error";
54
- 'typescript/no-inferrable-types': "error";
55
- 'typescript/prefer-for-of': "error";
56
- 'typescript/prefer-function-type': "error";
57
- 'oxc/no-accumulating-spread': "error";
58
- 'vitest/no-conditional-expect': "error";
59
- 'vitest/expect-expect': "error";
60
- 'anti-slop/no-runtime-typeof': ["error", {
61
- allowInTypeGuards: boolean;
62
- }];
63
- 'unicorn/no-abusive-eslint-disable': "error";
64
- 'import-js/order': ["error", {
65
- groups: (string | string[])[];
66
- 'newlines-between': "always";
67
- alphabetize: {
68
- order: string;
69
- caseInsensitive: boolean;
70
- };
71
- }];
72
- };
73
- env: {
74
- builtin: true;
10
+ oxlint: {
11
+ plugins: ("oxc" | "typescript" | "unicorn" | "vitest")[];
12
+ jsPlugins: {
13
+ name: string;
14
+ specifier: string;
15
+ }[];
16
+ options: {
17
+ typeAware: true;
18
+ };
19
+ categories: {
20
+ correctness: "error";
21
+ };
22
+ rules: {
23
+ curly: "error";
24
+ 'typescript/no-deprecated': "error";
25
+ 'typescript/consistent-type-imports': "error";
26
+ 'typescript/no-non-null-assertion': "error";
27
+ 'typescript/consistent-type-assertions': ["error", {
28
+ assertionStyle: "never";
29
+ }];
30
+ 'typescript/no-explicit-any': "error";
31
+ 'typescript/ban-ts-comment': ["error", {
32
+ minimumDescriptionLength: number;
33
+ }];
34
+ 'typescript/no-duplicate-enum-values': "error";
35
+ 'typescript/no-empty-object-type': "error";
36
+ 'typescript/no-extra-non-null-assertion': "error";
37
+ 'typescript/no-misused-new': "error";
38
+ 'typescript/no-namespace': "error";
39
+ 'typescript/no-non-null-asserted-optional-chain': "error";
40
+ 'typescript/no-require-imports': "error";
41
+ 'typescript/no-this-alias': "error";
42
+ 'typescript/no-unnecessary-type-constraint': "error";
43
+ 'typescript/no-unsafe-declaration-merging': "error";
44
+ 'typescript/no-unsafe-function-type': "error";
45
+ 'typescript/no-wrapper-object-types': "error";
46
+ 'typescript/prefer-as-const': "error";
47
+ 'typescript/prefer-namespace-keyword': "error";
48
+ 'typescript/triple-slash-reference': "error";
49
+ 'typescript/no-dynamic-delete': "error";
50
+ 'typescript/no-extraneous-class': "error";
51
+ 'typescript/no-invalid-void-type': "error";
52
+ 'typescript/no-non-null-asserted-nullish-coalescing': "error";
53
+ 'typescript/prefer-literal-enum-member': "error";
54
+ 'typescript/unified-signatures': "error";
55
+ 'typescript/adjacent-overload-signatures': "error";
56
+ 'typescript/array-type': "error";
57
+ 'typescript/ban-tslint-comment': "error";
58
+ 'typescript/class-literal-property-style': "error";
59
+ 'typescript/consistent-generic-constructors': "error";
60
+ 'typescript/consistent-indexed-object-style': "error";
61
+ 'typescript/consistent-type-definitions': "error";
62
+ 'typescript/no-confusing-non-null-assertion': "error";
63
+ 'typescript/no-inferrable-types': "error";
64
+ 'typescript/prefer-for-of': "error";
65
+ 'typescript/prefer-function-type': "error";
66
+ 'oxc/no-accumulating-spread': "error";
67
+ 'vitest/no-conditional-expect': "error";
68
+ 'vitest/expect-expect': "error";
69
+ 'anti-slop/no-runtime-typeof': ["error", {
70
+ allowInTypeGuards: boolean;
71
+ }];
72
+ 'unicorn/no-abusive-eslint-disable': "error";
73
+ 'import-js/order': ["error", {
74
+ groups: (string | string[])[];
75
+ 'newlines-between': "always";
76
+ alphabetize: {
77
+ order: string;
78
+ caseInsensitive: boolean;
79
+ };
80
+ }];
81
+ };
82
+ env: {
83
+ builtin: true;
84
+ };
75
85
  };
76
86
  };
77
87
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAkEuB,KAAK;gBAAS,eAAe"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1,69 +1,5 @@
1
- import antiSlopPlugin from '@kamaal111/oxlint-plugin-anti-slop';
2
- import { defineConfig } from 'oxlint';
3
- const antiSlopRules = Object.fromEntries(Object.keys(antiSlopPlugin.rules).map(ruleName => [`anti-slop/${ruleName}`, 'error']));
4
- export default defineConfig({
5
- plugins: ['typescript', 'unicorn', 'oxc', 'vitest'],
6
- jsPlugins: [
7
- { name: 'anti-slop', specifier: '@kamaal111/oxlint-plugin-anti-slop' },
8
- { name: 'import-js', specifier: 'eslint-plugin-import' },
9
- ],
10
- options: { typeAware: true },
11
- categories: { correctness: 'error' },
12
- rules: {
13
- ...antiSlopRules,
14
- curly: 'error',
15
- 'typescript/no-deprecated': 'error',
16
- 'typescript/consistent-type-imports': 'error',
17
- 'typescript/no-non-null-assertion': 'error',
18
- 'typescript/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
19
- 'typescript/no-explicit-any': 'error',
20
- 'typescript/ban-ts-comment': ['error', { minimumDescriptionLength: 10 }],
21
- 'typescript/no-duplicate-enum-values': 'error',
22
- 'typescript/no-empty-object-type': 'error',
23
- 'typescript/no-extra-non-null-assertion': 'error',
24
- 'typescript/no-misused-new': 'error',
25
- 'typescript/no-namespace': 'error',
26
- 'typescript/no-non-null-asserted-optional-chain': 'error',
27
- 'typescript/no-require-imports': 'error',
28
- 'typescript/no-this-alias': 'error',
29
- 'typescript/no-unnecessary-type-constraint': 'error',
30
- 'typescript/no-unsafe-declaration-merging': 'error',
31
- 'typescript/no-unsafe-function-type': 'error',
32
- 'typescript/no-wrapper-object-types': 'error',
33
- 'typescript/prefer-as-const': 'error',
34
- 'typescript/prefer-namespace-keyword': 'error',
35
- 'typescript/triple-slash-reference': 'error',
36
- 'typescript/no-dynamic-delete': 'error',
37
- 'typescript/no-extraneous-class': 'error',
38
- 'typescript/no-invalid-void-type': 'error',
39
- 'typescript/no-non-null-asserted-nullish-coalescing': 'error',
40
- 'typescript/prefer-literal-enum-member': 'error',
41
- 'typescript/unified-signatures': 'error',
42
- 'typescript/adjacent-overload-signatures': 'error',
43
- 'typescript/array-type': 'error',
44
- 'typescript/ban-tslint-comment': 'error',
45
- 'typescript/class-literal-property-style': 'error',
46
- 'typescript/consistent-generic-constructors': 'error',
47
- 'typescript/consistent-indexed-object-style': 'error',
48
- 'typescript/consistent-type-definitions': 'error',
49
- 'typescript/no-confusing-non-null-assertion': 'error',
50
- 'typescript/no-inferrable-types': 'error',
51
- 'typescript/prefer-for-of': 'error',
52
- 'typescript/prefer-function-type': 'error',
53
- 'oxc/no-accumulating-spread': 'error',
54
- 'vitest/no-conditional-expect': 'error',
55
- 'vitest/expect-expect': 'error',
56
- 'anti-slop/no-runtime-typeof': ['error', { allowInTypeGuards: true }],
57
- 'unicorn/no-abusive-eslint-disable': 'error',
58
- 'import-js/order': [
59
- 'error',
60
- {
61
- groups: ['builtin', 'external', ['internal', 'parent', 'sibling', 'index']],
62
- 'newlines-between': 'always',
63
- alphabetize: { order: 'asc', caseInsensitive: true },
64
- },
65
- ],
66
- },
67
- env: { builtin: true },
68
- });
1
+ import oxfmt from './oxfmt.js';
2
+ import oxlint from './oxlint.js';
3
+ export { oxfmt, oxlint };
4
+ export default { oxfmt, oxlint };
69
5
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version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AAM,YAAY,CAAC;AAC/B,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAEzB,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,78 @@
1
+ declare const _default: {
2
+ plugins: ("oxc" | "typescript" | "unicorn" | "vitest")[];
3
+ jsPlugins: {
4
+ name: string;
5
+ specifier: string;
6
+ }[];
7
+ options: {
8
+ typeAware: true;
9
+ };
10
+ categories: {
11
+ correctness: "error";
12
+ };
13
+ rules: {
14
+ curly: "error";
15
+ 'typescript/no-deprecated': "error";
16
+ 'typescript/consistent-type-imports': "error";
17
+ 'typescript/no-non-null-assertion': "error";
18
+ 'typescript/consistent-type-assertions': ["error", {
19
+ assertionStyle: "never";
20
+ }];
21
+ 'typescript/no-explicit-any': "error";
22
+ 'typescript/ban-ts-comment': ["error", {
23
+ minimumDescriptionLength: number;
24
+ }];
25
+ 'typescript/no-duplicate-enum-values': "error";
26
+ 'typescript/no-empty-object-type': "error";
27
+ 'typescript/no-extra-non-null-assertion': "error";
28
+ 'typescript/no-misused-new': "error";
29
+ 'typescript/no-namespace': "error";
30
+ 'typescript/no-non-null-asserted-optional-chain': "error";
31
+ 'typescript/no-require-imports': "error";
32
+ 'typescript/no-this-alias': "error";
33
+ 'typescript/no-unnecessary-type-constraint': "error";
34
+ 'typescript/no-unsafe-declaration-merging': "error";
35
+ 'typescript/no-unsafe-function-type': "error";
36
+ 'typescript/no-wrapper-object-types': "error";
37
+ 'typescript/prefer-as-const': "error";
38
+ 'typescript/prefer-namespace-keyword': "error";
39
+ 'typescript/triple-slash-reference': "error";
40
+ 'typescript/no-dynamic-delete': "error";
41
+ 'typescript/no-extraneous-class': "error";
42
+ 'typescript/no-invalid-void-type': "error";
43
+ 'typescript/no-non-null-asserted-nullish-coalescing': "error";
44
+ 'typescript/prefer-literal-enum-member': "error";
45
+ 'typescript/unified-signatures': "error";
46
+ 'typescript/adjacent-overload-signatures': "error";
47
+ 'typescript/array-type': "error";
48
+ 'typescript/ban-tslint-comment': "error";
49
+ 'typescript/class-literal-property-style': "error";
50
+ 'typescript/consistent-generic-constructors': "error";
51
+ 'typescript/consistent-indexed-object-style': "error";
52
+ 'typescript/consistent-type-definitions': "error";
53
+ 'typescript/no-confusing-non-null-assertion': "error";
54
+ 'typescript/no-inferrable-types': "error";
55
+ 'typescript/prefer-for-of': "error";
56
+ 'typescript/prefer-function-type': "error";
57
+ 'oxc/no-accumulating-spread': "error";
58
+ 'vitest/no-conditional-expect': "error";
59
+ 'vitest/expect-expect': "error";
60
+ 'anti-slop/no-runtime-typeof': ["error", {
61
+ allowInTypeGuards: boolean;
62
+ }];
63
+ 'unicorn/no-abusive-eslint-disable': "error";
64
+ 'import-js/order': ["error", {
65
+ groups: (string | string[])[];
66
+ 'newlines-between': "always";
67
+ alphabetize: {
68
+ order: string;
69
+ caseInsensitive: boolean;
70
+ };
71
+ }];
72
+ };
73
+ env: {
74
+ builtin: true;
75
+ };
76
+ };
77
+ export default _default;
78
+ //# sourceMappingURL=oxlint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oxlint.d.ts","sourceRoot":"","sources":["../src/oxlint.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAkEuB,KAAK;gBAAS,eAAe"}
package/dist/oxlint.js ADDED
@@ -0,0 +1,69 @@
1
+ import antiSlopPlugin from '@kamaal111/oxlint-plugin-anti-slop';
2
+ import { defineConfig } from 'oxlint';
3
+ const antiSlopRules = Object.fromEntries(Object.keys(antiSlopPlugin.rules).map(ruleName => [`anti-slop/${ruleName}`, 'error']));
4
+ export default defineConfig({
5
+ plugins: ['typescript', 'unicorn', 'oxc', 'vitest'],
6
+ jsPlugins: [
7
+ { name: 'anti-slop', specifier: '@kamaal111/oxlint-plugin-anti-slop' },
8
+ { name: 'import-js', specifier: 'eslint-plugin-import' },
9
+ ],
10
+ options: { typeAware: true },
11
+ categories: { correctness: 'error' },
12
+ rules: {
13
+ ...antiSlopRules,
14
+ curly: 'error',
15
+ 'typescript/no-deprecated': 'error',
16
+ 'typescript/consistent-type-imports': 'error',
17
+ 'typescript/no-non-null-assertion': 'error',
18
+ 'typescript/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
19
+ 'typescript/no-explicit-any': 'error',
20
+ 'typescript/ban-ts-comment': ['error', { minimumDescriptionLength: 10 }],
21
+ 'typescript/no-duplicate-enum-values': 'error',
22
+ 'typescript/no-empty-object-type': 'error',
23
+ 'typescript/no-extra-non-null-assertion': 'error',
24
+ 'typescript/no-misused-new': 'error',
25
+ 'typescript/no-namespace': 'error',
26
+ 'typescript/no-non-null-asserted-optional-chain': 'error',
27
+ 'typescript/no-require-imports': 'error',
28
+ 'typescript/no-this-alias': 'error',
29
+ 'typescript/no-unnecessary-type-constraint': 'error',
30
+ 'typescript/no-unsafe-declaration-merging': 'error',
31
+ 'typescript/no-unsafe-function-type': 'error',
32
+ 'typescript/no-wrapper-object-types': 'error',
33
+ 'typescript/prefer-as-const': 'error',
34
+ 'typescript/prefer-namespace-keyword': 'error',
35
+ 'typescript/triple-slash-reference': 'error',
36
+ 'typescript/no-dynamic-delete': 'error',
37
+ 'typescript/no-extraneous-class': 'error',
38
+ 'typescript/no-invalid-void-type': 'error',
39
+ 'typescript/no-non-null-asserted-nullish-coalescing': 'error',
40
+ 'typescript/prefer-literal-enum-member': 'error',
41
+ 'typescript/unified-signatures': 'error',
42
+ 'typescript/adjacent-overload-signatures': 'error',
43
+ 'typescript/array-type': 'error',
44
+ 'typescript/ban-tslint-comment': 'error',
45
+ 'typescript/class-literal-property-style': 'error',
46
+ 'typescript/consistent-generic-constructors': 'error',
47
+ 'typescript/consistent-indexed-object-style': 'error',
48
+ 'typescript/consistent-type-definitions': 'error',
49
+ 'typescript/no-confusing-non-null-assertion': 'error',
50
+ 'typescript/no-inferrable-types': 'error',
51
+ 'typescript/prefer-for-of': 'error',
52
+ 'typescript/prefer-function-type': 'error',
53
+ 'oxc/no-accumulating-spread': 'error',
54
+ 'vitest/no-conditional-expect': 'error',
55
+ 'vitest/expect-expect': 'error',
56
+ 'anti-slop/no-runtime-typeof': ['error', { allowInTypeGuards: true }],
57
+ 'unicorn/no-abusive-eslint-disable': 'error',
58
+ 'import-js/order': [
59
+ 'error',
60
+ {
61
+ groups: ['builtin', 'external', ['internal', 'parent', 'sibling', 'index']],
62
+ 'newlines-between': 'always',
63
+ alphabetize: { order: 'asc', caseInsensitive: true },
64
+ },
65
+ ],
66
+ },
67
+ env: { builtin: true },
68
+ });
69
+ //# sourceMappingURL=oxlint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oxlint.js","sourceRoot":"","sources":["../src/oxlint.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,aAAa,GAAG,MAAM,CAAC,WAAW,CACtC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,aAAa,QAAQ,EAAE,EAAE,OAAO,CAAU,CAAC,CAC/F,CAAC;AAEF,eAAe,YAAY,CAAC;IAC1B,OAAO,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC;IACnD,SAAS,EAAE;QACT,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,oCAAoC,EAAE;QACtE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,sBAAsB,EAAE;KACzD;IACD,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;IAC5B,UAAU,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE;IACpC,KAAK,EAAE;QACL,GAAG,aAAa;QAChB,KAAK,EAAE,OAAO;QACd,0BAA0B,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AAiB,EAAE,IAAI,EAAE,CAAC;QACrE,mCAAmC,EAAE,OAAO;QAC5C,iBAAiB,EAAE;YACjB,OAAO;YACP;gBACE,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;gBAC3E,kBAAkB,EAAE,QAAQ;gBAC5B,WAAW,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE;aACrD;SACF;KACF;IACD,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;CACvB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kamaal111/kamaal-quality-config",
3
- "version": "0.0.4",
3
+ "version": "0.1.0",
4
4
  "description": "Kamaal Farah's shared oxlint quality config.",
5
5
  "keywords": [
6
6
  "lint",
@@ -25,6 +25,10 @@
25
25
  "types": "./dist/index.d.ts",
26
26
  "default": "./dist/index.js"
27
27
  },
28
+ "./oxlint": {
29
+ "types": "./dist/oxlint.d.ts",
30
+ "default": "./dist/oxlint.js"
31
+ },
28
32
  "./oxfmt": {
29
33
  "types": "./dist/oxfmt.d.ts",
30
34
  "default": "./dist/oxfmt.js"
@@ -45,7 +49,8 @@
45
49
  "oxfmt": "^0.67.0",
46
50
  "oxlint": "^1.82.0",
47
51
  "oxlint-tsgolint": "^7.0.2001",
48
- "typescript": "^7.0.2"
52
+ "typescript": "^7.0.2",
53
+ "vitest": "^5.0.1"
49
54
  },
50
55
  "lint-staged": {
51
56
  "*.{js,mjs,cjs,ts}": "pnpm run lint",
@@ -69,6 +74,7 @@
69
74
  "format:check": "oxfmt --check",
70
75
  "type-check": "tsc --noEmit",
71
76
  "quality": "pnpm run lint && pnpm run format:check && pnpm run type-check",
77
+ "test": "pnpm run build && tsc -p tsconfig.tests.json && vitest run",
72
78
  "release": "node ./scripts/publish.ts"
73
79
  }
74
80
  }