@phiphi/oxlint-config 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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 philibeaux
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.
@@ -0,0 +1,212 @@
1
+ {
2
+ "$schema": "../node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["typescript", "eslint", "import", "node", "oxc", "unicorn"],
4
+ "rules": {
5
+ "capitalized-comments": "off",
6
+
7
+ "eslint/array-callback-return": "error",
8
+ "eslint/constructor-super": "error",
9
+ "eslint/default-case-last": "error",
10
+ "eslint/default-param-last": "off",
11
+ "eslint/eqeqeq": "error",
12
+ "eslint/for-direction": "error",
13
+ "eslint/func-style": "off",
14
+ "eslint/getter-return": "error",
15
+ "eslint/guard-for-in": "error",
16
+ "eslint/id-length": "off",
17
+ "eslint/init-declarations": "off",
18
+ "eslint/max-classes-per-file": "error",
19
+ "eslint/max-depth": "off",
20
+ "eslint/max-lines": "off",
21
+ "eslint/max-lines-per-function": "off",
22
+ "eslint/max-nested-callbacks": "off",
23
+ "eslint/max-params": "off",
24
+ "eslint/max-statements": [
25
+ "error",
26
+ {
27
+ "max": 20
28
+ }
29
+ ],
30
+ "eslint/new-cap": "off",
31
+ "eslint/no-array-constructor": "error",
32
+ "eslint/no-async-promise-executor": "error",
33
+ "eslint/no-await-in-loop": "off",
34
+ "eslint/no-bitwise": "error",
35
+ "eslint/no-caller": "error",
36
+ "eslint/no-case-declarations": "error",
37
+ "eslint/no-class-assign": "error",
38
+ "eslint/no-compare-neg-zero": "error",
39
+ "eslint/no-cond-assign": "error",
40
+ "eslint/no-console": "error",
41
+ "eslint/no-const-assign": "error",
42
+ "eslint/no-constant-binary-expression": "error",
43
+ "eslint/no-constant-condition": "error",
44
+ "eslint/no-continue": "error",
45
+ "eslint/no-control-regex": "error",
46
+ "eslint/no-debugger": "error",
47
+ "eslint/no-delete-var": "error",
48
+ "eslint/no-dupe-class-members": "error",
49
+ "eslint/no-dupe-else-if": "error",
50
+ "eslint/no-dupe-keys": "error",
51
+ "eslint/no-duplicate-case": "error",
52
+ "eslint/no-duplicate-imports": ["error", { "allowSeparateTypeImports": true }],
53
+ "eslint/no-empty": "error",
54
+ "eslint/no-empty-character-class": "error",
55
+ "eslint/no-empty-function": "off",
56
+ "eslint/no-empty-pattern": "error",
57
+ "eslint/no-empty-static-block": "error",
58
+ "eslint/no-eq-null": "error",
59
+ "eslint/no-eval": "error",
60
+ "eslint/no-ex-assign": "error",
61
+ "eslint/no-extra-boolean-cast": "error",
62
+ "eslint/no-fallthrough": "error",
63
+ "eslint/no-func-assign": "error",
64
+ "eslint/no-global-assign": "error",
65
+ "eslint/no-implicit-coercion": ["error", { "allow": ["!!"] }],
66
+ "eslint/no-import-assign": "error",
67
+ "eslint/no-inline-comments": "off",
68
+ "eslint/no-inner-declarations": "error",
69
+ "eslint/no-irregular-whitespace": "error",
70
+ "eslint/no-iterator": "error",
71
+ "eslint/no-loss-of-precision": "error",
72
+ "eslint/no-magic-numbers": "off",
73
+ "eslint/no-new-native-nonconstructor": "error",
74
+ "eslint/no-new-wrappers": "error",
75
+ "eslint/no-nonoctal-decimal-escape": "error",
76
+ "eslint/no-obj-calls": "error",
77
+ "eslint/no-proto": "error",
78
+ "eslint/no-prototype-builtins": "error",
79
+ "eslint/no-redeclare": "error",
80
+ "eslint/no-regex-spaces": "error",
81
+ "eslint/no-script-url": "error",
82
+ "eslint/no-self-assign": "error",
83
+ "eslint/no-self-compare": "error",
84
+ "eslint/no-setter-return": "error",
85
+ "eslint/no-shadow-restricted-names": "error",
86
+ "eslint/no-sparse-arrays": "error",
87
+ "eslint/no-template-curly-in-string": "error",
88
+ "eslint/no-ternary": "off",
89
+ "eslint/no-this-before-super": "error",
90
+ "eslint/no-undef": "off",
91
+ "eslint/no-undefined": "off",
92
+ "eslint/no-unsafe-finally": "error",
93
+ "eslint/no-unsafe-negation": "error",
94
+ "eslint/no-unsafe-optional-chaining": "error",
95
+ "eslint/no-unused-vars": [
96
+ "error",
97
+ {
98
+ "ignoreRestSiblings": true
99
+ }
100
+ ],
101
+ "eslint/no-useless-catch": "error",
102
+ "eslint/no-useless-escape": "error",
103
+ "eslint/no-useless-rename": "error",
104
+ "eslint/no-var": "error",
105
+ "eslint/no-void": "error",
106
+ "eslint/no-warning-comments": "off",
107
+ "eslint/no-with": "error",
108
+ "eslint/prefer-destructuring": "off",
109
+ "eslint/radix": "error",
110
+ "eslint/require-await": "off",
111
+ "eslint/require-yield": "error",
112
+ "eslint/sort-imports": [
113
+ "off",
114
+ {
115
+ "ignoreDeclarationSort": true,
116
+ "memberSyntaxSortOrder": ["single", "multiple", "all", "none"]
117
+ }
118
+ ],
119
+ "eslint/sort-keys": "off",
120
+ "eslint/unicode-bom": "error",
121
+ "eslint/use-isnan": "error",
122
+ "eslint/valid-typeof": "error",
123
+ "eslint/yoda": "error",
124
+
125
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
126
+ "import/default": "error",
127
+ "import/export": "error",
128
+ "import/no-default-export": "off",
129
+ "import/no-named-export": "off",
130
+ "import/exports-last": "off",
131
+ "import/group-exports": "off",
132
+ "import/namespace": "off",
133
+ "import/no-relative-parent-imports": "off",
134
+ "import/prefer-default-export": "off",
135
+
136
+ "oxc/bad-bitwise-operator": "error",
137
+ "oxc/no-accumulating-spread": "off",
138
+ "oxc/no-async-await": "off",
139
+ "oxc/no-barrel-file": "off",
140
+ "oxc/no-const-enum": "error",
141
+ "oxc/no-map-spread": "off",
142
+ "oxc/no-optional-chaining": "off",
143
+ "oxc/no-rest-spread-properties": "off",
144
+
145
+ "unicorn/catch-error-name": "error",
146
+ "unicorn/empty-brace-spaces": "error",
147
+ "unicorn/error-message": "off",
148
+ "unicorn/escape-case": "error",
149
+ "unicorn/explicit-length-check": "error",
150
+ "unicorn/filename-case": "off",
151
+ "unicorn/new-for-builtins": "error",
152
+ "unicorn/no-abusive-eslint-disable": "error",
153
+ "unicorn/no-anonymous-default-export": "off",
154
+ "unicorn/no-array-for-each": "off",
155
+ "unicorn/no-array-reduce": "off",
156
+ "unicorn/no-array-sort": "off",
157
+ "unicorn/no-await-expression-member": "off",
158
+ "unicorn/no-await-in-promise-methods": "off",
159
+ "unicorn/no-console-spaces": "error",
160
+ "unicorn/no-document-cookie": "off",
161
+ "unicorn/no-empty-file": "error",
162
+ "unicorn/no-hex-escape": "error",
163
+ "unicorn/no-null": "off",
164
+ "unicorn/no-useless-undefined": "off",
165
+ "unicorn/prefer-object-from-entries": "off",
166
+ "unicorn/prefer-string-replace-all": "off",
167
+ "unicorn/no-typeof-undefined": "error",
168
+ "unicorn/number-literal-case": "error",
169
+
170
+ // Typescript
171
+ "typescript/adjacent-overload-signatures": "error",
172
+ "typescript/array-type": "error",
173
+ "typescript/ban-ts-comment": "error",
174
+ "typescript/ban-tslint-comment": "off",
175
+ "typescript/ban-types": "error",
176
+ "typescript/consistent-indexed-object-style": "off",
177
+ "typescript/consistent-type-definitions": ["error", "type"],
178
+ "typescript/consistent-type-exports": "error",
179
+ "typescript/consistent-type-imports": "error",
180
+ "typescript/explicit-function-return-type": "off",
181
+ "typescript/explicit-module-boundary-types": "off",
182
+ "typescript/no-duplicate-enum-values": "error",
183
+ "typescript/no-empty-interface": "error",
184
+ "typescript/no-explicit-any": "error",
185
+ "typescript/no-extra-non-null-assertion": "error",
186
+ "typescript/no-magic-numbers": "off",
187
+ "typescript/no-misused-new": "error",
188
+ "typescript/no-namespace": "error",
189
+ "typescript/no-non-null-asserted-optional-chain": "error",
190
+ "typescript/no-non-null-assertion": "off",
191
+ "typescript/no-this-alias": "error",
192
+ "typescript/no-unnecessary-type-arguments": "off",
193
+ "typescript/no-unnecessary-type-constraint": "error",
194
+ "typescript/no-unnecessary-type-conversion": "off",
195
+ "typescript/no-unsafe-declaration-merging": "error",
196
+ "typescript/no-unsafe-member-access": "error",
197
+ "typescript/no-var-requires": "error",
198
+ "typescript/prefer-as-const": "error",
199
+ "typescript/prefer-enum-initializers": "off",
200
+ "typescript/prefer-readonly-parameter-types": "off",
201
+ "typescript/prefer-for-of": "error",
202
+ "typescript/prefer-function-type": "off",
203
+ "typescript/prefer-literal-enum-member": "off",
204
+ "typescript/prefer-regexp-exec": "off",
205
+ "typescript/prefer-ts-expect-error": "off",
206
+ "typescript/triple-slash-reference": "error",
207
+ "typescript/no-unsafe-return": "error",
208
+ "typescript/no-unsafe-assignment": "error",
209
+ "typescript/no-unsafe-argument": "error",
210
+ "typescript/no-inferrable-types": "error"
211
+ }
212
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "../node_modules/oxlint/configuration_schema.json",
3
+ "extends": ["./index.json"],
4
+ "plugins": ["react", "jsx-a11y"],
5
+ "rules": {
6
+ "react_perf/jsx-no-jsx-as-prop": "error",
7
+ "react_perf/jsx-no-new-array-as-prop": "error",
8
+ "react_perf/jsx-no-new-function-as-prop": "off",
9
+ "react_perf/jsx-no-new-object-as-prop": "error",
10
+ "react-perf/jsx-no-jsx-as-prop": "off",
11
+ "react-perf/jsx-no-new-array-as-prop": "off",
12
+ "react-perf/jsx-no-new-function-as-prop": "off",
13
+ "react-perf/jsx-no-new-object-as-prop": "off",
14
+ "react/button-has-type": "error",
15
+ "react/display-name": "off",
16
+ "react/hook-use-state": "off",
17
+ "react/exhaustive-deps": "error",
18
+ "react/rules-of-hooks": "error",
19
+ "react/iframe-missing-sandbox": "error",
20
+ "react/jsx-filename-extension": [
21
+ "error",
22
+ {
23
+ "extensions": [".jsx", ".tsx"]
24
+ }
25
+ ],
26
+ "react/jsx-handler-names": "off",
27
+ "react/jsx-key": "error",
28
+ "react/jsx-no-comment-textnodes": "error",
29
+ "react/jsx-no-duplicate-props": "error",
30
+ "react/jsx-no-target-blank": "off",
31
+ "react/jsx-no-undef": "error",
32
+ "react/jsx-no-useless-fragment": "error",
33
+ "react/no-children-prop": "error",
34
+ "react/no-danger": "error",
35
+ "react/no-direct-mutation-state": "error",
36
+ "react/no-find-dom-node": "error",
37
+ "react/no-is-mounted": "error",
38
+ "react/no-multi-comp": "error",
39
+ "react/no-render-return-value": "error",
40
+ "react/no-set-state": "off",
41
+ "react/no-string-refs": "error",
42
+ "react/no-unescaped-entities": "error",
43
+ "react/no-unknown-property": "error",
44
+ "react/react-in-jsx-scope": "off",
45
+ "react/require-render-return": "error"
46
+ },
47
+ "settings": {
48
+ "jsx-a11y": {
49
+ "components": {
50
+ "polymorphicPropName": "as"
51
+ }
52
+ },
53
+ "react": {}
54
+ }
55
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "../node_modules/oxlint/configuration_schema.json",
3
+ "extends": ["./index.json"],
4
+ "overrides": [
5
+ {
6
+ "files": ["**/__tests__/**/*.{ts,tsx}", "**/__mocks__/**/*.{ts,tsx}", "**/*.test.{ts,tsx}", "**/*.spec.{ts,tsx}"],
7
+ "plugins": ["import", "oxc", "vitest"],
8
+ "rules": {
9
+ "@typescript-eslint/consistent-type-imports": "off",
10
+ "eslint/no-alert": "off",
11
+ "eslint/no-console": "off",
12
+ "import/export": "off",
13
+ "import/no-anonymous-default-export": "off",
14
+ "import/no-named-export": "off",
15
+ "import/no-namespace": "off",
16
+ "import/no-nodejs-modules": "off",
17
+ "import/no-unassigned-import": "off",
18
+ "jsx_a11y/label-has-associated-control": "off",
19
+ "node/no-process-env": "off",
20
+ "react/jsx-pascal-case": "off",
21
+ "react/jsx-props-no-spreading": "off",
22
+ "react/only-export-components": "off",
23
+ "unicorn/no-array-callback-reference": "off",
24
+ "vitest/no-importing-vitest-globals": "off",
25
+ "vitest/prefer-called-once": "error",
26
+ "vitest/prefer-called-times": "off",
27
+ "vitest/prefer-import-in-mock": "off",
28
+ "vitest/prefer-lowercase-title": "error",
29
+ "vitest/require-test-timeout": "off"
30
+ }
31
+ }
32
+ ],
33
+ "plugins": []
34
+ }
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@phiphi/oxlint-config",
3
+ "version": "0.0.1",
4
+ "description": "Phiphi's shareable configuration for oxlint",
5
+ "keywords": [
6
+ "config",
7
+ "lint",
8
+ "oxlint",
9
+ "oxlint-config",
10
+ "phiphi"
11
+ ],
12
+ "homepage": "https://github.com/philibea/frontends-libs/tree/main/packages/oxlint-config",
13
+ "bugs": {
14
+ "url": "https://github.com/philibea/frontends-libs/issues"
15
+ },
16
+ "license": "MIT",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/philibea/frontends-libs.git",
20
+ "directory": "packages/oxlint-config"
21
+ },
22
+ "files": [
23
+ "configs/**"
24
+ ],
25
+ "exports": {
26
+ ".": "./configs/index.json",
27
+ "./react": "./configs/react.json",
28
+ "./vitest": "./configs/vitest.json"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "devDependencies": {
34
+ "oxlint": "1.75.0"
35
+ },
36
+ "peerDependencies": {
37
+ "oxlint": ">=1.55.0"
38
+ }
39
+ }