@murky-web/oxc-config 0.1.0 → 0.1.2

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.
@@ -106,7 +106,23 @@
106
106
  "eslint/no-lonely-if": "error",
107
107
  "eslint/no-loop-func": "error",
108
108
  "eslint/no-loss-of-precision": "error",
109
- "eslint/no-magic-numbers": "error",
109
+ // 0, 1, 2 and -1 are not magic; neither are defaults, enum values,
110
+ // literal types or readonly class fields. Array indexes are reported
111
+ // (match[3] should be a named capture group). solid.jsonc replaces
112
+ // this rule with solid/no-magic-numbers, a fork with the same options
113
+ // and an agent-ready message; projects without it keep this one.
114
+ "eslint/no-magic-numbers": [
115
+ "error",
116
+ {
117
+ "ignore": [-1, 0, 1, 2],
118
+ "ignoreDefaultValues": true,
119
+ "ignoreClassFieldInitialValues": true,
120
+ "ignoreEnums": true,
121
+ "ignoreNumericLiteralTypes": true,
122
+ "ignoreReadonlyClassProperties": true,
123
+ "ignoreTypeIndexes": true
124
+ }
125
+ ],
110
126
  "eslint/no-misleading-character-class": "error",
111
127
  "eslint/no-multi-assign": "error",
112
128
  "eslint/no-multi-str": "error",
@@ -16,6 +16,29 @@
16
16
  "solid/no-cleanup-in-effect-apply": "error",
17
17
  "solid/no-destructure": "error",
18
18
  "solid/no-innerhtml": "error",
19
+ // Replaces eslint/no-magic-numbers (eslint.jsonc) wherever this file
20
+ // is extended, so a number is reported once.
21
+ "eslint/no-magic-numbers": "off",
22
+ // Fork of eslint/no-magic-numbers. 0, 1, 2 and
23
+ // -1 are not magic (items[0], count + 1, length / 2,
24
+ // indexOf(...) === -1); neither are defaults, enum values, literal
25
+ // types or readonly class fields. Array indexes are NOT ignored:
26
+ // match[3] should be a named capture group or a destructured name.
27
+ // 1000, 60, 24 stay reported and become named constants with their
28
+ // unit (RETRY_DELAY_MS). A server project can add
29
+ // "allowHttpStatusCodes": true for c.json(body, 404) and the like.
30
+ "solid/no-magic-numbers": [
31
+ "error",
32
+ {
33
+ "ignore": [-1, 0, 1, 2],
34
+ "ignoreDefaultValues": true,
35
+ "ignoreClassFieldInitialValues": true,
36
+ "ignoreEnums": true,
37
+ "ignoreNumericLiteralTypes": true,
38
+ "ignoreReadonlyClassProperties": true,
39
+ "ignoreTypeIndexes": true
40
+ }
41
+ ],
19
42
  "solid/no-module-scope-reactive-primitive": "error",
20
43
  "solid/no-owned-primitives-in-ref": "error",
21
44
  // Only for targets without Proxy; createStore and createProjection are
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@murky-web/oxc-config",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Shared oxfmt and oxlint configuration",
5
5
  "license": "ISC",
6
6
  "repository": {
@@ -15,7 +15,8 @@
15
15
  "README.md"
16
16
  ],
17
17
  "publishConfig": {
18
- "access": "public"
18
+ "access": "public",
19
+ "provenance": true
19
20
  },
20
21
  "scripts": {
21
22
  "test": "bun ./check_prefixes.mjs"