Skip to content

Commit 3811eb4

Browse files
fix: add credential icon and adopt official n8n-node-cli lint config
- Add icon property to ScraperNodeApi credential class (required by @n8n/community-nodes/icon-validation rule) - Copy credential SVG icons to credentials/ and dist/credentials/ - Install @n8n/node-cli and use its official ESLint config - Update eslint to 9.29 for compatibility with n8n-node-cli - Update lint:n8n script to use npx @n8n/node-cli lint
1 parent 6a30ac6 commit 3811eb4

7 files changed

Lines changed: 3107 additions & 83 deletions

File tree

‎credentials/ScraperNodeApi.credentials.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ export class ScraperNodeApi implements ICredentialType {
99
name = "scraperNodeApi";
1010
displayName = "ScraperNode API";
1111
documentationUrl = "https://scrapernode.com/docs/api";
12+
icon = {
13+
light: "file:scrapernode.svg",
14+
dark: "file:scrapernode.dark.svg",
15+
} as const;
1216

1317
properties: INodeProperties[] = [
1418
{

‎credentials/scrapernode.dark.svg‎

Lines changed: 9 additions & 0 deletions
Loading

‎credentials/scrapernode.svg‎

Lines changed: 9 additions & 0 deletions
Loading

‎eslint.config.mjs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { config } from "@n8n/node-cli/eslint";
2+
import { globalIgnores } from "eslint/config";
3+
4+
export default [...config, globalIgnores(["tests", "scripts", "vitest.config.ts"])];

‎package.json‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"dev:n8n:down": "docker compose -f docker-compose.dev.yml down",
8989
"dev:n8n:reset": "docker compose -f docker-compose.dev.yml down -v",
9090
"lint": "tsc --noEmit",
91-
"lint:n8n": "eslint --config eslint.n8n.config.mjs nodes/ credentials/",
91+
"lint:n8n": "npx @n8n/node-cli lint",
9292
"lint:n8n-scan": "eslint --config eslint.n8n-scan.config.mjs --max-warnings 0 'dist/**/*.js'",
9393
"test": "vitest run",
9494
"test:watch": "vitest",
@@ -98,7 +98,9 @@
9898
"n8n-workflow": "*"
9999
},
100100
"devDependencies": {
101+
"@eslint/js": "~9.29.0",
101102
"@n8n/eslint-plugin-community-nodes": "^0.9.0",
103+
"@n8n/node-cli": "^0.23.0",
102104
"@semantic-release/commit-analyzer": "^13.0.0",
103105
"@semantic-release/git": "^10.0.1",
104106
"@semantic-release/github": "^11.0.0",
@@ -107,7 +109,7 @@
107109
"@types/node": "^20",
108110
"@typescript-eslint/parser": "^8.54.0",
109111
"conventional-changelog-conventionalcommits": "^8.0.0",
110-
"eslint": "~9.17.0",
112+
"eslint": "~9.29.0",
111113
"eslint-plugin-n8n-nodes-base": "^1.16.6",
112114
"n8n-workflow": "^1.0.0",
113115
"semantic-release": "^25.0.3",

0 commit comments

Comments
 (0)