@totto2727/oxlint 0.0.0-stage → 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 totto2727
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,86 @@
1
- # Temporary Holding Version
1
+ # @totto2727/oxlint
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
+ [Oxlint](https://oxc.rs/docs/guide/usage/linter.html) rules and presets for TypeScript and Effect.
4
+
5
+ ## Usage
6
+
7
+ Check your source files with the configured preset:
8
+
9
+ ```sh
10
+ npx oxlint --config .oxlintrc.mjs src
11
+ ```
12
+
13
+ Replace `src` with your source directory.
14
+ The preset reports policy violations, such as `rules/no-let` for a `let` declaration.
15
+ Tests use the same rules as application files.
16
+
17
+ ## Key features
18
+
19
+ - Separate TypeScript and Effect presets, plus a combined preset.
20
+ - Required import extensions and configurable TypeScript or JavaScript output extensions.
21
+ - Shared native Ultracite settings and incorporated Effect rule implementations.
22
+ - ESM exports with TypeScript declarations.
23
+
24
+ ## Prerequisites
25
+
26
+ - Node.js 24 or later.
27
+ - An ESM configuration.
28
+
29
+ ## Setup
30
+
31
+ Install the plugin and Oxlint as development dependencies:
32
+
33
+ ```sh
34
+ npm install --save-dev @totto2727/oxlint oxlint
35
+ ```
36
+
37
+ Enable both rule groups in `.oxlintrc.mjs`:
38
+
39
+ ```js
40
+ import preset from '@totto2727/oxlint/preset'
41
+ import { defineConfig } from 'oxlint'
42
+
43
+ export default defineConfig({ extends: [preset] })
44
+ ```
45
+
46
+ Use `/typescript` or `/effect` instead of `/preset` to select one group.
47
+ See [Getting started](https://oxlint.totto2727.dev/en/guide/getting-started) for individual-rule configuration.
48
+
49
+ ## API
50
+
51
+ The default package export is the plugin: 29 local rules and five Effect rule implementations.
52
+ All plugin rule IDs use the `rules/` prefix.
53
+ The `/typescript`, `/effect` and `/preset` exports are Oxlint configurations.
54
+ Named exports `typescriptRuleNames`, `effectRuleNames` and `compatibilityRuleNames` list the rules in each group.
55
+ The four compatibility rules are available but not enabled by presets.
56
+
57
+ - [TypeScript preset](https://oxlint.totto2727.dev/en/presets/typescript)
58
+ - [Effect preset](https://oxlint.totto2727.dev/en/presets/effect), including external rules and disabled-rule reasons
59
+ - [Local rules](https://oxlint.totto2727.dev/en)
60
+
61
+ ### Import extensions
62
+
63
+ `require-import-extension` reports missing extensions without adding a guessed extension.
64
+ `consistent-import-extension` converts known extensions and keeps ESM and CommonJS module families separate.
65
+ The default mode is `ts`.
66
+
67
+ | Input | `ts` mode | `js` mode |
68
+ | -------------- | --------- | --------- |
69
+ | `.js`, `.ts` | `.ts` | `.js` |
70
+ | `.jsx`, `.tsx` | `.tsx` | `.js` |
71
+ | `.mjs`, `.mts` | `.mts` | `.mjs` |
72
+ | `.cjs`, `.cts` | `.cts` | `.cjs` |
73
+
74
+ Set `'rules/consistent-import-extension': ['error', { mode: 'js' }]` in your configuration's `rules` object for JavaScript output.
75
+ These rules check relative paths and slash-containing `#` paths, such as `#@/utils`, in imports, re-exports and literal dynamic imports.
76
+ They ignore slashless aliases such as `#utils`.
77
+ They preserve query strings and fragments and ignore bare package imports and non-code assets.
78
+
79
+ ## Development
80
+
81
+ For repository maintenance instructions, see [AGENTS.md](./AGENTS.md).
82
+
83
+ ## License
84
+
85
+ [MIT](./LICENSE).
86
+ See [third-party notices](./THIRD-PARTY-NOTICES.md) for incorporated source licenses.
@@ -0,0 +1,48 @@
1
+ # Third-party notices
2
+
3
+ ## Effect Oxlint rules
4
+
5
+ This package contains code derived from Effect-TS/effect, packages/tools/oxc/src/oxlint/rules, at revision b1d200c40a1dad69def51ebdbf0a1a612a12b8ac.
6
+ Source: https://github.com/Effect-TS/effect/tree/b1d200c40a1dad69def51ebdbf0a1a612a12b8ac/packages/tools/oxc/src/oxlint/rules
7
+ Local files: src/upstream/effect/*.ts and their bundled output.
8
+ Local acceptance cases also adapt examples from packages/tools/oxc/test at that revision.
9
+
10
+ MIT License
11
+
12
+ Copyright (c) 2023 Effectful Technologies Inc
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
31
+
32
+ ## Ultracite native Oxlint configuration
33
+
34
+ The native core configuration and shared ignores are derived from Ultracite 7.12.3 at revision `48156546701badf2c6e60f25cf1e8511f7dc44c7`.
35
+ Local files: `src/upstream/ultracite/core.ts`, `src/upstream/ultracite/ignores.ts`, and their bundled output.
36
+ Source: <https://github.com/haydenbleasel/ultracite/blob/48156546701badf2c6e60f25cf1e8511f7dc44c7/packages/cli/config/oxlint/core/index.mjs>.
37
+ License source: <https://github.com/haydenbleasel/ultracite/blob/48156546701badf2c6e60f25cf1e8511f7dc44c7/license.md>.
38
+ The original MIT notice follows verbatim.
39
+
40
+ ```text
41
+ Copyright (c) 2022 — Present Hayden Bleasel
42
+
43
+ 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:
44
+
45
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
46
+
47
+ 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.
48
+ ```
@@ -0,0 +1,4 @@
1
+ //#region src/effect.d.ts
2
+ declare const _default: import("oxlint").OxlintConfig;
3
+ //#endregion
4
+ export { _default as default };
package/dist/effect.js ADDED
@@ -0,0 +1,6 @@
1
+ import { n as effectRuleNames } from "./rule-groups-jUlABfyW.js";
2
+ import { t as createPreset } from "./preset-builder-Qxb4CeX1.js";
3
+ //#region src/effect.ts
4
+ var effect_default = createPreset(effectRuleNames);
5
+ //#endregion
6
+ export { effect_default as default };
@@ -0,0 +1,49 @@
1
+ //#region src/rule-groups.d.ts
2
+ export declare const typescriptRuleNames: readonly ['consistent-import-extension', 'no-eslint-disable-comments', 'no-jsx-script-tag', 'no-let', 'no-redundant-alias', 'no-string-style', 'require-disable-reason', 'require-import-extension'];
3
+ export declare const effectRuleNames: readonly ['force-array-empty', 'force-iterable-empty', 'force-predicate', 'force-string-empty', 'no-effect-runtime-run', 'no-bigint-literals', 'no-import-from-barrel-package', 'no-opaque-instance-fields', 'no-unused-internal', 'no-error-cause-option', 'no-error-property-access', 'no-fetch', 'no-instanceof-error', 'no-js-date', 'no-node-imports', 'no-option-tag-comparison', 'no-raw-hono-create-middleware', 'no-sync-decode', 'no-type-predicate', 'prefer-is-nullish', 'prefer-non-unknown-decode', 'require-top-level-decoder'];
4
+ export declare const compatibilityRuleNames: readonly ['force-ts-extension', 'no-effect-import-as', 'no-effect-subpath-import', 'no-js-extension-imports'];
5
+ //#endregion
6
+ //#region src/index.d.ts
7
+ declare const plugin: {
8
+ meta: {
9
+ name: string;
10
+ };
11
+ rules: {
12
+ 'no-bigint-literals': import("@oxlint/plugins").CreateRule;
13
+ 'no-import-from-barrel-package': import("@oxlint/plugins").CreateRule;
14
+ 'no-js-extension-imports': import("@oxlint/plugins").CreateRule;
15
+ 'no-opaque-instance-fields': import("@oxlint/plugins").CreateRule;
16
+ 'no-unused-internal': import("@oxlint/plugins").CreateRule;
17
+ 'consistent-import-extension': import("@oxlint/plugins").Rule;
18
+ 'require-import-extension': import("@oxlint/plugins").Rule;
19
+ 'force-array-empty': import("@oxlint/plugins").Rule;
20
+ 'force-iterable-empty': import("@oxlint/plugins").Rule;
21
+ 'force-predicate': import("@oxlint/plugins").Rule;
22
+ 'force-string-empty': import("@oxlint/plugins").Rule;
23
+ 'force-ts-extension': import("@oxlint/plugins").Rule;
24
+ 'no-effect-import-as': import("@oxlint/plugins").Rule;
25
+ 'no-effect-runtime-run': import("@oxlint/plugins").Rule;
26
+ 'no-effect-subpath-import': import("@oxlint/plugins").Rule;
27
+ 'no-error-cause-option': import("@oxlint/plugins").Rule;
28
+ 'no-error-property-access': import("@oxlint/plugins").Rule;
29
+ 'no-eslint-disable-comments': import("@oxlint/plugins").Rule;
30
+ 'no-fetch': import("@oxlint/plugins").Rule;
31
+ 'no-instanceof-error': import("@oxlint/plugins").Rule;
32
+ 'no-js-date': import("@oxlint/plugins").Rule;
33
+ 'no-jsx-script-tag': import("@oxlint/plugins").Rule;
34
+ 'no-let': import("@oxlint/plugins").Rule;
35
+ 'no-node-imports': import("@oxlint/plugins").Rule;
36
+ 'no-option-tag-comparison': import("@oxlint/plugins").Rule;
37
+ 'no-raw-hono-create-middleware': import("@oxlint/plugins").Rule;
38
+ 'no-redundant-alias': import("@oxlint/plugins").Rule;
39
+ 'no-string-style': import("@oxlint/plugins").Rule;
40
+ 'no-sync-decode': import("@oxlint/plugins").Rule;
41
+ 'no-type-predicate': import("@oxlint/plugins").Rule;
42
+ 'prefer-is-nullish': import("@oxlint/plugins").Rule;
43
+ 'prefer-non-unknown-decode': import("@oxlint/plugins").Rule;
44
+ 'require-disable-reason': import("@oxlint/plugins").Rule;
45
+ 'require-top-level-decoder': import("@oxlint/plugins").Rule;
46
+ };
47
+ };
48
+ //#endregion
49
+ export { plugin as default };