@kamaal111/kamaal-quality-config 0.7.0 → 0.9.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 +147 -4
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +72 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/oxlint.d.ts +2 -2
- package/dist/oxlint.d.ts.map +1 -1
- package/dist/oxlint.js +22 -8
- package/dist/oxlint.js.map +1 -1
- package/dist/oxlintrc.json +18 -4
- package/dist/plugins/anti-slop.d.ts +3 -0
- package/dist/plugins/anti-slop.d.ts.map +1 -0
- package/dist/plugins/anti-slop.js +3 -0
- package/dist/plugins/anti-slop.js.map +1 -0
- package/dist/plugins/consistent-inline-type-imports.js +5 -3
- package/dist/plugins/consistent-inline-type-imports.js.map +1 -1
- package/dist/plugins/import.d.ts +3 -0
- package/dist/plugins/import.d.ts.map +1 -0
- package/dist/plugins/import.js +3 -0
- package/dist/plugins/import.js.map +1 -0
- package/dist/plugins/prefer-nonempty.d.ts +4 -0
- package/dist/plugins/prefer-nonempty.d.ts.map +1 -0
- package/dist/plugins/prefer-nonempty.js +135 -0
- package/dist/plugins/prefer-nonempty.js.map +1 -0
- package/dist/plugins/prefer-nullish.d.ts +3 -32
- package/dist/plugins/prefer-nullish.d.ts.map +1 -1
- package/dist/plugins/prefer-nullish.js +24 -28
- package/dist/plugins/prefer-nullish.js.map +1 -1
- package/dist/plugins/prefer-while-true.d.ts +26 -0
- package/dist/plugins/prefer-while-true.d.ts.map +1 -0
- package/dist/plugins/prefer-while-true.js +26 -0
- package/dist/plugins/prefer-while-true.js.map +1 -0
- package/dist/plugins/require-multiline-arrow-braces.d.ts +30 -0
- package/dist/plugins/require-multiline-arrow-braces.d.ts.map +1 -0
- package/dist/plugins/require-multiline-arrow-braces.js +51 -0
- package/dist/plugins/require-multiline-arrow-braces.js.map +1 -0
- package/dist/plugins/rule-context.d.ts +11 -0
- package/dist/plugins/rule-context.d.ts.map +1 -1
- package/dist/plugins/stylistic.d.ts +3 -0
- package/dist/plugins/stylistic.d.ts.map +1 -0
- package/dist/plugins/stylistic.js +3 -0
- package/dist/plugins/stylistic.js.map +1 -0
- package/dist/plugins/zod.d.ts +11 -0
- package/dist/plugins/zod.d.ts.map +1 -0
- package/dist/plugins/zod.js +10 -0
- package/dist/plugins/zod.js.map +1 -0
- package/package.json +18 -5
- package/swift/SwiftLintChecks/Package.resolved +15 -0
- package/swift/SwiftLintChecks/Package.swift +22 -0
- package/swift/SwiftLintChecks/Sources/SwiftLintChecks/LintViolation.swift +32 -0
- package/swift/SwiftLintChecks/Sources/SwiftLintChecks/MultilineChainSpacingVisitor.swift +35 -0
- package/swift/SwiftLintChecks/Sources/SwiftLintChecks/SingleTryPerDoCatchVisitor.swift +34 -0
- package/swift/SwiftLintChecks/Sources/SwiftLintChecks/SwiftLint.swift +67 -0
- package/swift/SwiftLintChecks/Sources/SwiftLintChecks/SwiftLintChecks.swift +12 -0
- package/swift/SwiftLintChecks/Sources/SwiftLintChecks/SwiftLintCommand.swift +47 -0
- package/swift/SwiftLintChecks/Sources/SwiftLintChecks/ViewBodyDeclarationVisitor.swift +36 -0
- package/swift/SwiftLintChecks/Tests/SwiftLintChecksTests/MemberSpacingTests.swift +171 -0
- package/swift/SwiftLintChecks/Tests/SwiftLintChecksTests/MultilineChainSpacingTests.swift +68 -0
- package/swift/SwiftLintChecks/Tests/SwiftLintChecksTests/SingleTryPerDoCatchTests.swift +290 -0
- package/swift/SwiftLintChecks/Tests/SwiftLintChecksTests/SwiftLintCommandTests.swift +143 -0
- package/swift/SwiftLintChecks/Tests/SwiftLintChecksTests/ViewBodyDeclarationTests.swift +129 -0
package/README.md
CHANGED
|
@@ -1,25 +1,51 @@
|
|
|
1
1
|
# @kamaal111/kamaal-quality-config
|
|
2
2
|
|
|
3
|
-
Kamaal Farah's shared quality configs for [oxlint and oxfmt](https://oxc.rs) and Swift
|
|
3
|
+
Kamaal Farah's shared quality configs for [oxlint and oxfmt](https://oxc.rs), Swift format, and custom Swift lint checks.
|
|
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
|
|
7
7
|
rules from oxlint's built-in `typescript`, `unicorn`, `oxc`, and `vitest` plugins and from
|
|
8
|
-
`eslint-plugin-import` (via oxlint's `jsPlugins`), plus selected rules from `@stylistic/eslint-plugin` and
|
|
8
|
+
`eslint-plugin-import` (via oxlint's `jsPlugins`), plus selected rules from `@stylistic/eslint-plugin` and six hand-written local rules:
|
|
9
9
|
|
|
10
10
|
- `kamaal-imports/no-all-inline-type-imports` — forbids `import { type A, type B } from 'x'` in favor
|
|
11
11
|
of a top-level `import type { A, B } from 'x'`.
|
|
12
12
|
- `kamaal-ternary/no-nullish-check-first-ternary` — forbids ternaries that check for a nullish value
|
|
13
13
|
first (e.g. `x == null ? undefined : x.trim()`), requiring the value-producing branch first instead
|
|
14
14
|
(`x != null ? x.trim() : undefined`).
|
|
15
|
+
- `kamaal-arrows/require-multiline-arrow-braces` — requires braces for multiline expression bodies,
|
|
16
|
+
except direct object-literal returns.
|
|
17
|
+
- `kamaal-zod/prefer-nonempty` — requires `.nonempty()` instead of `.min(1)` on verified
|
|
18
|
+
inline Zod 4 string, array, and set schemas, with autofix preserving custom errors and comments.
|
|
19
|
+
Supports imports and aliases from `zod` and `zod/v4`; the root import is assumed to be Zod 4.
|
|
20
|
+
Numeric schemas, schema variables, unsupported intermediate methods, and explicit Zod 3/Mini/Core
|
|
21
|
+
imports are left unchanged. Known chains such as `z.string().trim().min(1)` are supported.
|
|
15
22
|
- `kamaal-zod/prefer-nullish` — requires `.nullish()` instead of consecutive `.nullable()` and
|
|
16
23
|
`.optional()` calls in either order. This syntax-based rule applies to any receiver and has no autofix.
|
|
24
|
+
- `kamaal-loops/prefer-while-true` — requires `while (true)` instead of `for (;;)` when all three
|
|
25
|
+
header parts are empty. Autofix replaces comment-free headers; headers containing comments are
|
|
26
|
+
reported without a fix. Other `for` loops are unchanged.
|
|
27
|
+
|
|
28
|
+
The Zod plugin is exported at `@kamaal111/kamaal-quality-config/plugins/zod`.
|
|
17
29
|
|
|
18
30
|
The shared defaults also require blank lines around class methods and constructors (with autofix),
|
|
19
31
|
allow consecutive fields to stay grouped, require default imports for `node:` modules, and prohibit
|
|
20
32
|
`Object.assign` in favor of explicit typed assignments or object spread. Vitest globals and
|
|
21
33
|
project-specific server restrictions remain consumer choices.
|
|
22
34
|
|
|
35
|
+
Multiline arrow bodies require braces and an explicit return, with autofix through
|
|
36
|
+
`kamaal-arrows/require-multiline-arrow-braces`. Single-line expression bodies, wrapped parameters,
|
|
37
|
+
and direct object-literal returns (including multiline objects) remain allowed:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
const double = x => x * 2;
|
|
41
|
+
const makeUser = () => ({
|
|
42
|
+
name: 'Kamaal',
|
|
43
|
+
});
|
|
44
|
+
const readAnswer = () => {
|
|
45
|
+
return fetchAnswer('Kamaal');
|
|
46
|
+
};
|
|
47
|
+
```
|
|
48
|
+
|
|
23
49
|
More rule sources will be folded in over time.
|
|
24
50
|
|
|
25
51
|
## Table of contents
|
|
@@ -29,6 +55,7 @@ More rule sources will be folded in over time.
|
|
|
29
55
|
- [oxlint](#oxlint)
|
|
30
56
|
- [oxfmt](#oxfmt)
|
|
31
57
|
- [Swift format](#swift-format)
|
|
58
|
+
- [Swift lint](#swift-lint)
|
|
32
59
|
- [Development](#development)
|
|
33
60
|
|
|
34
61
|
## Install
|
|
@@ -52,6 +79,21 @@ Extend it from your `.oxlintrc.json`:
|
|
|
52
79
|
}
|
|
53
80
|
```
|
|
54
81
|
|
|
82
|
+
The shared config owns its external JavaScript plugins, including
|
|
83
|
+
`@stylistic/eslint-plugin`, `eslint-plugin-import`, and
|
|
84
|
+
`@kamaal111/oxlint-plugin-anti-slop`. Consumers do not need to declare those plugins
|
|
85
|
+
directly or repeat their rule settings. Install `oxlint` and `oxlint-tsgolint`
|
|
86
|
+
as development tools if your project does not already provide them:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
pnpm add -D oxlint oxlint-tsgolint
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Plugin entry points are exported by this package so both JSON and TypeScript
|
|
93
|
+
configs resolve plugins through the shared package's own dependencies. This
|
|
94
|
+
resolution fix requires a release after v0.8.0; v0.8.0 and earlier can require
|
|
95
|
+
plugins to be exposed at the consumer root under isolated dependency layouts.
|
|
96
|
+
|
|
55
97
|
The package ships a plain, statically-generated `dist/oxlintrc.json` — no `oxlint.config.ts` or
|
|
56
98
|
package-import support is needed, since `.oxlintrc.json`'s `extends` field accepts plain file paths.
|
|
57
99
|
|
|
@@ -139,6 +181,101 @@ For programmatic consumption, import the same plain object from
|
|
|
139
181
|
`@kamaal111/kamaal-quality-config/swift-format` or use `kamaalQuality.swiftFormat` from the root
|
|
140
182
|
namespace. The generated JSON is also exported at the `./swift-format.json` package subpath.
|
|
141
183
|
|
|
184
|
+
### Swift lint
|
|
185
|
+
|
|
186
|
+
The package provides `kqc swift-lint` for syntax-based Swift checks. Install a Swift 6.4 or newer
|
|
187
|
+
toolchain separately, then run from your project root:
|
|
188
|
+
|
|
189
|
+
```sh
|
|
190
|
+
pnpm exec kqc swift-lint
|
|
191
|
+
pnpm exec kqc swift-lint Sources Tests
|
|
192
|
+
pnpm exec kqc swift-lint "Source Files/Example.swift"
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
In package scripts, use `"lint:swift": "kqc swift-lint Sources Tests"`. With the package installed
|
|
196
|
+
globally, invoke `kqc swift-lint` directly.
|
|
197
|
+
|
|
198
|
+
Without paths, the command checks the current directory recursively. Explicit file and directory
|
|
199
|
+
paths are relative to your working directory. Recursive scanning skips hidden paths (including
|
|
200
|
+
`.build`), `node_modules`, symlinks, and non-Swift files. Use `--` before paths starting with a dash.
|
|
201
|
+
|
|
202
|
+
All four checks are enabled:
|
|
203
|
+
|
|
204
|
+
- `member_spacing`: separate methods and initializers from adjacent members with a blank line.
|
|
205
|
+
- `multiline_chain_spacing`: put each chained call on its own line in multiline expressions.
|
|
206
|
+
- `view_body_declarations`: move local `let` and `var` declarations out of SwiftUI
|
|
207
|
+
`var body: some View`, including nested builder closures. Conditional bindings remain allowed.
|
|
208
|
+
- `single_try_per_do_catch`: allow at most one plain `try` expression per `do/catch` body.
|
|
209
|
+
Count across branches and loops; `try?` and `try!` do not count. Nested `do/catch` bodies
|
|
210
|
+
are checked independently, while catchless `do` blocks contribute to the enclosing count.
|
|
211
|
+
Closures, local functions, and nested types have separate scopes; their own `do/catch` blocks
|
|
212
|
+
are still checked. A `try` in a nested catch contributes to an enclosing handler, if present.
|
|
213
|
+
All conditional-compilation branches count, including inactive branches.
|
|
214
|
+
|
|
215
|
+
For example, this shares error handling between two throwing operations and is rejected at the second `try`:
|
|
216
|
+
|
|
217
|
+
```swift
|
|
218
|
+
do {
|
|
219
|
+
try load()
|
|
220
|
+
try save()
|
|
221
|
+
} catch {
|
|
222
|
+
reportError(error)
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Give each operation its own error handling, or extract a helper that handles its error. Decide whether
|
|
227
|
+
each failure should recover, propagate, or gain more context. For operations without a returned value:
|
|
228
|
+
|
|
229
|
+
```swift
|
|
230
|
+
do {
|
|
231
|
+
try load()
|
|
232
|
+
} catch {
|
|
233
|
+
reportLoad(error)
|
|
234
|
+
return
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
do {
|
|
238
|
+
try save()
|
|
239
|
+
} catch {
|
|
240
|
+
reportSave(error)
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Here the early return prevents saving after loading fails. Choose continuation based on the operation.
|
|
245
|
+
|
|
246
|
+
For an operation that returns a value, declare a typed `let` before the `do` and assign it inside:
|
|
247
|
+
|
|
248
|
+
```swift
|
|
249
|
+
let result: SaveResult
|
|
250
|
+
do {
|
|
251
|
+
result = try save()
|
|
252
|
+
} catch {
|
|
253
|
+
reportError(error)
|
|
254
|
+
return
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
display(result)
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
If the value is used afterward, the catch must exit, rethrow the error, or assign a meaningful fallback
|
|
261
|
+
so the value is initialized on every continuing path. Reporting the error alone is sufficient only
|
|
262
|
+
when no subsequent path reads the uninitialized value. `SaveResult` is the operation's return type;
|
|
263
|
+
it is not Swift's generic `Result<Success, Failure>`.
|
|
264
|
+
|
|
265
|
+
Diagnostics explain these alternatives. The rule has no autofix because choosing error handling
|
|
266
|
+
requires judgment. It counts explicit plain `try` expressions rather than throwing calls: one
|
|
267
|
+
`try` covering multiple calls counts as one, but combining calls merely to silence the rule
|
|
268
|
+
defeats its purpose.
|
|
269
|
+
|
|
270
|
+
The CLI runs `swift run --package-path` against the bundled `SwiftLintChecks` package and does not
|
|
271
|
+
modify source files. Diagnostics include file, line, column, and rule identifier. Exit codes are
|
|
272
|
+
`0` for clean sources, `1` for violations or unreadable/invalid sources, `2` for usage errors,
|
|
273
|
+
and `127` when Swift is missing. Swift build failures retain their exit status.
|
|
274
|
+
|
|
275
|
+
The first invocation may download SwiftSyntax and compile the checker. SwiftPM caches build
|
|
276
|
+
artifacts in the installed Swift package's `.build` directory, so that directory must be writable.
|
|
277
|
+
Subsequent invocations reuse the build. Run `kqc swift-lint --help` for usage.
|
|
278
|
+
|
|
142
279
|
## Development
|
|
143
280
|
|
|
144
281
|
Use the devcontainer with Node.js 26 (as specified in `.nvmrc`) and pnpm 12.14.0.
|
|
@@ -153,8 +290,9 @@ pnpm test
|
|
|
153
290
|
Vitest also checks the packed package. To select a consumer runtime, run
|
|
154
291
|
`CONSUMER_NODE=/absolute/path/to/node pnpm test src/packed-consumer.test.ts` inside the devcontainer.
|
|
155
292
|
CI selects the latest Node.js 22 release while building and running Vitest on Node.js 26.
|
|
156
|
-
The
|
|
157
|
-
|
|
293
|
+
The fixture installs only the packed shared package and Oxlint tooling. It checks
|
|
294
|
+
both JSON and TypeScript configs without declaring external plugin dependencies
|
|
295
|
+
at the consumer root, so package-owned plugin resolution stays covered.
|
|
158
296
|
|
|
159
297
|
The dependency-free example package in `fixtures/swift-format` verifies the installed Swift config.
|
|
160
298
|
CI's Swift consumer job supplies Swift 6.4.1 and runs `pnpm test:swift-format`: it builds the package,
|
|
@@ -162,3 +300,8 @@ lints it using the packed npm artifact, rejects two-space indentation, and verif
|
|
|
162
300
|
and idempotence. To run that command locally, Swift must be available inside the devcontainer.
|
|
163
301
|
The dedicated command fails if Swift is missing; ordinary `pnpm test` skips only the Swift toolchain
|
|
164
302
|
cases while still checking the packed configuration and exports, including on Node.js 22.
|
|
303
|
+
|
|
304
|
+
Run `pnpm test:swift-lint` with Swift 6.4 or newer available inside the devcontainer to run the
|
|
305
|
+
bundled checker regression suites and packed CLI integration tests. CI supplies Swift 6.4.1.
|
|
306
|
+
The dedicated command fails if Swift is missing; ordinary tests still verify CLI dispatch,
|
|
307
|
+
packaging, and consumer compatibility without requiring Swift.
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import childProcess from 'node:child_process';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import url from 'node:url';
|
|
6
|
+
import util from 'node:util';
|
|
7
|
+
const usage = `Usage: kqc swift-lint [paths...]
|
|
8
|
+
|
|
9
|
+
Check Swift sources recursively (default: current directory).
|
|
10
|
+
Requires Swift 6.4 or newer. Use -- before paths beginning with a dash.
|
|
11
|
+
`;
|
|
12
|
+
function runSwift(paths) {
|
|
13
|
+
const packageDirectory = url.fileURLToPath(new URL('../swift/SwiftLintChecks', import.meta.url));
|
|
14
|
+
const child = childProcess.spawn('swift', ['run', '--package-path', packageDirectory, 'kqc-swift-lint', ...paths.map(target => path.resolve(target))], { stdio: 'inherit' });
|
|
15
|
+
const interrupt = () => {
|
|
16
|
+
child.kill('SIGINT');
|
|
17
|
+
};
|
|
18
|
+
const terminate = () => {
|
|
19
|
+
child.kill('SIGTERM');
|
|
20
|
+
};
|
|
21
|
+
process.on('SIGINT', interrupt);
|
|
22
|
+
process.on('SIGTERM', terminate);
|
|
23
|
+
child.once('error', error => {
|
|
24
|
+
if ('code' in error && error.code === 'ENOENT') {
|
|
25
|
+
console.error('kqc: Swift 6.4 or newer is required; install it and ensure swift is on PATH.');
|
|
26
|
+
process.exitCode = 127;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
console.error(`kqc: Cannot launch Swift: ${error.message}`);
|
|
30
|
+
process.exitCode = 1;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
child.once('close', (code, signal) => {
|
|
34
|
+
process.off('SIGINT', interrupt);
|
|
35
|
+
process.off('SIGTERM', terminate);
|
|
36
|
+
if (signal) {
|
|
37
|
+
process.kill(process.pid, signal);
|
|
38
|
+
process.exitCode = 128 + os.constants.signals[signal];
|
|
39
|
+
}
|
|
40
|
+
else if (code !== null && code >= 0) {
|
|
41
|
+
process.exitCode = code;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function parseArguments() {
|
|
46
|
+
try {
|
|
47
|
+
return util.parseArgs({
|
|
48
|
+
options: { help: { type: 'boolean' } },
|
|
49
|
+
allowPositionals: true,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
console.error(usage);
|
|
54
|
+
process.exitCode = 2;
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const parsed = parseArguments();
|
|
59
|
+
if (parsed !== undefined) {
|
|
60
|
+
const [command, ...paths] = parsed.positionals;
|
|
61
|
+
if (parsed.values.help && paths.length === 0 && (command === undefined || command === 'swift-lint')) {
|
|
62
|
+
console.log(usage);
|
|
63
|
+
}
|
|
64
|
+
else if (command !== 'swift-lint' || parsed.values.help) {
|
|
65
|
+
console.error(usage);
|
|
66
|
+
process.exitCode = 2;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
runSwift(paths.length === 0 ? ['.'] : paths);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,KAAK,GAAG;;;;CAIb,CAAC;AAEF,SAAS,QAAQ,CAAC,KAAwB;IACxC,MAAM,gBAAgB,GAAG,GAAG,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC,0BAA0B,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAEjG,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAC9B,OAAO,EACP,CAAC,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAC3G,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;IAEF,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,KAAK,CAAC,IAAI,C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src/oxlint.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"oxlint.d.ts","sourceRoot":"","sources":["../src/oxlint.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAqJuB,KAAK;gBAAS,eAAe"}
|
package/dist/oxlint.js
CHANGED
|
@@ -2,24 +2,36 @@ import antiSlopPlugin from '@kamaal111/oxlint-plugin-anti-slop';
|
|
|
2
2
|
import { defineConfig } from 'oxlint';
|
|
3
3
|
import consistentInlineTypeImportsPlugin from './plugins/consistent-inline-type-imports.js';
|
|
4
4
|
import noNullishCheckFirstTernaryPlugin from './plugins/no-nullish-check-first-ternary.js';
|
|
5
|
-
import
|
|
5
|
+
import preferWhileTruePlugin from './plugins/prefer-while-true.js';
|
|
6
|
+
import requireMultilineArrowBracesPlugin from './plugins/require-multiline-arrow-braces.js';
|
|
7
|
+
import zodPlugin from './plugins/zod.js';
|
|
6
8
|
function pluginRules(namespace, ruleNames) {
|
|
7
9
|
return Object.fromEntries(ruleNames.map(ruleName => [`${namespace}/${ruleName}`, 'error']));
|
|
8
10
|
}
|
|
9
11
|
const antiSlopRules = pluginRules('anti-slop', Object.keys(antiSlopPlugin.rules));
|
|
10
12
|
const consistentInlineTypeImportsRules = pluginRules(consistentInlineTypeImportsPlugin.meta.name, Object.keys(consistentInlineTypeImportsPlugin.rules));
|
|
11
13
|
const noNullishCheckFirstTernaryRules = pluginRules(noNullishCheckFirstTernaryPlugin.meta.name, Object.keys(noNullishCheckFirstTernaryPlugin.rules));
|
|
12
|
-
const
|
|
14
|
+
const zodRules = pluginRules(zodPlugin.meta.name, Object.keys(zodPlugin.rules));
|
|
15
|
+
const preferWhileTrueRules = pluginRules(preferWhileTruePlugin.meta.name, Object.keys(preferWhileTruePlugin.rules));
|
|
16
|
+
const requireMultilineArrowBracesRules = pluginRules(requireMultilineArrowBracesPlugin.meta.name, Object.keys(requireMultilineArrowBracesPlugin.rules));
|
|
13
17
|
export default defineConfig({
|
|
14
18
|
plugins: ['typescript', 'unicorn', 'oxc', 'vitest'],
|
|
15
19
|
jsPlugins: [
|
|
16
|
-
'@stylistic/
|
|
20
|
+
{ name: '@stylistic', specifier: '@kamaal111/kamaal-quality-config/plugins/stylistic' },
|
|
17
21
|
{
|
|
18
|
-
name:
|
|
19
|
-
specifier: '@kamaal111/kamaal-quality-config/plugins/
|
|
22
|
+
name: requireMultilineArrowBracesPlugin.meta.name,
|
|
23
|
+
specifier: '@kamaal111/kamaal-quality-config/plugins/require-multiline-arrow-braces',
|
|
20
24
|
},
|
|
21
|
-
{
|
|
22
|
-
|
|
25
|
+
{
|
|
26
|
+
name: preferWhileTruePlugin.meta.name,
|
|
27
|
+
specifier: '@kamaal111/kamaal-quality-config/plugins/prefer-while-true',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: zodPlugin.meta.name,
|
|
31
|
+
specifier: '@kamaal111/kamaal-quality-config/plugins/zod',
|
|
32
|
+
},
|
|
33
|
+
{ name: 'anti-slop', specifier: '@kamaal111/kamaal-quality-config/plugins/anti-slop' },
|
|
34
|
+
{ name: 'import-js', specifier: '@kamaal111/kamaal-quality-config/plugins/import' },
|
|
23
35
|
{
|
|
24
36
|
name: consistentInlineTypeImportsPlugin.meta.name,
|
|
25
37
|
specifier: '@kamaal111/kamaal-quality-config/plugins/consistent-inline-type-imports',
|
|
@@ -33,7 +45,9 @@ export default defineConfig({
|
|
|
33
45
|
categories: { correctness: 'error' },
|
|
34
46
|
rules: {
|
|
35
47
|
...antiSlopRules,
|
|
36
|
-
...
|
|
48
|
+
...zodRules,
|
|
49
|
+
...preferWhileTrueRules,
|
|
50
|
+
...requireMultilineArrowBracesRules,
|
|
37
51
|
'@stylistic/lines-between-class-members': [
|
|
38
52
|
'error',
|
|
39
53
|
{
|
package/dist/oxlint.js.map
CHANGED
|
@@ -1 +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,OAAO,iCAAiC,MAAM,6CAA6C,CAAC;AAC5F,OAAO,gCAAgC,MAAM,6CAA6C,CAAC;AAC3F,OAAO,
|
|
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,OAAO,iCAAiC,MAAM,6CAA6C,CAAC;AAC5F,OAAO,gCAAgC,MAAM,6CAA6C,CAAC;AAC3F,OAAO,qBAAqB,MAAM,gCAAgC,CAAC;AACnE,OAAO,iCAAiC,MAAM,6CAA6C,CAAC;AAC5F,OAAO,SAAS,MAAM,kBAAkB,CAAC;AAEzC,SAAS,WAAW,CAAC,SAAiB,EAAE,SAAmB;IACzD,OAAO,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,IAAI,QAAQ,EAAE,EAAE,OAAO,CAAU,CAAC,CAAC,CAAC;AACvG,CAAC;AAED,MAAM,aAAa,GAAG,WAAW,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;AAElF,MAAM,gCAAgC,GAAG,WAAW,CAClD,iCAAiC,CAAC,IAAI,CAAC,IAAI,EAC3C,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,KAAK,CAAC,CACrD,CAAC;AAEF,MAAM,+BAA+B,GAAG,WAAW,CACjD,g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,IAAI,EAAE;CACvB,CAAC,CAAC"}
|
package/dist/oxlintrc.json
CHANGED
|
@@ -6,18 +6,29 @@
|
|
|
6
6
|
"vitest"
|
|
7
7
|
],
|
|
8
8
|
"jsPlugins": [
|
|
9
|
-
|
|
9
|
+
{
|
|
10
|
+
"name": "@stylistic",
|
|
11
|
+
"specifier": "@kamaal111/kamaal-quality-config/plugins/stylistic"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "kamaal-arrows",
|
|
15
|
+
"specifier": "@kamaal111/kamaal-quality-config/plugins/require-multiline-arrow-braces"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "kamaal-loops",
|
|
19
|
+
"specifier": "@kamaal111/kamaal-quality-config/plugins/prefer-while-true"
|
|
20
|
+
},
|
|
10
21
|
{
|
|
11
22
|
"name": "kamaal-zod",
|
|
12
|
-
"specifier": "@kamaal111/kamaal-quality-config/plugins/
|
|
23
|
+
"specifier": "@kamaal111/kamaal-quality-config/plugins/zod"
|
|
13
24
|
},
|
|
14
25
|
{
|
|
15
26
|
"name": "anti-slop",
|
|
16
|
-
"specifier": "@kamaal111/
|
|
27
|
+
"specifier": "@kamaal111/kamaal-quality-config/plugins/anti-slop"
|
|
17
28
|
},
|
|
18
29
|
{
|
|
19
30
|
"name": "import-js",
|
|
20
|
-
"specifier": "
|
|
31
|
+
"specifier": "@kamaal111/kamaal-quality-config/plugins/import"
|
|
21
32
|
},
|
|
22
33
|
{
|
|
23
34
|
"name": "kamaal-imports",
|
|
@@ -58,7 +69,10 @@
|
|
|
58
69
|
"anti-slop/no-widen-then-assert": "error",
|
|
59
70
|
"anti-slop/require-readable-spacing": "error",
|
|
60
71
|
"anti-slop/require-safety-comment-for-type-assertion": "error",
|
|
72
|
+
"kamaal-zod/prefer-nonempty": "error",
|
|
61
73
|
"kamaal-zod/prefer-nullish": "error",
|
|
74
|
+
"kamaal-loops/prefer-while-true": "error",
|
|
75
|
+
"kamaal-arrows/require-multiline-arrow-braces": "error",
|
|
62
76
|
"@stylistic/lines-between-class-members": [
|
|
63
77
|
"error",
|
|
64
78
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anti-slop.d.ts","sourceRoot":"","sources":["../../src/plugins/anti-slop.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oCAAoC,CAAC;eAEzC,MAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anti-slop.js","sourceRoot":"","sources":["../../src/plugins/anti-slop.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oCAAoC,CAAC;AAExD,eAAe,MAAM,CAAC"}
|
|
@@ -31,9 +31,11 @@ export default {
|
|
|
31
31
|
node,
|
|
32
32
|
message: 'Use a top-level `import type` instead of marking every named specifier with an inline `type` modifier.',
|
|
33
33
|
fix(fixer) {
|
|
34
|
-
const names = namedSpecifiers.map(specifier =>
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const names = namedSpecifiers.map(specifier => {
|
|
35
|
+
return specifier.imported.name === specifier.local.name
|
|
36
|
+
? specifier.imported.name
|
|
37
|
+
: `${specifier.imported.name} as ${specifier.local.name}`;
|
|
38
|
+
});
|
|
37
39
|
const sourceText = context.sourceCode.getText(node.source);
|
|
38
40
|
return fixer.replaceText(node, `import type { ${names.join(', ')} } from ${sourceText};`);
|
|
39
41
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consistent-inline-type-imports.js","sourceRoot":"","sources":["../../src/plugins/consistent-inline-type-imports.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2FAA2F;AAC3F,iEAAiE;AAkBjE,SAAS,iBAAiB,CAAC,SAAsD;IAC/E,OAAO,SAAS,CAAC,IAAI,KAAK,iBAAiB,CAAC;AAC9C,CAAC;AAED,eAAe;IACb,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;IAChC,KAAK,EAAE;QACL,4BAA4B,EAAE;YAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;YACzB,MAAM,CAAC,OAAoB;gBACzB,OAAO;oBACL,iBAAiB,CAAC,IAA2B;wBAC3C,IAAI,IAAI,CAAC,UAAU,KAAK,MAAM,EAAE,CAAC;4BAC/B,OAAO;wBACT,CAAC;wBAED,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;wBAElE,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;4BACjC,OAAO;wBACT,CAAC;wBAED,MAAM,qBAAqB,GAAG,eAAe,CAAC,MAAM,KAAK,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;wBAEhF,IAAI,qBAAqB,EAAE,CAAC;4BAC1B,OAAO;wBACT,CAAC;wBAED,MAAM,aAAa,GAAG,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,UAAU,KAAK,MAAM,CAAC,CAAC;wBAE1F,IAAI,CAAC,aAAa,EAAE,CAAC;4BACnB,OAAO;wBACT,CAAC;wBAED,OAAO,CAAC,MAAM,CAAC;4BACb,IAAI;4BACJ,OAAO,EACL,wGAAwG;4BAC1G,GAAG,CAAC,KAAK;gCACP,MAAM,KAAK,GAAG,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"consistent-inline-type-imports.js","sourceRoot":"","sources":["../../src/plugins/consistent-inline-type-imports.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2FAA2F;AAC3F,iEAAiE;AAkBjE,SAAS,iBAAiB,CAAC,SAAsD;IAC/E,OAAO,SAAS,CAAC,IAAI,KAAK,iBAAiB,CAAC;AAC9C,CAAC;AAED,eAAe;IACb,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;IAChC,KAAK,EAAE;QACL,4BAA4B,EAAE;YAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,E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I,CAAC,IAAI,CAAC,WAAW,UAAU,GAAG,CAAC,CAAC;4BAC5F,CAAC;yBACF,CAAC,CAAC;oBACL,CAAC;iBACF,CAAC;YACJ,CAAC;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/plugins/import.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,sBAAsB,CAAC;eAE3B,MAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../src/plugins/import.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAE1C,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefer-nonempty.d.ts","sourceRoot":"","sources":["../../src/plugins/prefer-nonempty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,IAAI,EAAS,MAAM,iBAAiB,CAAC;AA+HpE,QAAA,MAAM,cAAc,EAAE,IAoDrB,CAAC;eAEa,cAAc"}
|