@apify/oxlint-config 0.2.3 → 0.2.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.
Files changed (2) hide show
  1. package/index.js +24 -17
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -44,20 +44,6 @@ const sharedConfig = {
44
44
  ],
45
45
  'no-labels': 'error',
46
46
  'guard-for-in': 'error',
47
- 'import-js/no-extraneous-dependencies': [
48
- 'error',
49
- {
50
- devDependencies: [
51
- '**/vite.config.{js,ts,mjs,mts}',
52
- '**/vitest.config.{js,ts,mjs,mts}',
53
- '**/*.test.{js,ts,jsx,tsx}',
54
- '**/*.spec.{js,ts,jsx,tsx}',
55
- '**/{test,tests,integration_tests}/**/*.{js,ts,jsx,tsx,mjs,mts,cjs,cts}',
56
- '**/.storybook/**/*.{js,ts,jsx,tsx}',
57
- '**/*.stories.{js,jsx,ts,tsx}',
58
- ],
59
- },
60
- ],
61
47
  'typescript/no-shadow': 'error',
62
48
  'no-shadow': 'off',
63
49
  'typescript/no-non-null-assertion': 'off',
@@ -97,6 +83,30 @@ const sharedConfig = {
97
83
  'unicorn/no-await-in-promise-methods': 'error',
98
84
  'jest/require-to-throw-message': 'off',
99
85
  'jest/prefer-snapshot-hint': 'off',
86
+ // Vitest plugin auto-enables most of its rules at error level. Keep
87
+ // the few that catch real bugs and turn the noisy/opinionated/buggy
88
+ // ones off:
89
+ // - hoisted-apis-on-top: false-positive on `vi.mocked()`, which is
90
+ // a TypeScript type-helper (not a hoisted API).
91
+ // - require-mock-type-parameters: too aggressive (every .mock() call
92
+ // would need a type parameter); opt-in per project if desired.
93
+ // - consistent-each-for, warn-todo, require-local-test-context-for-
94
+ // concurrent-snapshots: opinion / niche.
95
+ // - valid-describe-callback: false-positive on the
96
+ // `describe(name, options, fn)` API (e.g. `{ retry: 10 }`) — the
97
+ // rule treats the options object as an invalid second argument.
98
+ // - valid-expect: misfires on chai-style assertions used by Cypress
99
+ // (`expect(x).to.be.greaterThan(y)`); the vitest plugin has no
100
+ // notion of chai's `.to.*` modifier chain. Cypress tests live in
101
+ // the same workspaces as vitest tests, so file-glob scoping isn't
102
+ // reliable — disable globally.
103
+ 'vitest/hoisted-apis-on-top': 'off',
104
+ 'vitest/require-mock-type-parameters': 'off',
105
+ 'vitest/consistent-each-for': 'off',
106
+ 'vitest/warn-todo': 'off',
107
+ 'vitest/require-local-test-context-for-concurrent-snapshots': 'off',
108
+ 'vitest/valid-describe-callback': 'off',
109
+ 'vitest/valid-expect': 'off',
100
110
  'typescript/unbound-method': 'off',
101
111
  'typescript/restrict-template-expressions': 'off',
102
112
  'typescript/no-useless-default-assignment': 'off',
@@ -143,13 +153,10 @@ const sharedConfig = {
143
153
  'typescript/await-thenable': 'off',
144
154
  'typescript/no-floating-promises': 'off',
145
155
  'typescript/no-misused-promises': 'off',
146
- 'import-js/no-extraneous-dependencies': 'off',
147
156
  'jest/no-disabled-tests': 'error',
148
157
  'jest/no-conditional-expect': 'error',
149
158
  'jest/no-focused-tests': 'error',
150
159
  'jest/valid-expect': 'off',
151
- 'vitest/hoisted-apis-on-top': 'error',
152
- 'vitest/no-conditional-tests': 'error',
153
160
  'import/no-default-export': 'off',
154
161
  },
155
162
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/oxlint-config",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Apify oxlint preset to be shared between projects.",
5
5
  "repository": {
6
6
  "url": "https://github.com/apify/apify-oxlint-config"