@enormora/eslint-config-mocha 0.0.26 → 0.0.28

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
@@ -4,19 +4,21 @@
4
4
  "Christian Rackerseder <github@echooff.de>"
5
5
  ],
6
6
  "dependencies": {
7
+ "@enormora/eslint-config-test-base": "0.0.2",
7
8
  "eslint-plugin-mocha": "11.2.0"
8
9
  },
9
10
  "description": "Enormora’s ESLint mocha configuration",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./presets/mocha/mocha.js"
14
+ }
15
+ },
10
16
  "license": "MIT",
11
- "main": "mocha.js",
12
17
  "name": "@enormora/eslint-config-mocha",
13
- "peerDependencies": {
14
- "@enormora/eslint-config-base": "0.0.31"
15
- },
16
18
  "repository": {
17
19
  "type": "git",
18
20
  "url": "git://github.com/enormora/eslint-config.git"
19
21
  },
20
22
  "type": "module",
21
- "version": "0.0.26"
23
+ "version": "0.0.28"
22
24
  }
@@ -1,5 +1,5 @@
1
1
  import mochaPlugin from 'eslint-plugin-mocha';
2
- import { testRuleSet } from './rule-sets/test-rules.js';
2
+ import { testRuleSet } from '@enormora/eslint-config-test-base';
3
3
 
4
4
  export const mochaConfig = {
5
5
  plugins: {
@@ -18,22 +18,22 @@ export const mochaConfig = {
18
18
  'mocha/no-exports': 'error',
19
19
  'mocha/no-global-tests': 'error',
20
20
  'mocha/no-hooks': 'error',
21
- 'mocha/no-hooks-for-single-case': 'error',
21
+ 'mocha/no-hooks-for-single-case': 'off',
22
22
  'mocha/no-identical-title': 'error',
23
23
  'mocha/no-mocha-arrows': 'error',
24
24
  'mocha/no-nested-tests': 'error',
25
25
  'mocha/no-pending-tests': 'error',
26
26
  'mocha/no-return-and-callback': 'error',
27
27
  'mocha/no-return-from-async': 'off',
28
- 'mocha/no-setup-in-describe': 'error',
29
- 'mocha/no-sibling-hooks': 'error',
28
+ 'mocha/no-setup-in-describe': 'off',
29
+ 'mocha/no-sibling-hooks': 'off',
30
30
  'mocha/no-synchronous-tests': 'off',
31
- 'mocha/no-top-level-hooks': 'error',
31
+ 'mocha/no-top-level-hooks': 'off',
32
32
  'mocha/prefer-arrow-callback': 'off',
33
33
  'mocha/valid-suite-title': 'off',
34
34
  'mocha/valid-test-title': 'off',
35
35
  'mocha/consistent-spacing-between-blocks': 'error',
36
- 'mocha/consistent-interface': ['error', { interface: 'TDD' }]
36
+ 'mocha/consistent-interface': [ 'error', { interface: 'TDD' } ]
37
37
  },
38
38
  settings: {
39
39
  mocha: {
package/readme.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # `@enormora/eslint-config-mocha`
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@enormora/eslint-config-mocha?label=)](https://www.npmjs.com/package/@enormora/eslint-config-mocha)
4
+
3
5
  Config preset for `mocha`, enabling specific rules and configures global variables.
4
6
 
5
7
  ## Install & Setup
@@ -13,17 +15,17 @@ npm install --save-dev @enormora/eslint-config-base @enormora/eslint-config-moch
13
15
  Create an ESLint configuration file (e.g., `eslint.config.js`) in your project and add the base and mocha config to the configuration array:
14
16
 
15
17
  ```javascript
16
- import { baseConfig } from '@enormora/eslint-config-base';
17
- import { mochaConfig } from '@enormora/eslint-config-mocha';
18
+ import { baseConfig } from "@enormora/eslint-config-base";
19
+ import { mochaConfig } from "@enormora/eslint-config-mocha";
18
20
 
19
21
  export default [
20
- {
21
- ignores: ['dist/**/*']
22
- },
23
- baseConfig,
24
- {
25
- ...mochaConfig,
26
- files: ['**/*.test.js']
27
- }
22
+ {
23
+ ignores: ["dist/**/*"],
24
+ },
25
+ ...baseConfig,
26
+ {
27
+ ...mochaConfig,
28
+ files: ["**/*.test.js"],
29
+ },
28
30
  ];
29
31
  ```
package/sbom.cdx.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
3
+ "bomFormat": "CycloneDX",
4
+ "specVersion": "1.6",
5
+ "version": 1,
6
+ "metadata": {
7
+ "tools": {
8
+ "components": [
9
+ {
10
+ "type": "application",
11
+ "name": "packtory",
12
+ "version": "0.0.15"
13
+ }
14
+ ]
15
+ },
16
+ "component": {
17
+ "type": "library",
18
+ "name": "@enormora/eslint-config-mocha",
19
+ "version": "0.0.28",
20
+ "bom-ref": "pkg:npm/@enormora/eslint-config-mocha@0.0.28",
21
+ "purl": "pkg:npm/@enormora/eslint-config-mocha@0.0.28"
22
+ }
23
+ },
24
+ "components": [
25
+ {
26
+ "type": "library",
27
+ "name": "@enormora/eslint-config-test-base",
28
+ "version": "0.0.2",
29
+ "bom-ref": "pkg:npm/@enormora/eslint-config-test-base@0.0.2",
30
+ "scope": "required",
31
+ "licenses": [
32
+ {
33
+ "expression": "MIT"
34
+ }
35
+ ],
36
+ "purl": "pkg:npm/@enormora/eslint-config-test-base@0.0.2"
37
+ },
38
+ {
39
+ "type": "library",
40
+ "name": "eslint-plugin-mocha",
41
+ "version": "11.2.0",
42
+ "bom-ref": "pkg:npm/eslint-plugin-mocha@11.2.0",
43
+ "scope": "required",
44
+ "licenses": [
45
+ {
46
+ "expression": "MIT"
47
+ }
48
+ ],
49
+ "purl": "pkg:npm/eslint-plugin-mocha@11.2.0"
50
+ }
51
+ ],
52
+ "dependencies": [
53
+ {
54
+ "ref": "pkg:npm/@enormora/eslint-config-mocha@0.0.28",
55
+ "dependsOn": [
56
+ "pkg:npm/@enormora/eslint-config-test-base@0.0.2",
57
+ "pkg:npm/eslint-plugin-mocha@11.2.0"
58
+ ]
59
+ },
60
+ {
61
+ "ref": "pkg:npm/@enormora/eslint-config-test-base@0.0.2"
62
+ },
63
+ {
64
+ "ref": "pkg:npm/eslint-plugin-mocha@11.2.0"
65
+ }
66
+ ]
67
+ }
@@ -1,14 +0,0 @@
1
- import { stylisticRuleSet } from '@enormora/eslint-config-base/rule-sets/stylistic.js';
2
-
3
- export const testRuleSet = {
4
- rules: {
5
- '@stylistic/max-len': [
6
- 'error',
7
- {
8
- ...stylisticRuleSet.rules['@stylistic/max-len'][1],
9
- ignoreStrings: true
10
- }
11
- ],
12
- '@typescript-eslint/no-unsafe-type-assertion': 'off'
13
- }
14
- };