@configg/oxc 0.1.2 → 0.1.4
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 +5 -2
- package/package.json +1 -1
- package/src/lint.ts +5 -0
package/README.md
CHANGED
|
@@ -40,8 +40,11 @@ export default defineConfig(configs.client)
|
|
|
40
40
|
- `client`: browser env, type-aware, with rules relaxed for component code. Its `**/*.spec.{ts,tsx}` override enables the Vitest env and Testing Library rules, so it needs `eslint-plugin-testing-library`.
|
|
41
41
|
- `scripts`: Node env, type-aware, for tooling and config files.
|
|
42
42
|
|
|
43
|
-
Both presets allow up to two classes per file
|
|
44
|
-
|
|
43
|
+
Both presets allow up to two classes per file, allow `reduce()`, allow `process.exit()` (CLI scripts and
|
|
44
|
+
shutdown handlers exit with a status code on purpose) and allow short identifiers (`eslint/id-length` is off). They turn `import/prefer-default-export` off, since named
|
|
45
|
+
exports are the convention (it matters once a config adds the `import` plugin), and `unicorn/number-literal-case`
|
|
46
|
+
off, since oxfmt and Prettier write hex digits in lowercase. Template expressions allow
|
|
47
|
+
booleans, numbers, nullish values and `never`; other types follow Oxlint's defaults.
|
|
45
48
|
|
|
46
49
|
## Peer dependencies
|
|
47
50
|
|
package/package.json
CHANGED
package/src/lint.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { OxlintConfig } from 'oxlint'
|
|
2
2
|
|
|
3
3
|
const sharedRules = {
|
|
4
|
+
'eslint/id-length': 'off',
|
|
4
5
|
'eslint/max-classes-per-file': ['warn', { max: 2 }],
|
|
5
6
|
'typescript/restrict-template-expressions': [
|
|
6
7
|
'error',
|
|
@@ -11,7 +12,11 @@ const sharedRules = {
|
|
|
11
12
|
allowNumber: true,
|
|
12
13
|
},
|
|
13
14
|
],
|
|
15
|
+
'import/prefer-default-export': 'off',
|
|
14
16
|
'unicorn/no-array-reduce': 'off',
|
|
17
|
+
'unicorn/no-process-exit': 'off',
|
|
18
|
+
// Oxfmt and Prettier write hex digits in lowercase; this rule wants uppercase and takes no option.
|
|
19
|
+
'unicorn/number-literal-case': 'off',
|
|
15
20
|
} as const satisfies OxlintConfig['rules']
|
|
16
21
|
|
|
17
22
|
export const configs = {
|