@enormora/eslint-config-vitest-node-assert 0.0.1 → 0.0.2
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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [2023]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
2
|
+
"author": "Mathias Schreck <schreck.mathias@gmail.com>",
|
|
3
|
+
"contributors": [
|
|
4
|
+
{
|
|
5
|
+
"email": "github@echooff.de",
|
|
6
|
+
"name": "Christian Rackerseder"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@enormora/eslint-config-node-assert": "0.0.2",
|
|
11
|
+
"@enormora/eslint-config-vitest": "0.0.33"
|
|
12
|
+
},
|
|
13
|
+
"description": "Enormora’s ESLint Vitest configuration with node:assert rules",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./presets/vitest-node-assert/vitest-node-assert.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"name": "@enormora/eslint-config-vitest-node-assert",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git://github.com/enormora/eslint-config.git"
|
|
24
|
+
},
|
|
25
|
+
"type": "module",
|
|
26
|
+
"version": "0.0.2"
|
|
27
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { nodeAssertConfig } from "@enormora/eslint-config-node-assert";
|
|
2
|
+
import { testSupportConfig as baseTestSupportConfig, vitestConfig } from "@enormora/eslint-config-vitest";
|
|
3
|
+
export const vitestNodeAssertConfig = {
|
|
4
|
+
...vitestConfig,
|
|
5
|
+
plugins: {
|
|
6
|
+
...vitestConfig.plugins,
|
|
7
|
+
...nodeAssertConfig.plugins
|
|
8
|
+
},
|
|
9
|
+
rules: {
|
|
10
|
+
...vitestConfig.rules,
|
|
11
|
+
...nodeAssertConfig.rules
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export const testSupportConfig = {
|
|
15
|
+
...baseTestSupportConfig,
|
|
16
|
+
plugins: {
|
|
17
|
+
...baseTestSupportConfig.plugins,
|
|
18
|
+
...nodeAssertConfig.plugins
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
...baseTestSupportConfig.rules,
|
|
22
|
+
...nodeAssertConfig.rules
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=vitest-node-assert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest-node-assert.js","sourceRoot":"","sources":["../../../../../configs/presets/vitest-node-assert/vitest-node-assert.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE/F,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,GAAG,YAAY;IACf,OAAO,EAAE;QACL,GAAG,YAAY,CAAC,OAAO;QACvB,GAAG,gBAAgB,CAAC,OAAO;KAC9B;IACD,KAAK,EAAE;QACH,GAAG,YAAY,CAAC,KAAK;QACrB,GAAG,gBAAgB,CAAC,KAAK;KAC5B;CACwB,CAAC;AAE9B,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,GAAG,qBAAqB;IACxB,OAAO,EAAE;QACL,GAAG,qBAAqB,CAAC,OAAO;QAChC,GAAG,gBAAgB,CAAC,OAAO;KAC9B;IACD,KAAK,EAAE;QACH,GAAG,qBAAqB,CAAC,KAAK;QAC9B,GAAG,gBAAgB,CAAC,KAAK;KAC5B;CACwB,CAAC"}
|
package/readme.md
CHANGED
|
@@ -1,7 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@enormora/eslint-config-vitest-node-assert`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
can subsequently be configured for it. It contains no real package content and is published already
|
|
5
|
-
deprecated.
|
|
3
|
+
[](https://www.npmjs.com/package/@enormora/eslint-config-vitest-node-assert)
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Config preset for projects that use Vitest together with Node.js `node:assert`.
|
|
6
|
+
|
|
7
|
+
## Install & Setup
|
|
8
|
+
|
|
9
|
+
Install the `@enormora/eslint-config-vitest-node-assert` and the base preset package via npm:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install --save-dev @enormora/eslint-config-base @enormora/eslint-config-vitest-node-assert
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Create an ESLint configuration file (e.g., `eslint.config.js`) in your project and add the base and Vitest node assert config to the configuration array:
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
import { baseConfig } from '@enormora/eslint-config-base';
|
|
19
|
+
import { vitestNodeAssertConfig } from '@enormora/eslint-config-vitest-node-assert';
|
|
20
|
+
|
|
21
|
+
export default [
|
|
22
|
+
{
|
|
23
|
+
ignores: [ 'dist/**/*' ]
|
|
24
|
+
},
|
|
25
|
+
...baseConfig,
|
|
26
|
+
{
|
|
27
|
+
...vitestNodeAssertConfig,
|
|
28
|
+
files: [ '**/*.test.js' ]
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## `testSupportConfig`
|
|
34
|
+
|
|
35
|
+
This package also exports `testSupportConfig` for test-related files that are not themselves test files (helpers, mocks, fixtures, setup). It applies the shared test relaxations and Node.js `node:assert` rules without enabling any `@vitest/*` rules or Vitest globals.
|
|
36
|
+
|
|
37
|
+
```javascript
|
|
38
|
+
import { testSupportConfig, vitestNodeAssertConfig } from '@enormora/eslint-config-vitest-node-assert';
|
|
39
|
+
|
|
40
|
+
export default [
|
|
41
|
+
{
|
|
42
|
+
...vitestNodeAssertConfig,
|
|
43
|
+
files: [ '**/*.test.js' ]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
...testSupportConfig,
|
|
47
|
+
files: [ '**/test/helpers/**', '**/test/fixtures/**', '**/test/mocks/**' ]
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
```
|
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.58"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"component": {
|
|
17
|
+
"type": "library",
|
|
18
|
+
"name": "@enormora/eslint-config-vitest-node-assert",
|
|
19
|
+
"version": "0.0.2",
|
|
20
|
+
"bom-ref": "pkg:npm/@enormora/eslint-config-vitest-node-assert@0.0.2",
|
|
21
|
+
"purl": "pkg:npm/@enormora/eslint-config-vitest-node-assert@0.0.2"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"components": [
|
|
25
|
+
{
|
|
26
|
+
"type": "library",
|
|
27
|
+
"name": "@enormora/eslint-config-node-assert",
|
|
28
|
+
"version": "0.0.2",
|
|
29
|
+
"bom-ref": "pkg:npm/@enormora/eslint-config-node-assert@0.0.2",
|
|
30
|
+
"scope": "required",
|
|
31
|
+
"licenses": [
|
|
32
|
+
{
|
|
33
|
+
"expression": "MIT"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"purl": "pkg:npm/@enormora/eslint-config-node-assert@0.0.2"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "library",
|
|
40
|
+
"name": "@enormora/eslint-config-vitest",
|
|
41
|
+
"version": "0.0.33",
|
|
42
|
+
"bom-ref": "pkg:npm/@enormora/eslint-config-vitest@0.0.33",
|
|
43
|
+
"scope": "required",
|
|
44
|
+
"licenses": [
|
|
45
|
+
{
|
|
46
|
+
"expression": "MIT"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"purl": "pkg:npm/@enormora/eslint-config-vitest@0.0.33"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"dependencies": [
|
|
53
|
+
{
|
|
54
|
+
"ref": "pkg:npm/@enormora/eslint-config-node-assert@0.0.2"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"ref": "pkg:npm/@enormora/eslint-config-vitest-node-assert@0.0.2",
|
|
58
|
+
"dependsOn": [
|
|
59
|
+
"pkg:npm/@enormora/eslint-config-node-assert@0.0.2",
|
|
60
|
+
"pkg:npm/@enormora/eslint-config-vitest@0.0.33"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"ref": "pkg:npm/@enormora/eslint-config-vitest@0.0.33"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|