Skip to content

Commit 4cd1ff3

Browse files
authored
Update eslint (#495)
* chore: update @openally/config.eslint * chore: update @nodesecure/scanner (10.5.0 to 10.5.1)
1 parent c61da56 commit 4cd1ff3

6 files changed

Lines changed: 97 additions & 93 deletions

File tree

package.json

Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,79 @@
1-
{
2-
"name": "@nodesecure/report",
3-
"version": "4.1.1",
4-
"description": "NodeSecure HTML & PDF graphic security report",
5-
"main": "./dist/src/index.js",
6-
"type": "module",
7-
"bin": {
8-
"nreport": "./dist/bin/index.js"
9-
},
10-
"exports": {
11-
".": {
12-
"import": "./dist/src/index.js"
13-
}
14-
},
15-
"scripts": {
16-
"build": "tsc && npm run build:views && npm run build:public",
17-
"build:views": "rimraf dist/views && cp -r views dist/views",
18-
"build:public": "rimraf dist/public && cp -r public dist/public",
19-
"lint": "eslint src test bin scripts",
20-
"test-only": "node --test-reporter=spec --test ./test/**/*.spec.ts",
21-
"test": "c8 --all --src ./src -r html npm run test-only",
22-
"test:e2e": "node --env-file-if-exists=.env --test-reporter=spec --test ./test/**/*.e2e-spec.ts",
23-
"preview:light": "node --no-warnings ./scripts/preview.ts --theme light",
24-
"preview:dark": "node --no-warnings ./scripts/preview.ts --theme dark",
25-
"prepublishOnly": "npm run build"
26-
},
27-
"publishConfig": {
28-
"registry": "https://registry.npmjs.org",
29-
"access": "public",
30-
"provenance": true
31-
},
32-
"files": [
33-
"dist"
34-
],
35-
"repository": {
36-
"type": "git",
37-
"url": "git+https://github.com/NodeSecure/report.git"
38-
},
39-
"keywords": [
40-
"security",
41-
"report",
42-
"nodesecure",
43-
"pdf",
44-
"html",
45-
"chart"
46-
],
47-
"author": "NodeSecure",
48-
"license": "MIT",
49-
"bugs": {
50-
"url": "https://github.com/NodeSecure/report/issues"
51-
},
52-
"homepage": "https://github.com/NodeSecure/report#readme",
53-
"dependencies": {
54-
"@nodesecure/flags": "^3.0.3",
55-
"@nodesecure/ossf-scorecard-sdk": "^3.2.1",
56-
"@nodesecure/rc": "^5.0.0",
57-
"@nodesecure/scanner": "^10.0.0",
58-
"@nodesecure/utils": "^2.2.0",
59-
"@openally/mutex": "^2.0.0",
60-
"@topcli/spinner": "^4.0.0",
61-
"esbuild": "^0.27.0",
62-
"filenamify": "^7.0.0",
63-
"puppeteer": "^24.10.1",
64-
"sade": "^1.8.1",
65-
"zup": "0.0.2"
66-
},
67-
"devDependencies": {
68-
"@openally/config.eslint": "^2.1.0",
69-
"@openally/config.typescript": "1.2.1",
70-
"@types/node": "^25.0.0",
71-
"c8": "^11.0.0",
72-
"open": "^11.0.0",
73-
"rimraf": "^6.0.1",
74-
"typescript": "^5.7.2"
75-
},
76-
"engines": {
77-
"node": ">=24"
78-
}
79-
}
1+
{
2+
"name": "@nodesecure/report",
3+
"version": "4.1.1",
4+
"description": "NodeSecure HTML & PDF graphic security report",
5+
"main": "./dist/src/index.js",
6+
"type": "module",
7+
"bin": {
8+
"nreport": "./dist/bin/index.js"
9+
},
10+
"exports": {
11+
".": {
12+
"import": "./dist/src/index.js"
13+
}
14+
},
15+
"scripts": {
16+
"build": "tsc && npm run build:views && npm run build:public",
17+
"build:views": "rimraf dist/views && cp -r views dist/views",
18+
"build:public": "rimraf dist/public && cp -r public dist/public",
19+
"lint": "eslint src test bin scripts",
20+
"test-only": "node --test-reporter=spec --test ./test/**/*.spec.ts",
21+
"test": "c8 --all --src ./src -r html npm run test-only",
22+
"test:e2e": "node --env-file-if-exists=.env --test-reporter=spec --test ./test/**/*.e2e-spec.ts",
23+
"preview:light": "node --no-warnings ./scripts/preview.ts --theme light",
24+
"preview:dark": "node --no-warnings ./scripts/preview.ts --theme dark",
25+
"prepublishOnly": "npm run build"
26+
},
27+
"publishConfig": {
28+
"registry": "https://registry.npmjs.org",
29+
"access": "public",
30+
"provenance": true
31+
},
32+
"files": [
33+
"dist"
34+
],
35+
"repository": {
36+
"type": "git",
37+
"url": "git+https://github.com/NodeSecure/report.git"
38+
},
39+
"keywords": [
40+
"security",
41+
"report",
42+
"nodesecure",
43+
"pdf",
44+
"html",
45+
"chart"
46+
],
47+
"author": "NodeSecure",
48+
"license": "MIT",
49+
"bugs": {
50+
"url": "https://github.com/NodeSecure/report/issues"
51+
},
52+
"homepage": "https://github.com/NodeSecure/report#readme",
53+
"dependencies": {
54+
"@nodesecure/flags": "^3.0.3",
55+
"@nodesecure/ossf-scorecard-sdk": "^3.2.1",
56+
"@nodesecure/rc": "^5.0.0",
57+
"@nodesecure/scanner": "10.5.1",
58+
"@nodesecure/utils": "^2.2.0",
59+
"@openally/mutex": "^2.0.0",
60+
"@topcli/spinner": "^4.0.0",
61+
"esbuild": "^0.27.0",
62+
"filenamify": "^7.0.0",
63+
"puppeteer": "^24.10.1",
64+
"sade": "^1.8.1",
65+
"zup": "0.0.2"
66+
},
67+
"devDependencies": {
68+
"@openally/config.eslint": "2.4.2",
69+
"@openally/config.typescript": "1.2.1",
70+
"@types/node": "^25.0.0",
71+
"c8": "^11.0.0",
72+
"open": "^11.0.0",
73+
"rimraf": "^6.0.1",
74+
"typescript": "^5.7.2"
75+
},
76+
"engines": {
77+
"node": ">=24"
78+
}
79+
}

src/constants.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
// Import Node.js Dependencies
22
import path from "node:path";
3-
import { fileURLToPath } from "node:url";
43

54
// Import Third-party Dependencies
65
import * as rc from "@nodesecure/rc";
76

8-
// CONSTANTS
9-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
10-
117
export const DIRS = Object.freeze({
128
JSON: path.join(rc.homedir(), "json"),
139
CLONES: path.join(rc.homedir(), "clones"),
14-
PUBLIC: path.join(__dirname, "..", "public"),
15-
THEMES: path.join(__dirname, "..", "public", "css", "themes"),
16-
VIEWS: path.join(__dirname, "..", "views"),
10+
PUBLIC: path.join(import.meta.dirname, "..", "public"),
11+
THEMES: path.join(import.meta.dirname, "..", "public", "css", "themes"),
12+
VIEWS: path.join(import.meta.dirname, "..", "views"),
1713
REPORTS: path.join(process.cwd(), "reports")
1814
});

test/commands/execute.e2e-spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Import Node.js Dependencies
2-
import { fileURLToPath } from "node:url";
32
import path from "node:path";
43
import fs from "node:fs/promises";
54
import { afterEach, describe, it } from "node:test";
@@ -11,8 +10,7 @@ import { filterProcessStdout } from "../helpers/reportCommandRunner.ts";
1110
import * as CONSTANTS from "../../src/constants.ts";
1211

1312
// CONSTANTS
14-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
15-
const kProcessDir = path.join(__dirname, "../..");
13+
const kProcessDir = path.join(import.meta.dirname, "../..");
1614

1715
describe("Report execute command", () => {
1816
afterEach(async() => await fs.rm(CONSTANTS.DIRS.CLONES, {

test/commands/initialize.e2e-spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Import Node.js Dependencies
2-
import { fileURLToPath } from "node:url";
32
import fs from "node:fs";
43
import os from "node:os";
54
import path from "node:path";
@@ -11,8 +10,7 @@ import { stripVTControlCharacters } from "node:util";
1110
import { runProcess } from "../helpers/reportCommandRunner.ts";
1211

1312
// CONSTANTS
14-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
15-
const kBinDir = path.join(__dirname, "../..", "dist/bin/index.ts");
13+
const kBinDir = path.join(import.meta.dirname, "../..", "dist/bin/index.ts");
1614
const kProcessDir = os.tmpdir();
1715
const kConfigFilePath = path.join(kProcessDir, ".nodesecurerc");
1816

test/tsconfig.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"rootDir": "..",
5+
"noEmit": true
6+
},
7+
"include": [
8+
"../src",
9+
"."
10+
]
11+
}

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "@openally/config.typescript/esm-ts-next",
33
"compilerOptions": {
4-
"outDir": "dist"
4+
"outDir": "dist",
5+
"types": ["node"]
56
},
67
"include": [
78
"src",

0 commit comments

Comments
 (0)