@enormora/eslint-config-test-base 0.0.9 → 0.0.11

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 CHANGED
@@ -15,12 +15,12 @@
15
15
  "license": "MIT",
16
16
  "name": "@enormora/eslint-config-test-base",
17
17
  "peerDependencies": {
18
- "@enormora/eslint-config-base": "0.0.40"
18
+ "@enormora/eslint-config-base": "0.0.41"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
22
22
  "url": "git://github.com/enormora/eslint-config.git"
23
23
  },
24
24
  "type": "module",
25
- "version": "0.0.9"
25
+ "version": "0.0.11"
26
26
  }
@@ -14,4 +14,7 @@ export const testRuleSet = {
14
14
  '@typescript-eslint/no-magic-numbers': 'off'
15
15
  }
16
16
  };
17
+ export const testSupportConfig = {
18
+ rules: { ...testRuleSet.rules }
19
+ };
17
20
  //# sourceMappingURL=test-base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-base.js","sourceRoot":"","sources":["../../../../../configs/presets/test-base/test-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,MAAM,sBAAsB,GAAG,gBAAgB,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAA4B,CAAC;AAE1G,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,KAAK,EAAE;QACH,oBAAoB,EAAE;YAClB,OAAO;YACP;gBACI,GAAG,sBAAsB;gBACzB,aAAa,EAAE,IAAI;aACtB;SACJ;QACD,6CAA6C,EAAE,KAAK;QACpD,kBAAkB,EAAE,KAAK;QACzB,qCAAqC,EAAE,KAAK;KAC/C;CACJ,CAAC"}
1
+ {"version":3,"file":"test-base.js","sourceRoot":"","sources":["../../../../../configs/presets/test-base/test-base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,MAAM,sBAAsB,GAAG,gBAAgB,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAA4B,CAAC;AAE1G,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,KAAK,EAAE;QACH,oBAAoB,EAAE;YAClB,OAAO;YACP;gBACI,GAAG,sBAAsB;gBACzB,aAAa,EAAE,IAAI;aACtB;SACJ;QACD,6CAA6C,EAAE,KAAK;QACpD,kBAAkB,EAAE,KAAK;QACzB,qCAAqC,EAAE,KAAK;KAC/C;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,KAAK,EAAE,EAAE,GAAG,WAAW,CAAC,KAAK,EAAE;CACN,CAAC"}
package/readme.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@enormora/eslint-config-test-base?label=)](https://www.npmjs.com/package/@enormora/eslint-config-test-base)
4
4
 
5
- Shared rule set used by the test-framework presets (`@enormora/eslint-config-ava`, `@enormora/eslint-config-mocha`, `@enormora/eslint-config-vitest`). It tweaks a few rules from the base preset to be more lenient inside test files.
5
+ Shared relaxations for test code. The framework presets (`@enormora/eslint-config-ava`, `@enormora/eslint-config-mocha`, `@enormora/eslint-config-vitest`) consume this package transitively and apply these relaxations on top of their framework-specific rules.
6
6
 
7
- This package is consumed transitively through one of the test-framework presets and is not intended to be used directly.
7
+ This package also exposes `testSupportConfig` for direct use on test-related files that are not themselves test files, e.g. test helpers, mocks, fixtures, or setup files. It applies the same relaxations as the framework presets without enabling any framework-specific rules.
8
+
9
+ ## Usage
10
+
11
+ ```javascript
12
+ import { baseConfig } from '@enormora/eslint-config-base';
13
+ import { testSupportConfig } from '@enormora/eslint-config-test-base';
14
+
15
+ export default [
16
+ ...baseConfig,
17
+ {
18
+ ...testSupportConfig,
19
+ files: [ '**/test/helpers/**', '**/test/fixtures/**', '**/test/mocks/**' ]
20
+ }
21
+ ];
22
+ ```
23
+
24
+ The same `testSupportConfig` is re-exported from each framework preset, so projects that already depend on `@enormora/eslint-config-mocha`, `@enormora/eslint-config-ava`, or `@enormora/eslint-config-vitest` can import it from there without adding a direct dependency on this package.
package/sbom.cdx.json CHANGED
@@ -9,41 +9,41 @@
9
9
  {
10
10
  "type": "application",
11
11
  "name": "packtory",
12
- "version": "0.0.33"
12
+ "version": "0.0.34"
13
13
  }
14
14
  ]
15
15
  },
16
16
  "component": {
17
17
  "type": "library",
18
18
  "name": "@enormora/eslint-config-test-base",
19
- "version": "0.0.9",
20
- "bom-ref": "pkg:npm/@enormora/eslint-config-test-base@0.0.9",
21
- "purl": "pkg:npm/@enormora/eslint-config-test-base@0.0.9"
19
+ "version": "0.0.11",
20
+ "bom-ref": "pkg:npm/@enormora/eslint-config-test-base@0.0.11",
21
+ "purl": "pkg:npm/@enormora/eslint-config-test-base@0.0.11"
22
22
  }
23
23
  },
24
24
  "components": [
25
25
  {
26
26
  "type": "library",
27
27
  "name": "@enormora/eslint-config-base",
28
- "version": "0.0.40",
29
- "bom-ref": "pkg:npm/@enormora/eslint-config-base@0.0.40",
28
+ "version": "0.0.41",
29
+ "bom-ref": "pkg:npm/@enormora/eslint-config-base@0.0.41",
30
30
  "scope": "optional",
31
31
  "licenses": [
32
32
  {
33
33
  "expression": "MIT"
34
34
  }
35
35
  ],
36
- "purl": "pkg:npm/@enormora/eslint-config-base@0.0.40"
36
+ "purl": "pkg:npm/@enormora/eslint-config-base@0.0.41"
37
37
  }
38
38
  ],
39
39
  "dependencies": [
40
40
  {
41
- "ref": "pkg:npm/@enormora/eslint-config-base@0.0.40"
41
+ "ref": "pkg:npm/@enormora/eslint-config-base@0.0.41"
42
42
  },
43
43
  {
44
- "ref": "pkg:npm/@enormora/eslint-config-test-base@0.0.9",
44
+ "ref": "pkg:npm/@enormora/eslint-config-test-base@0.0.11",
45
45
  "dependsOn": [
46
- "pkg:npm/@enormora/eslint-config-base@0.0.40"
46
+ "pkg:npm/@enormora/eslint-config-base@0.0.41"
47
47
  ]
48
48
  }
49
49
  ]