@configg/oxc 0.1.4 → 0.1.5
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 +3 -2
- package/package.json +1 -1
- package/src/lint.ts +3 -0
package/README.md
CHANGED
|
@@ -43,8 +43,9 @@ export default defineConfig(configs.client)
|
|
|
43
43
|
Both presets allow up to two classes per file, allow `reduce()`, allow `process.exit()` (CLI scripts and
|
|
44
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
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.
|
|
47
|
-
|
|
46
|
+
off, since oxfmt and Prettier write hex digits in lowercase. `async`/`await` is allowed (`oxc/no-async-await` is
|
|
47
|
+
off), and functions may run to 100 lines (blank lines and comments not counted) and 30 statements. Template expressions
|
|
48
|
+
allow booleans, numbers, nullish values and `never`; other types follow Oxlint's defaults.
|
|
48
49
|
|
|
49
50
|
## Peer dependencies
|
|
50
51
|
|
package/package.json
CHANGED
package/src/lint.ts
CHANGED
|
@@ -3,6 +3,8 @@ import type { OxlintConfig } from 'oxlint'
|
|
|
3
3
|
const sharedRules = {
|
|
4
4
|
'eslint/id-length': 'off',
|
|
5
5
|
'eslint/max-classes-per-file': ['warn', { max: 2 }],
|
|
6
|
+
'eslint/max-lines-per-function': ['warn', { max: 100, skipBlankLines: true, skipComments: true }],
|
|
7
|
+
'eslint/max-statements': ['warn', { max: 30 }],
|
|
6
8
|
'typescript/restrict-template-expressions': [
|
|
7
9
|
'error',
|
|
8
10
|
{
|
|
@@ -13,6 +15,7 @@ const sharedRules = {
|
|
|
13
15
|
},
|
|
14
16
|
],
|
|
15
17
|
'import/prefer-default-export': 'off',
|
|
18
|
+
'oxc/no-async-await': 'off',
|
|
16
19
|
'unicorn/no-array-reduce': 'off',
|
|
17
20
|
'unicorn/no-process-exit': 'off',
|
|
18
21
|
// Oxfmt and Prettier write hex digits in lowercase; this rule wants uppercase and takes no option.
|