@apify/oxlint-config 0.2.2 → 0.2.3

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 (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +3 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -55,7 +55,7 @@ npx oxlint --type-aware
55
55
 
56
56
  The shared config provides:
57
57
 
58
- - **Plugins** — `typescript`, `import`, `unicorn`, `jest`, `promise` (Rust-side, no install required). React plugins are intentionally **not** included; consumers add `'react'` to `plugins` if their project uses React. (Note: oxlint's `react` plugin already covers React Hooks rules; there's no separate `react-hooks` plugin.)
58
+ - **Plugins** — `typescript`, `import`, `unicorn`, `jest`, `vitest`, `promise` (Rust-side, no install required). Both `jest` and `vitest` are enabled because vitest's API is jest-compatible — most of the test best-practices we care about live in the `jest/*` rules and apply equally to vitest tests. The `vitest` plugin adds a few framework-specific rules (e.g. `vitest/hoisted-apis-on-top`, `vitest/no-conditional-tests`) on top. React plugins are intentionally **not** included; consumers add `'react'` to `plugins` if their project uses React. (Note: oxlint's `react` plugin already covers React Hooks rules; there's no separate `react-hooks` plugin.)
59
59
  - **Rules** — the Apify house rules: `typescript/consistent-type-imports`, `typescript/no-floating-promises`, `unicorn/prefer-node-protocol`, `import/no-default-export`, `unicorn/no-await-in-promise-methods`, plus the curated `off` list of TypeScript strict rules we don't want.
60
60
  - **Overrides** — relaxed rules for test files, vite/jest/vitest config files, story files, and integration test directories.
61
61
 
package/index.js CHANGED
@@ -18,7 +18,7 @@ import { defineConfig as oxlintDefineConfig } from 'oxlint';
18
18
  * manually.
19
19
  */
20
20
  const sharedConfig = {
21
- plugins: ['typescript', 'import', 'unicorn', 'jest', 'promise'],
21
+ plugins: ['typescript', 'import', 'unicorn', 'jest', 'vitest', 'promise'],
22
22
  env: {
23
23
  node: true,
24
24
  browser: true,
@@ -148,6 +148,8 @@ const sharedConfig = {
148
148
  'jest/no-conditional-expect': 'error',
149
149
  'jest/no-focused-tests': 'error',
150
150
  'jest/valid-expect': 'off',
151
+ 'vitest/hoisted-apis-on-top': 'error',
152
+ 'vitest/no-conditional-tests': 'error',
151
153
  'import/no-default-export': 'off',
152
154
  },
153
155
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/oxlint-config",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Apify oxlint preset to be shared between projects.",
5
5
  "repository": {
6
6
  "url": "https://github.com/apify/apify-oxlint-config"