@wistia/oxlint-config 0.9.3 → 1.0.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/package.json +1 -1
- package/rules/barrel-files.mjs +1 -2
- package/rules/base.mjs +2 -2
- package/rules/import.mjs +1 -1
- package/rules/node.mjs +2 -2
- package/rules/typescript.mjs +4 -0
- package/rules/vitest.mjs +2 -4
package/package.json
CHANGED
package/rules/barrel-files.mjs
CHANGED
|
@@ -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
|
-
|
|
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
|
@@ -928,12 +928,12 @@ export const baseRules = {
|
|
|
928
928
|
|
|
929
929
|
// Disallow barrel files (index files that re-export from other modules)
|
|
930
930
|
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-barrel-file.html
|
|
931
|
-
// Decision: handled by barrel-files
|
|
931
|
+
// Decision: handled by barrel-files/avoid-re-export-all and barrel-files/avoid-namespace-import
|
|
932
932
|
'oxc/no-barrel-file': 'off',
|
|
933
933
|
|
|
934
934
|
// Disallow TypeScript const enums
|
|
935
935
|
// https://oxc.rs/docs/guide/usage/linter/rules/oxc/no-const-enum.html
|
|
936
|
-
// Decision:
|
|
936
|
+
// Decision: const enums are TypeScript-only syntax; enabled in typescript config
|
|
937
937
|
'oxc/no-const-enum': 'off',
|
|
938
938
|
|
|
939
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:
|
|
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
|
|
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
|
|
175
|
+
// Decision: handled by knip
|
|
176
176
|
'n/no-extraneous-require': 'off',
|
|
177
177
|
|
|
178
178
|
// Disallow import declarations which import non-existent modules
|
package/rules/typescript.mjs
CHANGED
|
@@ -36,6 +36,10 @@ export const typescriptRules = {
|
|
|
36
36
|
// Decision: handled by typescript/require-await
|
|
37
37
|
'eslint/require-await': 'off',
|
|
38
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
|
+
|
|
39
43
|
// Require that function overload signatures be consecutive
|
|
40
44
|
// https://oxc.rs/docs/guide/usage/linter/rules/typescript/adjacent-overload-signatures.html
|
|
41
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
|
-
|
|
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
|
-
|
|
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
|