@cerios/sparta-lint-rules 0.0.0-stage → 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,8 @@
1
+ The MIT License (MIT)
2
+ Copyright © 2026 Cerios
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+
6
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
+
8
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,236 @@
1
- # Temporary Holding Version
1
+ # 🛡️ SPARTA Lint Rules | By Cerios
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Lint rules for **SPARTA** (Simply Powerful Automated Regression Test Architecture). They keep the layers of a SPARTA test project in their place: what may import what, where polling and checks belong, how files and classes are named, and how `@step` decorators are used.
4
+
5
+ The rules are written once against the ESLint rule API, which [oxlint's JS plugins](https://oxc.rs/docs/guide/usage/linter/js-plugins) also implement. That gives you:
6
+
7
+ - **oxlint** (recommended): fast, and the linter used in SPARTA projects.
8
+ - **ESLint** 9+: the same rules for projects that can't use oxlint.
9
+
10
+ Every rule is tested in both linters.
11
+
12
+ ---
13
+
14
+ ## Installation
15
+
16
+ ```sh
17
+ npm install --save-dev @cerios/sparta-lint-rules
18
+ ```
19
+
20
+ Requires Node.js `^22.18.0 || >=24.11.0`, and oxlint `>=1.91.0` or ESLint `>=9`.
21
+
22
+ ---
23
+
24
+ ## Usage
25
+
26
+ ### oxlint with `oxlint.config.ts`
27
+
28
+ Extend the recommended config:
29
+
30
+ ```ts
31
+ import sparta from "@cerios/sparta-lint-rules/oxlint";
32
+ import { defineConfig } from "oxlint";
33
+
34
+ export default defineConfig({
35
+ extends: [sparta],
36
+ rules: {
37
+ // override a rule if needed
38
+ "sparta/padding-lines": "off",
39
+ },
40
+ });
41
+ ```
42
+
43
+ ### oxlint with `.oxlintrc.json`
44
+
45
+ Register the plugin with `jsPlugins` and enable the rules you want:
46
+
47
+ ```json
48
+ {
49
+ "jsPlugins": ["@cerios/sparta-lint-rules"],
50
+ "rules": {
51
+ "sparta/architecture-boundaries": "error",
52
+ "sparta/class-matches-filename": "warn",
53
+ "sparta/expect-from-support": "error",
54
+ "sparta/file-naming": "warn",
55
+ "sparta/lines-between-class-members": "warn",
56
+ "sparta/no-direct-construction-in-tests": "error",
57
+ "sparta/no-expect-in-tests": "error",
58
+ "sparta/no-hard-waits": "error",
59
+ "sparta/no-nested-polling": "error",
60
+ "sparta/padding-lines": "warn",
61
+ "sparta/private-members-last": "warn",
62
+ "sparta/step-placeholders": "error",
63
+ "sparta/step-required": "warn"
64
+ }
65
+ }
66
+ ```
67
+
68
+ ### ESLint (flat config)
69
+
70
+ ```js
71
+ import sparta from "@cerios/sparta-lint-rules";
72
+ // eslint.config.mjs
73
+ import tsParser from "@typescript-eslint/parser";
74
+
75
+ export default [{ files: ["**/*.ts"], languageOptions: { parser: tsParser } }, sparta.configs.recommended];
76
+ ```
77
+
78
+ ---
79
+
80
+ ## Project layout
81
+
82
+ The rules recognise files by their path, so they rely on the SPARTA folder conventions:
83
+
84
+ ```text
85
+ <project>/
86
+ ├── sparta/
87
+ │ ├── api/ # area: api, database, ui or mobile
88
+ │ │ ├── common/ # shared within the area
89
+ │ │ └── <group>/ # e.g. orders
90
+ │ │ ├── clients/ # *-client.ts
91
+ │ │ ├── services/ # *-service.ts
92
+ │ │ ├── steppers/ # *-stepper.ts
93
+ │ │ ├── asserters/ # *-asserter.ts
94
+ │ │ └── scenarios/ # *-scenario.ts
95
+ │ ├── database/<group>/ # repositories/, services/, steppers/, asserters/, scenarios/, ...
96
+ │ ├── ui/<group>/ # pages/, components/, builders/, directors/, steppers/, ...
97
+ │ ├── mobile/<group>/ # like ui, with screens/ (*-screen.ts) in place of pages/
98
+ │ ├── scenarios/ # cross-area scenarios
99
+ │ ├── fixtures/ # Playwright fixtures that wire everything up
100
+ │ ├── common/ # shared, area-independent code
101
+ │ └── support/ # expect with custom matchers, helpers
102
+ └── tests/ # the tests themselves
103
+ └── framework/ # framework tests; never checked
104
+ ```
105
+
106
+ Imports through the `@sparta/*` and `@tests/*` path aliases are resolved to `<project>/sparta/` and `<project>/tests/`. Files elsewhere are not affected by the path-based rules.
107
+
108
+ ---
109
+
110
+ ## Configuration
111
+
112
+ Without configuration, the rules use the SPARTA names shown above. If your project uses other names, describe them in `settings.sparta`, a single block that all rules read.
113
+
114
+ **Settings describe your project; they never relax the rules.** A setting either:
115
+
116
+ - **maps your name onto a SPARTA concept**, so it gets all of that concept's checks: `areas: { web: "ui" }` makes `web/` follow every `ui` rule;
117
+ - **adds names to detect**, which only makes the rules stricter.
118
+
119
+ The standard names keep working next to yours. The layer rules, isolation and re-export checks themselves are not configurable. To switch a check off, use the linter itself (rule severity, `ignores`, overrides), where it stays visible.
120
+
121
+ | Setting | Default | What it does | Used by |
122
+ | ---------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
123
+ | `root` | nearest folder with a `package.json` | Project root: aliases resolve against it, and only paths below it are matched. A relative path resolves against the folder the linter runs in. | all path-based rules |
124
+ | `folders` | `{ sparta: "sparta", tests: "tests" }` | Names of the two top-level folders. Replaces the defaults. | all path-based rules |
125
+ | `areas` | `api`, `database`, `mobile`, `ui` | Extra area folders, each following a standard area: `{ web: "ui" }`. Each area folder is still isolated from the others. | all path-based rules |
126
+ | `layers` | `pages`, `steppers`, `services`, ... | Extra layer folders, each following a standard layer folder (its layer rules and file suffix): `{ "page-objects": "pages" }`. | `architecture-boundaries`, `file-naming`, `class-matches-filename`, `step-required` |
127
+ | `aliases` | `@sparta/*` → `sparta`, `@tests/*` → `tests` | Extra path aliases, in tsconfig syntax, pointing to `sparta` or `tests`: `{ "@app/*": "sparta" }`. | `architecture-boundaries`, `no-nested-polling` |
128
+ | `supportModule` | `@sparta/support` | The module `expect` must come from. Replaces the default. | `expect-from-support` |
129
+ | `pollingMethods` | `toPass`, `toPassAndReturn`, `poll`, `pollAndReturn` | Extra retrying methods, called as `x.method(callback)` or `x(callback).method()`. | `no-nested-polling` |
130
+ | `stepDecorators` | `step` | Extra decorators that count as `@step`. | `step-required`, `step-placeholders` |
131
+ | `expectNames` | `expect`, `expectly…` | Extra assertion functions that tests must not call. | `no-expect-in-tests` |
132
+
133
+ A mistake in the settings stops the lint run with a clear message, so a typo can't silently weaken the checks:
134
+
135
+ ```text
136
+ [@cerios/sparta-lint-rules] settings.sparta.layers.page-objects: unknown layer folder "pagez"; did you mean "pages"?
137
+ ```
138
+
139
+ A name can't turn one SPARTA concept into another, so `areas: { ui: "api" }`, `areas: { common: "ui" }` and `layers: { pages: "steppers" }` are rejected.
140
+
141
+ ### oxlint with `oxlint.config.ts`
142
+
143
+ ```ts
144
+ import sparta from "@cerios/sparta-lint-rules/oxlint";
145
+ import type { SpartaSettings } from "@cerios/sparta-lint-rules/settings";
146
+ import { defineConfig } from "oxlint";
147
+
148
+ export default defineConfig({
149
+ extends: [sparta],
150
+ settings: {
151
+ sparta: {
152
+ areas: { web: "ui" },
153
+ layers: { "page-objects": "pages" },
154
+ aliases: { "@app/*": "sparta" },
155
+ supportModule: "@app/support",
156
+ } satisfies SpartaSettings,
157
+ },
158
+ });
159
+ ```
160
+
161
+ ### oxlint with `.oxlintrc.json`
162
+
163
+ ```json
164
+ {
165
+ "jsPlugins": ["@cerios/sparta-lint-rules"],
166
+ "settings": {
167
+ "sparta": { "areas": { "web": "ui" } }
168
+ }
169
+ }
170
+ ```
171
+
172
+ ### ESLint (flat config)
173
+
174
+ ```js
175
+ export default [
176
+ // ...
177
+ sparta.configs.recommended,
178
+ { settings: { sparta: { areas: { web: "ui" } } } },
179
+ ];
180
+ ```
181
+
182
+ ### Project root
183
+
184
+ The project root is the nearest folder, from the linted file upwards, that contains a `package.json`. This works for a standalone project and for a package in a monorepo. If `sparta/` lives in a folder without its own `package.json`, for example `e2e/` in a monorepo, set `root`. In ESLint, an absolute path such as `` `${import.meta.dirname}/e2e` `` doesn't depend on where the linter runs.
185
+
186
+ Only the part of a file's path below the root is matched against the SPARTA folder names. A checkout inside a folder named `tests` or `sparta` therefore doesn't change how files are classified, and files outside the root aren't checked by the path-based rules.
187
+
188
+ ---
189
+
190
+ ## Rules
191
+
192
+ | Rule | Description | Recommended | Fix |
193
+ | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------- | --- |
194
+ | [architecture-boundaries](docs/rules/architecture-boundaries.md) | Enforce the SPARTA layer and isolation boundaries between imports | error | |
195
+ | [class-matches-filename](docs/rules/class-matches-filename.md) | One class per layer file, named after the file | warn | |
196
+ | [expect-from-support](docs/rules/expect-from-support.md) | Import `expect` from the support module inside `sparta/` | error | 🔧 |
197
+ | [file-naming](docs/rules/file-naming.md) | Files in a layer folder end with the layer suffix | warn | |
198
+ | [lines-between-class-members](docs/rules/lines-between-class-members.md) | Blank line after every multi-line class member | warn | 🔧 |
199
+ | [no-direct-construction-in-tests](docs/rules/no-direct-construction-in-tests.md) | No `new XStepper()` and friends in tests; use fixtures | error | |
200
+ | [no-expect-in-tests](docs/rules/no-expect-in-tests.md) | No `expect` in tests; checks belong in steppers and asserters | error | |
201
+ | [no-hard-waits](docs/rules/no-hard-waits.md) | No `waitForTimeout` or `setTimeout` sleeps | error | |
202
+ | [no-nested-polling](docs/rules/no-nested-polling.md) | No poll inside a poll callback, also through calls into other files | error | |
203
+ | [padding-lines](docs/rules/padding-lines.md) | Blank lines after imports, around functions and around object methods | warn | 🔧 |
204
+ | [private-members-last](docs/rules/private-members-last.md) | Public methods above private methods | warn | |
205
+ | [step-placeholders](docs/rules/step-placeholders.md) | Validate `@step` description placeholders against the method parameters | error | 🔧 |
206
+ | [step-required](docs/rules/step-required.md) | Public methods of steppers, asserters and scenarios need `@step` | warn | |
207
+
208
+ `@step` refers to [`@cerios/playwright-step-decorator`](https://github.com/CeriosTesting/playwright-step-decorator).
209
+
210
+ ---
211
+
212
+ ## Development
213
+
214
+ ```sh
215
+ npm install
216
+ npm run lint # oxlint, type-aware
217
+ npm run typecheck
218
+ npm run format:check
219
+ npm test # every rule in the oxlint and ESLint RuleTesters
220
+ npm run test:dist # build, then lint a fixture project with the built package via oxlint and ESLint
221
+ ```
222
+
223
+ A new rule needs a file in `src/rules/`, an entry in `src/rules/index.ts`, tests in `tests/rules/` and a page in `docs/rules/`. `tests/plugin.test.ts` checks that these exist. Add a changeset (`npm run changeset`) for every user-facing change.
224
+
225
+ ---
226
+
227
+ ## License
228
+
229
+ MIT, Ronald Veth - Cerios
230
+
231
+ ---
232
+
233
+ ## Links
234
+
235
+ - [NPM Package](https://www.npmjs.com/package/@cerios/sparta-lint-rules)
236
+ - [GitHub Repository](https://github.com/CeriosTesting/sparta-lint-rules)
package/dist/index.cjs ADDED
@@ -0,0 +1,18 @@
1
+ const require_rules = require("./rules-COk7kmEU.cjs");
2
+ // src/index.ts
3
+ const plugin = {
4
+ meta: {
5
+ name: require_rules.PLUGIN_NAME,
6
+ version: "0.0.1"
7
+ },
8
+ rules: require_rules.rules,
9
+ configs: {}
10
+ };
11
+ plugin.configs.recommended = {
12
+ name: `${require_rules.PLUGIN_NAME}/recommended`,
13
+ plugins: { [require_rules.PLUGIN_NAME]: plugin },
14
+ rules: require_rules.recommendedRules
15
+ };
16
+ module.exports = plugin;
17
+
18
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["PLUGIN_NAME","rules","recommendedRules"],"sources":["../package.json","../src/index.ts"],"sourcesContent":["","import { version } from \"../package.json\";\n\nimport type { SpartaPlugin } from \"./plugin-types\";\nimport { PLUGIN_NAME, recommendedRules, rules } from \"./rules\";\n\nconst plugin: SpartaPlugin = {\n\tmeta: { name: PLUGIN_NAME, version },\n\trules,\n\tconfigs: {} as SpartaPlugin[\"configs\"],\n};\n\nplugin.configs.recommended = {\n\tname: `${PLUGIN_NAME}/recommended`,\n\tplugins: { [PLUGIN_NAME]: plugin },\n\trules: recommendedRules,\n};\n\nexport default plugin;\n"],"mappings":";;ACKA,MAAM,SAAuB;CAC5B,MAAM;EAAE,MAAMA,cAAAA;EAAa;CAAQ;CACnCC,OAAAA,cAAAA;CACA,SAAS,CAAC;AACX;AAEA,OAAO,QAAQ,cAAc;CAC5B,MAAM,GAAGD,cAAAA,YAAY;CACrB,SAAS,GAAGA,cAAAA,cAAc,OAAO;CACjC,OAAOE,cAAAA;AACR"}
@@ -0,0 +1,3 @@
1
+ import { n as SpartaPlugin } from "./plugin-types-CgeW0cQl.cjs";
2
+ declare const plugin: SpartaPlugin;
3
+ export = plugin;
@@ -0,0 +1,3 @@
1
+ import { n as SpartaPlugin } from "./plugin-types-CgeW0cQl.mjs";
2
+ declare const plugin: SpartaPlugin;
3
+ export = plugin;
package/dist/index.mjs ADDED
@@ -0,0 +1,18 @@
1
+ import { n as recommendedRules, r as rules, t as PLUGIN_NAME } from "./rules-BSRYNh4F.mjs";
2
+ // src/index.ts
3
+ const plugin = {
4
+ meta: {
5
+ name: PLUGIN_NAME,
6
+ version: "0.0.1"
7
+ },
8
+ rules,
9
+ configs: {}
10
+ };
11
+ plugin.configs.recommended = {
12
+ name: `${PLUGIN_NAME}/recommended`,
13
+ plugins: { [PLUGIN_NAME]: plugin },
14
+ rules: recommendedRules
15
+ };
16
+ export { plugin as default };
17
+
18
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../package.json","../src/index.ts"],"sourcesContent":["","import { version } from \"../package.json\";\n\nimport type { SpartaPlugin } from \"./plugin-types\";\nimport { PLUGIN_NAME, recommendedRules, rules } from \"./rules\";\n\nconst plugin: SpartaPlugin = {\n\tmeta: { name: PLUGIN_NAME, version },\n\trules,\n\tconfigs: {} as SpartaPlugin[\"configs\"],\n};\n\nplugin.configs.recommended = {\n\tname: `${PLUGIN_NAME}/recommended`,\n\tplugins: { [PLUGIN_NAME]: plugin },\n\trules: recommendedRules,\n};\n\nexport default plugin;\n"],"mappings":";;ACKA,MAAM,SAAuB;CAC5B,MAAM;EAAE,MAAM;EAAa;CAAQ;CACnC;CACA,SAAS,CAAC;AACX;AAEA,OAAO,QAAQ,cAAc;CAC5B,MAAM,GAAG,YAAY;CACrB,SAAS,GAAG,cAAc,OAAO;CACjC,OAAO;AACR"}
@@ -0,0 +1,18 @@
1
+ // src/oxlint.ts
2
+ /**
3
+ * Recommended oxlint config, to extend from `oxlint.config.ts`:
4
+ *
5
+ * ```ts
6
+ * import { defineConfig } from "oxlint";
7
+ * import sparta from "@cerios/sparta-lint-rules/oxlint";
8
+ *
9
+ * export default defineConfig({ extends: [sparta] });
10
+ * ```
11
+ */
12
+ const config = {
13
+ jsPlugins: ["@cerios/sparta-lint-rules"],
14
+ rules: require("./rules-COk7kmEU.cjs").recommendedRules
15
+ };
16
+ module.exports = config;
17
+
18
+ //# sourceMappingURL=oxlint.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oxlint.cjs","names":["recommendedRules"],"sources":["../src/oxlint.ts"],"sourcesContent":["import type { SpartaOxlintConfig } from \"./plugin-types\";\nimport { recommendedRules } from \"./rules\";\n\n/**\n * Recommended oxlint config, to extend from `oxlint.config.ts`:\n *\n * ```ts\n * import { defineConfig } from \"oxlint\";\n * import sparta from \"@cerios/sparta-lint-rules/oxlint\";\n *\n * export default defineConfig({ extends: [sparta] });\n * ```\n */\nconst config: SpartaOxlintConfig = {\n\tjsPlugins: [\"@cerios/sparta-lint-rules\"],\n\trules: recommendedRules,\n};\n\nexport default config;\n"],"mappings":";;;;;;;;;;;AAaA,MAAM,SAA6B;CAClC,WAAW,CAAC,2BAA2B;CACvC,O,8BAAOA,CAAAA,CAAAA;AACR"}
@@ -0,0 +1,13 @@
1
+ import { t as SpartaOxlintConfig } from "./plugin-types-CgeW0cQl.cjs";
2
+ /**
3
+ * Recommended oxlint config, to extend from `oxlint.config.ts`:
4
+ *
5
+ * ```ts
6
+ * import { defineConfig } from "oxlint";
7
+ * import sparta from "@cerios/sparta-lint-rules/oxlint";
8
+ *
9
+ * export default defineConfig({ extends: [sparta] });
10
+ * ```
11
+ */
12
+ declare const config: SpartaOxlintConfig;
13
+ export = config;
@@ -0,0 +1,13 @@
1
+ import { t as SpartaOxlintConfig } from "./plugin-types-CgeW0cQl.mjs";
2
+ /**
3
+ * Recommended oxlint config, to extend from `oxlint.config.ts`:
4
+ *
5
+ * ```ts
6
+ * import { defineConfig } from "oxlint";
7
+ * import sparta from "@cerios/sparta-lint-rules/oxlint";
8
+ *
9
+ * export default defineConfig({ extends: [sparta] });
10
+ * ```
11
+ */
12
+ declare const config: SpartaOxlintConfig;
13
+ export = config;
@@ -0,0 +1,19 @@
1
+ import { n as recommendedRules } from "./rules-BSRYNh4F.mjs";
2
+ // src/oxlint.ts
3
+ /**
4
+ * Recommended oxlint config, to extend from `oxlint.config.ts`:
5
+ *
6
+ * ```ts
7
+ * import { defineConfig } from "oxlint";
8
+ * import sparta from "@cerios/sparta-lint-rules/oxlint";
9
+ *
10
+ * export default defineConfig({ extends: [sparta] });
11
+ * ```
12
+ */
13
+ const config = {
14
+ jsPlugins: ["@cerios/sparta-lint-rules"],
15
+ rules: recommendedRules
16
+ };
17
+ export { config as default };
18
+
19
+ //# sourceMappingURL=oxlint.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oxlint.mjs","names":[],"sources":["../src/oxlint.ts"],"sourcesContent":["import type { SpartaOxlintConfig } from \"./plugin-types\";\nimport { recommendedRules } from \"./rules\";\n\n/**\n * Recommended oxlint config, to extend from `oxlint.config.ts`:\n *\n * ```ts\n * import { defineConfig } from \"oxlint\";\n * import sparta from \"@cerios/sparta-lint-rules/oxlint\";\n *\n * export default defineConfig({ extends: [sparta] });\n * ```\n */\nconst config: SpartaOxlintConfig = {\n\tjsPlugins: [\"@cerios/sparta-lint-rules\"],\n\trules: recommendedRules,\n};\n\nexport default config;\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,SAA6B;CAClC,WAAW,CAAC,2BAA2B;CACvC,OAAO;AACR"}
@@ -0,0 +1,37 @@
1
+ declare const rules: {
2
+ "architecture-boundaries": import("@oxlint/plugins").CreateRule;
3
+ "class-matches-filename": import("@oxlint/plugins").CreateRule;
4
+ "expect-from-support": import("@oxlint/plugins").CreateRule;
5
+ "file-naming": import("@oxlint/plugins").CreateRule;
6
+ "lines-between-class-members": import("@oxlint/plugins").CreateRule;
7
+ "no-direct-construction-in-tests": import("@oxlint/plugins").CreateRule;
8
+ "no-expect-in-tests": import("@oxlint/plugins").CreateRule;
9
+ "no-hard-waits": import("@oxlint/plugins").CreateRule;
10
+ "no-nested-polling": import("@oxlint/plugins").CreateRule;
11
+ "padding-lines": import("@oxlint/plugins").CreateRule;
12
+ "private-members-last": import("@oxlint/plugins").CreateRule;
13
+ "step-placeholders": import("@oxlint/plugins").CreateRule;
14
+ "step-required": import("@oxlint/plugins").CreateRule;
15
+ };
16
+ type Severity = "error" | "warn";
17
+ /** ESLint flat config entry. Typed structurally so the package does not depend on ESLint's types. */
18
+ interface SpartaFlatConfig {
19
+ name: string;
20
+ plugins: Record<string, SpartaPlugin>;
21
+ rules: Record<string, Severity>;
22
+ }
23
+ interface SpartaPlugin {
24
+ meta: {
25
+ name: string;
26
+ version: string;
27
+ };
28
+ rules: typeof rules;
29
+ configs: {
30
+ recommended: SpartaFlatConfig;
31
+ };
32
+ }
33
+ interface SpartaOxlintConfig {
34
+ jsPlugins: string[];
35
+ rules: Record<string, Severity>;
36
+ }
37
+ export { SpartaPlugin as n, SpartaOxlintConfig as t };
@@ -0,0 +1,37 @@
1
+ declare const rules: {
2
+ "architecture-boundaries": import("@oxlint/plugins").CreateRule;
3
+ "class-matches-filename": import("@oxlint/plugins").CreateRule;
4
+ "expect-from-support": import("@oxlint/plugins").CreateRule;
5
+ "file-naming": import("@oxlint/plugins").CreateRule;
6
+ "lines-between-class-members": import("@oxlint/plugins").CreateRule;
7
+ "no-direct-construction-in-tests": import("@oxlint/plugins").CreateRule;
8
+ "no-expect-in-tests": import("@oxlint/plugins").CreateRule;
9
+ "no-hard-waits": import("@oxlint/plugins").CreateRule;
10
+ "no-nested-polling": import("@oxlint/plugins").CreateRule;
11
+ "padding-lines": import("@oxlint/plugins").CreateRule;
12
+ "private-members-last": import("@oxlint/plugins").CreateRule;
13
+ "step-placeholders": import("@oxlint/plugins").CreateRule;
14
+ "step-required": import("@oxlint/plugins").CreateRule;
15
+ };
16
+ type Severity = "error" | "warn";
17
+ /** ESLint flat config entry. Typed structurally so the package does not depend on ESLint's types. */
18
+ interface SpartaFlatConfig {
19
+ name: string;
20
+ plugins: Record<string, SpartaPlugin>;
21
+ rules: Record<string, Severity>;
22
+ }
23
+ interface SpartaPlugin {
24
+ meta: {
25
+ name: string;
26
+ version: string;
27
+ };
28
+ rules: typeof rules;
29
+ configs: {
30
+ recommended: SpartaFlatConfig;
31
+ };
32
+ }
33
+ interface SpartaOxlintConfig {
34
+ jsPlugins: string[];
35
+ rules: Record<string, Severity>;
36
+ }
37
+ export { SpartaPlugin as n, SpartaOxlintConfig as t };