@himynameisdave/oxlint-config 1.0.0 → 1.2.0

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 CHANGED
@@ -29,7 +29,7 @@ pnpm add -D oxlint @himynameisdave/oxlint-config
29
29
  yarn add -D oxlint @himynameisdave/oxlint-config
30
30
  ```
31
31
 
32
- - Requires `oxlint >=1.76.0 <2`. Why that range, and how it moves: [Versioning & compatibility](#versioning--compatibility).
32
+ - Requires `oxlint >=1.78.0 <2`. Why that range, and how it moves: [Versioning & compatibility](#versioning--compatibility).
33
33
  - Type-aware linting requires TypeScript 7+ and a `strict` tsconfig.
34
34
 
35
35
  ## Configurations
@@ -99,7 +99,7 @@ Rule churn is deliberately _not_ a major bump. A newly-decided rule and a rule f
99
99
 
100
100
  `^` accepts new errors on update. Don't want that? Use `~` (patch only) with a committed lockfile, and upgrade deliberately.
101
101
 
102
- **Supported oxlint: `>=1.76.0 <2`.** The floor is the version this release's rule inventory was certified against, so it moves whenever new rules are decided. Older oxlint skips rules it doesn't know instead of erroring, which means a stale binary quietly under-lints. The `<2` ceiling is there because an oxlint 2.0 needs a release here anyway.
102
+ **Supported oxlint: `>=1.78.0 <2`.** The floor is the version this release's rule inventory was certified against, so it moves whenever new rules are decided. Older oxlint skips rules it doesn't know instead of erroring, which means a stale binary quietly under-lints. The `<2` ceiling is there because an oxlint 2.0 needs a release here anyway.
103
103
 
104
104
  **Type-aware assumes a strict tsconfig.** The `type-aware` config expects `"strict": true`, and does its best work with `"noUncheckedIndexedAccess"`. Without them, rules like `typescript/no-unnecessary-condition` both over- and under-report.
105
105
 
package/dist/base.d.ts CHANGED
@@ -169,6 +169,7 @@ declare const _default: {
169
169
  'eslint/no-ternary': "off";
170
170
  'eslint/no-useless-computed-key': "error";
171
171
  'eslint/object-shorthand': "error";
172
+ 'eslint/one-var': ["error", string];
172
173
  'eslint/operator-assignment': "error";
173
174
  'eslint/prefer-arrow-callback': "error";
174
175
  'eslint/prefer-const': "error";
@@ -452,7 +453,7 @@ declare const _default: {
452
453
  'import/max-dependencies': ["error", {
453
454
  max: number;
454
455
  }];
455
- 'import/consistent-type-specifier-style': ["error", "prefer-inline"];
456
+ 'import/consistent-type-specifier-style': ["error", "prefer-top-level-if-only-type-imports"];
456
457
  'import/exports-last': "off";
457
458
  'import/first': "error";
458
459
  'import/group-exports': "off";
@@ -506,6 +507,9 @@ declare const _default: {
506
507
  'jsdoc/check-property-names': "error";
507
508
  'jsdoc/check-tag-names': "error";
508
509
  'jsdoc/implements-on-classes': "error";
510
+ 'jsdoc/no-blank-blocks': ["error", {
511
+ enableFixer: true;
512
+ }];
509
513
  'jsdoc/no-defaults': "error";
510
514
  'jsdoc/require-property': "off";
511
515
  'jsdoc/require-property-description': "error";
package/dist/base.js CHANGED
@@ -328,6 +328,9 @@ export default defineConfig({
328
328
  'eslint/no-useless-computed-key': 'error',
329
329
  // {x: x} has a shorthand for a reason.
330
330
  'eslint/object-shorthand': 'error',
331
+ // "never" (the default is the opposite): `let a, b = 1` reads as if both were
332
+ // initialized, and one declarator per statement keeps diffs one binding wide.
333
+ 'eslint/one-var': ['error', 'never'],
331
334
  // x = x + y has a += spelling.
332
335
  'eslint/operator-assignment': 'error',
333
336
  // Arrow callbacks keep lexical this; function callbacks invite this-bugs.
@@ -494,8 +497,9 @@ export default defineConfig({
494
497
  'typescript/consistent-type-assertions': 'error',
495
498
  // type over interface: no declaration merging surprises, works for unions too.
496
499
  'typescript/consistent-type-definitions': ['error', 'type'],
497
- // Inline `import { type X }` keeps one import per module; pairs with
498
- // import/consistent-type-specifier-style below.
500
+ // Inline `import { x, type Y }` keeps mixed value+type imports on one line; the
501
+ // all-type case is handled by import/consistent-type-specifier-style below, which
502
+ // sends it top-level so erasure drops it (issue #33).
499
503
  'typescript/consistent-type-imports': ['error', { fixStyle: 'inline-type-imports' }],
500
504
  // Property signatures (fn: () => void) get strict variance checking; methods don't.
501
505
  'typescript/method-signature-style': 'error',
@@ -948,8 +952,10 @@ export default defineConfig({
948
952
  /* ================================================================== *
949
953
  * import — style
950
954
  * ================================================================== */
951
- // import { type X, y } inline — one import line per module, types marked in place.
952
- 'import/consistent-type-specifier-style': ['error', 'prefer-inline'],
955
+ // Top-level `import type { X }` only when every specifier is a type — that shape
956
+ // fully erases, so this agrees with typescript/no-import-type-side-effects and
957
+ // --fix converges; mixed imports keep inline `type` on one line (see issue #33).
958
+ 'import/consistent-type-specifier-style': ['error', 'prefer-top-level-if-only-type-imports'],
953
959
  // Export placement is layout preference, not correctness (off per cacographer).
954
960
  'import/exports-last': 'off',
955
961
  // Imports scattered below code hide the dependency list.
@@ -1092,6 +1098,9 @@ export default defineConfig({
1092
1098
  'jsdoc/check-tag-names': 'error',
1093
1099
  // @implements on a non-class is meaningless.
1094
1100
  'jsdoc/implements-on-classes': 'error',
1101
+ // A `/** */` documents nothing — the require-*-description bar applied to the
1102
+ // whole block. Fixer on: oxfmt reflows comments but never deletes them.
1103
+ 'jsdoc/no-blank-blocks': ['error', { enableFixer: true }],
1095
1104
  // Defaults documented in JSDoc drift from the code's actual defaults.
1096
1105
  'jsdoc/no-defaults': 'error',
1097
1106
  // Demanding @property blocks on every typedef is ceremony; completeness
package/dist/index.d.ts CHANGED
@@ -172,6 +172,7 @@ declare const _default: {
172
172
  'eslint/no-ternary': "off";
173
173
  'eslint/no-useless-computed-key': "error";
174
174
  'eslint/object-shorthand': "error";
175
+ 'eslint/one-var': ["error", string];
175
176
  'eslint/operator-assignment': "error";
176
177
  'eslint/prefer-arrow-callback': "error";
177
178
  'eslint/prefer-const': "error";
@@ -455,7 +456,7 @@ declare const _default: {
455
456
  'import/max-dependencies': ["error", {
456
457
  max: number;
457
458
  }];
458
- 'import/consistent-type-specifier-style': ["error", "prefer-inline"];
459
+ 'import/consistent-type-specifier-style': ["error", "prefer-top-level-if-only-type-imports"];
459
460
  'import/exports-last': "off";
460
461
  'import/first': "error";
461
462
  'import/group-exports': "off";
@@ -509,6 +510,9 @@ declare const _default: {
509
510
  'jsdoc/check-property-names': "error";
510
511
  'jsdoc/check-tag-names': "error";
511
512
  'jsdoc/implements-on-classes': "error";
513
+ 'jsdoc/no-blank-blocks': ["error", {
514
+ enableFixer: true;
515
+ }];
512
516
  'jsdoc/no-defaults': "error";
513
517
  'jsdoc/require-property': "off";
514
518
  'jsdoc/require-property-description': "error";
@@ -658,7 +662,9 @@ declare const _default: {
658
662
  'vitest/valid-describe-callback': "error";
659
663
  'vitest/valid-expect': "error";
660
664
  'vitest/valid-expect-in-promise': "error";
661
- 'vitest/valid-title': "error";
665
+ 'vitest/valid-title': ["error", {
666
+ allowArguments: boolean;
667
+ }];
662
668
  'vitest/warn-todo': "off";
663
669
  'vitest/no-commented-out-tests': "error";
664
670
  'vitest/no-conditional-in-test': "off";
package/dist/vitest.d.ts CHANGED
@@ -32,7 +32,9 @@ declare const _default: {
32
32
  'vitest/valid-describe-callback': "error";
33
33
  'vitest/valid-expect': "error";
34
34
  'vitest/valid-expect-in-promise': "error";
35
- 'vitest/valid-title': "error";
35
+ 'vitest/valid-title': ["error", {
36
+ allowArguments: boolean;
37
+ }];
36
38
  'vitest/warn-todo': "off";
37
39
  'vitest/no-commented-out-tests': "error";
38
40
  'vitest/no-conditional-in-test': "off";
package/dist/vitest.js CHANGED
@@ -64,7 +64,10 @@ export default defineConfig({
64
64
  // the test has already passed.
65
65
  'vitest/valid-expect-in-promise': 'error',
66
66
  // Empty or dynamic-garbage titles break -t filtering and failure reports.
67
- 'vitest/valid-title': 'error',
67
+ // allowArguments: true lets a title be the imported function reference
68
+ // itself, which is what prefer-describe-function-title (below) demands —
69
+ // without it the two rules deadlock (oxc-project/oxc#18591).
70
+ 'vitest/valid-title': ['error', { allowArguments: true }],
68
71
  // .todo is the sanctioned marker for planned tests; banning it would push
69
72
  // people back to .skip, which no-disabled-tests rightly forbids.
70
73
  'vitest/warn-todo': 'off',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@himynameisdave/oxlint-config",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "An opinionated oxlint config, by and for himynameisdave.",
5
5
  "keywords": [
6
6
  "config",
@@ -61,19 +61,17 @@
61
61
  "prepublishOnly": "npm run build",
62
62
  "format": "oxfmt --write",
63
63
  "format:check": "oxfmt --check",
64
- "test": "bun run lint && bun run format:check && bun run check-coverage && bun run test:consumer",
65
- "release": "np"
64
+ "test": "bun run lint && bun run format:check && bun run check-coverage && bun run test:consumer"
66
65
  },
67
66
  "devDependencies": {
68
67
  "@types/bun": "^1.3.14",
69
- "np": "^12.0.0",
70
- "oxfmt": "0.61.0",
71
- "oxlint": "1.76.0",
68
+ "oxfmt": "0.63.0",
69
+ "oxlint": "1.78.0",
72
70
  "oxlint-tsgolint": "^7.0.2001",
73
71
  "typescript": "^7.0.0"
74
72
  },
75
73
  "peerDependencies": {
76
- "oxlint": ">=1.76.0 <2",
74
+ "oxlint": ">=1.78.0 <2",
77
75
  "oxlint-tsgolint": ">=7.0.2001"
78
76
  },
79
77
  "peerDependenciesMeta": {