Registry / testing / eslint-config-signavio-test

eslint-config-signavio-test

JSON →
library2.0.0jsnpmunverified

eslint-config-signavio-test is a shareable ESLint configuration package designed to extend `eslint-config-signavio`. Its primary purpose is to provide specific rule adjustments tailored for JavaScript and TypeScript test environments, optimizing linting within testing setups. This typically involves relaxing certain rules that might be overly strict for test files (e.g., `no-unused-expressions` for assertion libraries) or enforcing best practices relevant to testing frameworks. As an extension, it relies on and builds upon the rules defined in its base configuration. Version 2.0.0 is the current stable release, indicating active maintenance likely aligned with Signavio's internal development cycles and updates to ESLint or the base config. Its key differentiator is its specialization for test code, which helps reduce noise and false positives often encountered when applying general linting rules universally.

npm install eslint-config-signavio-test
INSTALL
IMPORT
SIG · ESLINT-CONFIG-SIGN
E
eslint-config-signavio-test
testingjavascriptv2.0.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

extends configuration in .eslintrc
✓ { "extends": ["signavio-test"] }
✗ import config from 'eslint-config-signavio-test';
ESLint configurations are not imported as JavaScript modules; they are referenced by name in the `extends` array of an ESLint configuration file (e.g., `.eslintrc.json`, `eslint.config.js`). The 'eslint-config-' prefix is automatically resolved by ESLint.
extends configuration with flat config (ESLint v9+)
✓ // eslint.config.js import signavioTestConfig from 'eslint-config-signavio-test'; export default [ signavioTestConfig, // other configs ];
✗ module.exports = { extends: ['signavio-test'] }; // For flat config, use ESM import or CommonJS require of the config module directly
For ESLint's new flat configuration format (ESLint v9+), the configuration package is imported as a module. If the package exports an array of configurations, it can be directly included. CommonJS-style `module.exports` or string `extends` are for legacy `.eslintrc` files.
Specific rules for test files via `overrides`
✓ { "extends": ["signavio"], "overrides": [ { "files": ["**/*.test.js", "**/*.spec.js"], "extends": ["signavio-test"] } ] }
✗ { "extends": ["signavio", "signavio-test"] }
To apply test-specific rules only to test files and avoid conflicts with the base config on non-test files, use ESLint's `overrides` feature. This ensures `eslint-config-signavio-test` is active only for matching file patterns.

Illustrates how to integrate `eslint-config-signavio-test` into an `.eslintrc.cjs` (or `.js`) file using the `overrides` property to apply test-specific rules only to relevant files, extending a base `signavio` configuration.

// .eslintrc.cjs (for CommonJS projects, or .eslintrc.js for ESM projects if 'type: module' in package.json) // This example assumes you have 'eslint-config-signavio' also installed and configured. // For ESLint v9+ flat config, the syntax would differ (see imports). module.exports = { // Extend the base Signavio configuration for general project files extends: [ 'signavio' ], // Apply specific rules for test files overrides: [ { files: [ '**/*.test.js', '**/*.spec.js', '**/__tests__/**/*', '**/*.test.ts', '**/*.spec.ts', '**/__tests__/**/*.ts', '**/*.test.tsx', '**/*.spec.tsx', '**/__tests__/**/*.tsx' ], extends: [ 'signavio-test' ], // Optional: Add specific parser or plugins if your tests use unique syntaxes (e.g., Jest, Cypress) // parserOptions: { // ecmaVersion: 2020, // sourceType: 'module', // }, // env: { // jest: true, // node: true, // browser: true, // }, // rules: { // // Example: Relax 'no-unused-expressions' for Chai/expect assertions // 'no-unused-expressions': 'off', // }, } ], // Other global configurations can go here parserOptions: { ecmaVersion: 2020, sourceType: 'module', }, env: { browser: true, node: true, }, };
Debug
Known issues
breakingMajor version updates of ESLint (e.g., ESLint v8 to v9) introduce breaking changes, notably the shift from `.eslintrc.*` to flat configuration files (`eslint.config.js`). This package's usage pattern will change significantly with ESLint v9+.
fix
For ESLint v9+, migrate your project to use `eslint.config.js` and import the configuration directly as an ESM module, potentially using `@eslint/eslintrc` for compatibility with older configs. Consult ESLint's migration guide and the package's documentation for specific guidance.
affects: >=2.0.0 (if used with ESLint <9)
gotchaPeer dependency conflicts can occur if the installed `eslint` or `eslint-config-signavio` versions do not match the ranges specified by `eslint-config-signavio-test`. This often leads to `UNMET PEER DEPENDENCY` warnings or runtime errors.
fix
Ensure `eslint` and `eslint-config-signavio` are installed at versions compatible with `eslint-config-signavio-test`. Use `npm install --legacy-peer-deps` (as a last resort) or explicitly install the correct versions: `npm install eslint@<version> eslint-config-signavio@<version>`.
affects: >=2.0.0
breakingUpdates to `eslint-config-signavio` (the base configuration) can introduce new rules or modify existing ones that might conflict with or override the test-specific tweaks in `eslint-config-signavio-test`. These changes might require adjustments in your project's configuration.
fix
Regularly review the changelogs of `eslint-config-signavio` and `eslint-config-signavio-test` when updating. Use ESLint's `--print-config` command to inspect the resolved configuration for test files and identify any unintended rule conflicts.
affects: >=2.0.0
gotchaIncorrectly applying `eslint-config-signavio-test` globally instead of using `overrides` for test files can lead to overly strict linting errors in non-test code or prevent desired rules from applying in test files.
fix
Always use the `overrides` property in your `.eslintrc.*` file (or `files` in flat config) to target `eslint-config-signavio-test` specifically at your test file patterns (e.g., `**/*.test.js`, `**/__tests__/**/*`).
affects: >=2.0.0
Errors
Common errors & fixes
ESLint: Cannot find module 'eslint-config-signavio'
The `eslint-config-signavio` package is either not installed or ESLint cannot resolve its path.
fix
Install `eslint-config-signavio` as a peer dependency: `npm install --save-dev eslint-config-signavio`.
ESLint: Definition for rule '@typescript-eslint/no-unused-expressions' was not found
This error typically means a plugin providing the rule (e.g., `@typescript-eslint/eslint-plugin`) is missing or not correctly configured in your `.eslintrc.*` file. Shared configs often rely on specific plugins.
fix
Ensure all necessary ESLint plugins (e.g., `@typescript-eslint/eslint-plugin`, `eslint-plugin-jest`) are installed and listed in the `plugins` array of your `.eslintrc.*`.
npm ERR! ERESOLVE unable to resolve dependency tree
This often indicates a peer dependency conflict, where a package (like this config) requires a specific range of `eslint` or its base config, but your project has a conflicting version installed.
fix
Carefully examine the `ERESOLVE` output for the conflicting packages and their required versions. Try installing specific compatible versions (e.g., `npm install eslint@<version>`). `npm install --force` or `npm install --legacy-peer-deps` can bypass this but might lead to runtime issues.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
eslintrequiredRequired peer dependency for any ESLint configuration package to function. Ensures compatibility with the host ESLint version.
eslint-config-signaviorequiredThis package extends `eslint-config-signavio`, making it a mandatory peer dependency for its rules to be inherited and overridden.
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-config-signavio-test — npm install eslint-config-signavio-test · libregistry