@storm-software/eslint-plugin-bun 0.0.6 → 0.0.8
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 +1 -1
- package/dist/configs/index.d.mts +5 -0
- package/dist/configs/index.mjs +4 -943
- package/dist/configs/recommended.d.mts +5 -0
- package/dist/configs/recommended.mjs +33 -939
- package/dist/helpers/bun-workspace.d.mts +49 -0
- package/dist/helpers/bun-workspace.mjs +197 -244
- package/dist/helpers/{create-rule.d.ts → create-rule.d.mts} +6 -6
- package/dist/helpers/create-rule.mjs +37 -38
- package/dist/helpers/{iterate-dependencies.d.ts → iterate-dependencies.d.mts} +7 -7
- package/dist/helpers/iterate-dependencies.mjs +36 -56
- package/dist/index.d.mts +52 -0
- package/dist/index.mjs +29 -951
- package/dist/plugin-DfH7W_YX.mjs +20 -0
- package/dist/plugin.d.mts +31 -0
- package/dist/plugin.mjs +1 -807
- package/dist/rules/json-enforce-catalog.d.mts +14 -0
- package/dist/rules/json-enforce-catalog.mjs +102 -444
- package/dist/rules/json-no-duplicate-catalog-item.d.mts +8 -0
- package/dist/rules/json-no-duplicate-catalog-item.mjs +72 -386
- package/dist/rules/json-no-unused-catalog-item.d.mts +5 -0
- package/dist/rules/json-no-unused-catalog-item.mjs +70 -423
- package/dist/rules/json-valid-catalog.d.mts +11 -0
- package/dist/rules/json-valid-catalog.mjs +80 -422
- package/package.json +17 -23
- package/dist/configs/index.d.ts +0 -5
- package/dist/configs/recommended.d.ts +0 -5
- package/dist/helpers/bun-workspace.d.ts +0 -48
- package/dist/index.d.ts +0 -58
- package/dist/plugin.d.ts +0 -33
- package/dist/rules/json-enforce-catalog.d.ts +0 -18
- package/dist/rules/json-no-duplicate-catalog-item.d.ts +0 -12
- package/dist/rules/json-no-unused-catalog-item.d.ts +0 -7
- package/dist/rules/json-valid-catalog.d.ts +0 -15
package/dist/index.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { RuleModule } from './helpers/create-rule.js';
|
|
2
|
-
import { Linter, ESLint } from 'eslint';
|
|
3
|
-
export { configs } from './configs/index.js';
|
|
4
|
-
import { plugin } from './plugin.js';
|
|
5
|
-
import '@typescript-eslint/utils/eslint-utils';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* ESLint plugin for Storm Software to enforce Bun catalog usage across monorepo packages.
|
|
9
|
-
*
|
|
10
|
-
* Catalog versions are stored in the workspace root `package.json` (`catalog` /
|
|
11
|
-
* `catalogs`, top-level or under `workspaces`), matching Bun's catalog protocol:
|
|
12
|
-
* https://bun.com/docs/pm/catalogs
|
|
13
|
-
*
|
|
14
|
-
* @packageDocumentation
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```js
|
|
18
|
-
* import bun from "@storm-software/eslint-plugin-bun";
|
|
19
|
-
*
|
|
20
|
-
* export default [
|
|
21
|
-
* ...bun.configs.recommended,
|
|
22
|
-
* ];
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @see [Storm Software](https://stormsoftware.com) for more information about our projects and licensing.
|
|
26
|
-
*/
|
|
27
|
-
declare const eslintPlugin: ESLint.Plugin;
|
|
28
|
-
|
|
29
|
-
declare const rules: {
|
|
30
|
-
"json-enforce-catalog": RuleModule<[{
|
|
31
|
-
allowedProtocols?: string[];
|
|
32
|
-
autofix?: boolean;
|
|
33
|
-
defaultCatalog?: string;
|
|
34
|
-
reuseExistingCatalog?: boolean;
|
|
35
|
-
conflicts?: "new-catalog" | "overrides" | "error";
|
|
36
|
-
fields?: string[];
|
|
37
|
-
ignore?: string[];
|
|
38
|
-
}]>;
|
|
39
|
-
"json-valid-catalog": RuleModule<[{
|
|
40
|
-
autoInsert?: boolean;
|
|
41
|
-
autoInsertDefaultSpecifier?: string;
|
|
42
|
-
autofix?: boolean;
|
|
43
|
-
fields?: string[];
|
|
44
|
-
}]>;
|
|
45
|
-
"json-no-unused-catalog-item": RuleModule<[]>;
|
|
46
|
-
"json-no-duplicate-catalog-item": RuleModule<[{
|
|
47
|
-
allow?: string[];
|
|
48
|
-
}]>;
|
|
49
|
-
};
|
|
50
|
-
type RuleDefinitions = (typeof plugin)["rules"];
|
|
51
|
-
type RuleOptions = {
|
|
52
|
-
[K in keyof RuleDefinitions]: RuleDefinitions[K]["defaultOptions"];
|
|
53
|
-
};
|
|
54
|
-
type Rules = {
|
|
55
|
-
[K in keyof RuleOptions]: Linter.RuleEntry<RuleOptions[K]>;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export { type RuleOptions, type Rules, eslintPlugin as default, rules };
|
package/dist/plugin.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { RuleModule } from './helpers/create-rule.js';
|
|
2
|
-
import '@typescript-eslint/utils/eslint-utils';
|
|
3
|
-
import 'eslint';
|
|
4
|
-
|
|
5
|
-
declare const plugin: {
|
|
6
|
-
meta: {
|
|
7
|
-
name: string;
|
|
8
|
-
version: string;
|
|
9
|
-
};
|
|
10
|
-
rules: {
|
|
11
|
-
"json-enforce-catalog": RuleModule<[{
|
|
12
|
-
allowedProtocols?: string[];
|
|
13
|
-
autofix?: boolean;
|
|
14
|
-
defaultCatalog?: string;
|
|
15
|
-
reuseExistingCatalog?: boolean;
|
|
16
|
-
conflicts?: "new-catalog" | "overrides" | "error";
|
|
17
|
-
fields?: string[];
|
|
18
|
-
ignore?: string[];
|
|
19
|
-
}]>;
|
|
20
|
-
"json-valid-catalog": RuleModule<[{
|
|
21
|
-
autoInsert?: boolean;
|
|
22
|
-
autoInsertDefaultSpecifier?: string;
|
|
23
|
-
autofix?: boolean;
|
|
24
|
-
fields?: string[];
|
|
25
|
-
}]>;
|
|
26
|
-
"json-no-unused-catalog-item": RuleModule<[]>;
|
|
27
|
-
"json-no-duplicate-catalog-item": RuleModule<[{
|
|
28
|
-
allow?: string[];
|
|
29
|
-
}]>;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export { plugin };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { RuleModule } from '../helpers/create-rule.js';
|
|
2
|
-
import '@typescript-eslint/utils/eslint-utils';
|
|
3
|
-
import 'eslint';
|
|
4
|
-
|
|
5
|
-
type Options = [
|
|
6
|
-
{
|
|
7
|
-
allowedProtocols?: string[];
|
|
8
|
-
autofix?: boolean;
|
|
9
|
-
defaultCatalog?: string;
|
|
10
|
-
reuseExistingCatalog?: boolean;
|
|
11
|
-
conflicts?: "new-catalog" | "overrides" | "error";
|
|
12
|
-
fields?: string[];
|
|
13
|
-
ignore?: string[];
|
|
14
|
-
}
|
|
15
|
-
];
|
|
16
|
-
declare const _default: RuleModule<Options>;
|
|
17
|
-
|
|
18
|
-
export { _default as default };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { RuleModule } from '../helpers/create-rule.js';
|
|
2
|
-
import '@typescript-eslint/utils/eslint-utils';
|
|
3
|
-
import 'eslint';
|
|
4
|
-
|
|
5
|
-
type Options = [
|
|
6
|
-
{
|
|
7
|
-
allow?: string[];
|
|
8
|
-
}
|
|
9
|
-
];
|
|
10
|
-
declare const _default: RuleModule<Options>;
|
|
11
|
-
|
|
12
|
-
export { _default as default };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { RuleModule } from '../helpers/create-rule.js';
|
|
2
|
-
import '@typescript-eslint/utils/eslint-utils';
|
|
3
|
-
import 'eslint';
|
|
4
|
-
|
|
5
|
-
type Options = [
|
|
6
|
-
{
|
|
7
|
-
autoInsert?: boolean;
|
|
8
|
-
autoInsertDefaultSpecifier?: string;
|
|
9
|
-
autofix?: boolean;
|
|
10
|
-
fields?: string[];
|
|
11
|
-
}
|
|
12
|
-
];
|
|
13
|
-
declare const _default: RuleModule<Options>;
|
|
14
|
-
|
|
15
|
-
export { _default as default };
|