@enormora/eslint-config-mocha 0.0.25 → 0.0.27
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 +7 -5
- package/{mocha.js → presets/mocha/mocha.js} +6 -6
- package/readme.md +10 -10
- package/sbom.cdx.json +67 -0
- package/rule-sets/test-rules.js +0 -14
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.1",
|
|
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.30"
|
|
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.
|
|
23
|
+
"version": "0.0.27"
|
|
22
24
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import mochaPlugin from 'eslint-plugin-mocha';
|
|
2
|
-
import { testRuleSet } from '
|
|
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': '
|
|
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': '
|
|
29
|
-
'mocha/no-sibling-hooks': '
|
|
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': '
|
|
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
|
@@ -13,17 +13,17 @@ npm install --save-dev @enormora/eslint-config-base @enormora/eslint-config-moch
|
|
|
13
13
|
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
14
|
|
|
15
15
|
```javascript
|
|
16
|
-
import { baseConfig } from
|
|
17
|
-
import { mochaConfig } from
|
|
16
|
+
import { baseConfig } from "@enormora/eslint-config-base";
|
|
17
|
+
import { mochaConfig } from "@enormora/eslint-config-mocha";
|
|
18
18
|
|
|
19
19
|
export default [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
{
|
|
21
|
+
ignores: ["dist/**/*"],
|
|
22
|
+
},
|
|
23
|
+
...baseConfig,
|
|
24
|
+
{
|
|
25
|
+
...mochaConfig,
|
|
26
|
+
files: ["**/*.test.js"],
|
|
27
|
+
},
|
|
28
28
|
];
|
|
29
29
|
```
|
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.27",
|
|
20
|
+
"bom-ref": "pkg:npm/@enormora/eslint-config-mocha@0.0.27",
|
|
21
|
+
"purl": "pkg:npm/@enormora/eslint-config-mocha@0.0.27"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"components": [
|
|
25
|
+
{
|
|
26
|
+
"type": "library",
|
|
27
|
+
"name": "@enormora/eslint-config-test-base",
|
|
28
|
+
"version": "0.0.1",
|
|
29
|
+
"bom-ref": "pkg:npm/@enormora/eslint-config-test-base@0.0.1",
|
|
30
|
+
"scope": "required",
|
|
31
|
+
"licenses": [
|
|
32
|
+
{
|
|
33
|
+
"expression": "MIT"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"purl": "pkg:npm/@enormora/eslint-config-test-base@0.0.1"
|
|
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.27",
|
|
55
|
+
"dependsOn": [
|
|
56
|
+
"pkg:npm/@enormora/eslint-config-test-base@0.0.1",
|
|
57
|
+
"pkg:npm/eslint-plugin-mocha@11.2.0"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"ref": "pkg:npm/@enormora/eslint-config-test-base@0.0.1"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"ref": "pkg:npm/eslint-plugin-mocha@11.2.0"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
package/rule-sets/test-rules.js
DELETED
|
@@ -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
|
-
};
|