@kayahr/oxlint-config 1.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/.oxlintrc.json +87 -0
- package/LICENSE.md +21 -0
- package/README.md +52 -0
- package/package.json +32 -0
package/.oxlintrc.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"categories": {
|
|
4
|
+
"correctness": "warn",
|
|
5
|
+
"nursery": "warn",
|
|
6
|
+
"pedantic": "off",
|
|
7
|
+
"perf": "warn",
|
|
8
|
+
"restriction": "warn",
|
|
9
|
+
"style": "warn",
|
|
10
|
+
"suspicious": "warn"
|
|
11
|
+
},
|
|
12
|
+
"plugins": [
|
|
13
|
+
"eslint",
|
|
14
|
+
"import",
|
|
15
|
+
"jsdoc",
|
|
16
|
+
"jsx-a11y",
|
|
17
|
+
"node",
|
|
18
|
+
"oxc",
|
|
19
|
+
"promise",
|
|
20
|
+
"regex",
|
|
21
|
+
"typescript",
|
|
22
|
+
"unicorn"
|
|
23
|
+
],
|
|
24
|
+
"rules": {
|
|
25
|
+
"eslint/eqeqeq": [
|
|
26
|
+
"warn",
|
|
27
|
+
"always",
|
|
28
|
+
{
|
|
29
|
+
"null": "ignore"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"eslint/func-style": [
|
|
33
|
+
"warn",
|
|
34
|
+
"declaration",
|
|
35
|
+
{
|
|
36
|
+
"overrides": {
|
|
37
|
+
"allowArrowFunctions": true,
|
|
38
|
+
"namedExports": "declaration"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"eslint/id-length": "off",
|
|
43
|
+
"eslint/init-declarations": "off",
|
|
44
|
+
"eslint/max-lines": "off",
|
|
45
|
+
"eslint/max-lines-per-function": "off",
|
|
46
|
+
"eslint/no-await-in-loop": "off",
|
|
47
|
+
"eslint/no-eq-null": "off",
|
|
48
|
+
"eslint/no-magic-numbers": "off",
|
|
49
|
+
"eslint/no-ternary": "off",
|
|
50
|
+
"eslint/prefer-destructuring": "off",
|
|
51
|
+
"eslint/radix": "off",
|
|
52
|
+
"eslint/require-await": "warn",
|
|
53
|
+
"eslint/sort-imports": "off",
|
|
54
|
+
"eslint/sort-keys": "off",
|
|
55
|
+
"import/exports-last": "off",
|
|
56
|
+
"import/group-exports": "off",
|
|
57
|
+
"import/prefer-default-export": "off",
|
|
58
|
+
"jsdoc/require-param": "warn",
|
|
59
|
+
"jsdoc/require-param-type": "off",
|
|
60
|
+
"jsdoc/require-returns-type": "off",
|
|
61
|
+
"oxc/no-async-await": "off",
|
|
62
|
+
"oxc/no-optional-chaining": "off",
|
|
63
|
+
"promise/avoid-new": "off",
|
|
64
|
+
"promise/prefer-await-to-callbacks": "off",
|
|
65
|
+
"typescript/array-type": [
|
|
66
|
+
"warn",
|
|
67
|
+
{
|
|
68
|
+
"default": "array-simple",
|
|
69
|
+
"readonly": "array-simple"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"typescript/no-unsafe-type-assertion": "off",
|
|
73
|
+
"typescript/promise-function-async": "off",
|
|
74
|
+
"unicorn/no-null": "off",
|
|
75
|
+
"unicorn/prefer-event-target": "off",
|
|
76
|
+
"unicorn/prefer-node-protocol": "warn",
|
|
77
|
+
"unicorn/prefer-number-properties": "off"
|
|
78
|
+
},
|
|
79
|
+
"overrides": [
|
|
80
|
+
{
|
|
81
|
+
"files": [ "**/*.test.ts" ],
|
|
82
|
+
"rules": {
|
|
83
|
+
"no-floating-promises": "off"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# MIT LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Klaus Reimer
|
|
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
|
|
7
|
+
deal in the Software without restriction, including without limitation the
|
|
8
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
9
|
+
sell 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
|
|
13
|
+
all 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
|
|
20
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
21
|
+
IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @kayahr/oxlint-config
|
|
2
|
+
|
|
3
|
+
[GitHub] | [NPM]
|
|
4
|
+
|
|
5
|
+
Shared [oxlint] configuration for my personal TypeScript projects.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
Install the dependencies:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
$ npm install -DE @kayahr/oxlint-config
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Create an `.oxlintrc.json` configuration file with the following content (modify environment if necessary):
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"$schema": "node_modules/oxlint/configuration_schema.json",
|
|
20
|
+
"extends": [
|
|
21
|
+
"node_modules/@kayahr/oxlint-config/.oxlintrc.json"
|
|
22
|
+
],
|
|
23
|
+
"env": {
|
|
24
|
+
"node": true,
|
|
25
|
+
"browser": true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Add the following script line to `package.json`:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"scripts": {
|
|
35
|
+
"test:lint": "oxlint --type-aware",
|
|
36
|
+
"test": "npm run test:lint"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
When using the [OXC VSCode extension] extension then enable `typeAware` flag in `.vscode/settings.json`:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"oxc.typeAware": true
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
[GitHub]: https://github.com/kayahr/oxlint-config
|
|
50
|
+
[NPM]: https://www.npmjs.com/package/@kayahr/oxlint-config
|
|
51
|
+
[oxlint]: https://oxc.rs/docs/guide/usage/linter
|
|
52
|
+
[OXC VSCode Extension]: https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kayahr/oxlint-config",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Shared oxlint config for @kayahr projects",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": "./.oxlintrc.json",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/kayahr/oxlint-config.git"
|
|
11
|
+
},
|
|
12
|
+
"funding": "https://github.com/kayahr/oxlint-config?sponsor=1",
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "run test:*",
|
|
18
|
+
"test:lint": "oxlint --type-aware",
|
|
19
|
+
"test:spell": "cspell --no-progress"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
".oxlintrc.json"
|
|
23
|
+
],
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@kayahr/cspell": "9.2.1-bundle.2",
|
|
26
|
+
"@kayahr/npm-utils": "0.0.2"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"oxlint": "^1.18.0",
|
|
30
|
+
"oxlint-tsgolint": "^0.2.0"
|
|
31
|
+
}
|
|
32
|
+
}
|