@wistia/oxlint-config 0.9.2 → 0.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/oxlint-config",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "Wistia's Oxlint configurations",
5
5
  "packageManager": "yarn@4.14.1",
6
6
  "type": "module",
@@ -15,8 +15,7 @@ export const barrelFilesRules = {
15
15
 
16
16
  // Avoid namespace imports from barrel files
17
17
  // https://github.com/thepassle/eslint-plugin-barrel-files/blob/main/docs/rules/avoid-namespace-import.md
18
- // Decision: too opinionated for general use
19
- 'eslint-plugin-barrel-files/avoid-namespace-import': 'off',
18
+ 'eslint-plugin-barrel-files/avoid-namespace-import': 'error',
20
19
 
21
20
  // Avoid re-export all from barrel files
22
21
  // https://github.com/thepassle/eslint-plugin-barrel-files/blob/main/docs/rules/avoid-re-export-all.md
package/rules/base.mjs CHANGED
@@ -804,8 +804,7 @@ export const baseRules = {
804
804
 
805
805
  // Disallow assignments that are never used
806
806
  // https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-useless-assignment.html
807
- // Decision: handled by TypeScript noUnusedLocals
808
- 'eslint/no-useless-assignment': 'off',
807
+ 'eslint/no-useless-assignment': 'error',
809
808
 
810
809
  // Disallow unnecessary calls to .call() and .apply()
811
810
  // https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-useless-call.html
@@ -929,12 +928,12 @@ export const baseRules = {
929
928
 
930
929
  // Disallow barrel files (index files that re-export from other modules)
931
930
  // https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-barrel-file.html
932
- // Decision: handled by barrel-files plugin
931
+ // Decision: handled by barrel-files/avoid-re-export-all and barrel-files/avoid-namespace-import
933
932
  'oxc/no-barrel-file': 'off',
934
933
 
935
934
  // Disallow TypeScript const enums
936
935
  // https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-const-enum.html
937
- // Decision: too opinionated for general use
936
+ // Decision: const enums are TypeScript-only syntax; enabled in typescript config
938
937
  'oxc/no-const-enum': 'off',
939
938
 
940
939
  // Disallow spreading keys from a map-like object into an object literal
package/rules/import.mjs CHANGED
@@ -102,7 +102,7 @@ export const importRules = {
102
102
 
103
103
  // Require exports to be placed at the end of the file
104
104
  // https://oxc.rs/docs/guide/usage/linter/rules/import/exports-last.html
105
- // Decision: too opinionated for general use
105
+ // Decision: conflicts with `import/first`, which is enabled
106
106
  'import/exports-last': 'off',
107
107
 
108
108
  // Prefer named exports to be grouped together in a single export declaration
package/rules/node.mjs CHANGED
@@ -167,12 +167,12 @@ export const nodeRules = {
167
167
 
168
168
  // Disallow import declarations which import extraneous modules
169
169
  // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-extraneous-import.md
170
- // Decision: handled by import-x-js/no-extraneous-dependencies
170
+ // Decision: handled by knip
171
171
  'n/no-extraneous-import': 'off',
172
172
 
173
173
  // Disallow require() expressions which import extraneous modules
174
174
  // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-extraneous-require.md
175
- // Decision: handled by import-x-js/no-extraneous-dependencies
175
+ // Decision: handled by knip
176
176
  'n/no-extraneous-require': 'off',
177
177
 
178
178
  // Disallow import declarations which import non-existent modules
@@ -19,6 +19,11 @@ export const typescriptRules = {
19
19
  // Decision: handled by TypeScript noUnusedLocals/noUnusedParameters
20
20
  'eslint/no-unused-vars': 'off',
21
21
 
22
+ // Disallow assignments that are never used
23
+ // https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-useless-assignment.html
24
+ // Decision: handled by TypeScript noUnusedLocals
25
+ 'eslint/no-useless-assignment': 'off',
26
+
22
27
  // Recommended to be disabled for TypeScript projects
23
28
  // https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/linting/TROUBLESHOOTING.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
24
29
  // Decision: handled by TypeScript
@@ -31,6 +36,10 @@ export const typescriptRules = {
31
36
  // Decision: handled by typescript/require-await
32
37
  'eslint/require-await': 'off',
33
38
 
39
+ // Const enum values can shift when keys are added/removed; prefer a type union of string literals.
40
+ // https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-const-enum.html
41
+ 'oxc/no-const-enum': 'error',
42
+
34
43
  // Require that function overload signatures be consecutive
35
44
  // https://oxc.rs/docs/guide/usage/linter/rules/typescript/adjacent-overload-signatures.html
36
45
  'typescript/adjacent-overload-signatures': 'error',
package/rules/vitest.mjs CHANGED
@@ -57,8 +57,7 @@ export const vitestRules = {
57
57
 
58
58
  // Prefer vi.importActual/vi.importMock in vi.mock factories
59
59
  // https://oxc.rs/docs/guide/usage/linter/rules/vitest/prefer-import-in-mock.html
60
- // Decision: potentially helpful but causes too many type errors
61
- 'vitest/prefer-import-in-mock': 'off',
60
+ 'vitest/prefer-import-in-mock': 'error',
62
61
 
63
62
  // Prefer strict boolean matchers (toBe(true) over toBeTruthy())
64
63
  // https://oxc.rs/docs/guide/usage/linter/rules/vitest/prefer-strict-boolean-matchers.html
@@ -508,8 +507,7 @@ export const vitestRules = {
508
507
 
509
508
  // Enforce padding around test blocks
510
509
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
511
- // Decision: handled by native vitest/padding-around-test-blocks
512
- 'vitest-js/padding-around-test-blocks': 'off',
510
+ 'vitest-js/padding-around-test-blocks': 'error',
513
511
 
514
512
  // Prefer toHaveBeenCalledOnce() over toHaveBeenCalledTimes(1)
515
513
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md