Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Monorepo for [Code PushUp](https://github.com/code-pushup/cli) ESLint packages.
| Package | Description |
| :------------------------------------------------------------------- | :------------------------------------------- |
| [`@code-pushup/eslint-config`](./packages/eslint-config/README.md) | Recommended ESLint presets by Code PushUp |
| `@code-pushup/create-eslint-config` | Interactive setup wizard _(coming soon)_ |
| [`@code-pushup/create-eslint-config`](./packages/create-eslint-config/README.md) | Interactive setup wizard for `@code-pushup/eslint-config` |
29 changes: 29 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,33 @@ export default defineConfig(
'@nx/dependency-checks': 'error',
},
},
{
// in bin files, imports with side effects are allowed
files: ['**/bin.js'],
rules: {
'import/no-unassigned-import': 'off',
},
},
{
// specs call a custom test created via test.extend
// all variants are listed so the vitest rules treat them as test blocks
files: ['**/*.spec.ts'],
rules: {
'vitest/no-standalone-expect': [
'warn',
{ additionalTestBlockFunctions: ['test', 'test.for', 'test.each'] },
],
'vitest/require-hook': [
'warn',
{ allowedFunctionCalls: ['test', 'test.for', 'test.each'] },
],
},
},
{
// test.extend belongs at module scope (the documented vitest pattern)
files: ['**/test-setup.ts'],
rules: {
'vitest/require-hook': 'off',
},
},
);
1 change: 1 addition & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"production": [
"default",
"!{projectRoot}/**/*.spec.[jt]s",
"!{projectRoot}/src/test-setup.ts",
"!{projectRoot}/eslint.config.js",
"!{projectRoot}/vitest.config.[jt]s",
"!{projectRoot}/tsconfig.spec.json"
Expand Down
Loading
Loading