Skip to content

Fix: Integrate ESLint into build pipeline (OWASP#2647)#2828

Open
Adarshkumar0509 wants to merge 55 commits intoOWASP:masterfrom
Adarshkumar0509:fix/eslint-pipeline-v2
Open

Fix: Integrate ESLint into build pipeline (OWASP#2647)#2828
Adarshkumar0509 wants to merge 55 commits intoOWASP:masterfrom
Adarshkumar0509:fix/eslint-pipeline-v2

Conversation

@Adarshkumar0509
Copy link
Copy Markdown
Contributor

@Adarshkumar0509 Adarshkumar0509 commented Apr 16, 2026

Description

Integrates ESLint into the build pipeline as part of #2647.
Builds on #2675 which added the eslint-config-love configuration.

ESLint Integration (primary scope)

-Integrated eslint-config-love as replacement for ts-standard (incompatible with TypeScript 5.9.3)
-Added ESLint to the build pipeline via pnpm run lint in the build script
-Configured eslint.config.js with @typescript-eslint/no-unused-vars rules with _ prefix pattern
-Added coverage/ to ESLint ignore list to prevent linting auto-generated files

Bug fixes made during integration

-Fixed spacer.svelte CSS property was incorrectly renamed to _height (invalid CSS). Fixed by properly using the height prop via inline style.

-Removed dead code in creController.ts — if (!cre) block was unreachable due to || [] fallback

Test coverage improvements

-TypeScript/Website coverage: 93.28% → 95.45% (now passing) Added missing branch tests for mappingController.ts, creController.ts, and mapping API server
-Elixir/COPI coverage: 92.6% → 93.2% (pre-existing failure, still below 95% threshold)

fixed issue:#2647

AI Tool Disclosure

  • My contribution includes AI-generated content, as disclosed below:
    -AI Tools: Chatgpt
    -LLMs and versions: Chatgpt free version
    -Prompts: Assisted with identifying lint errors, fixing TypeScript/Svelte ,how to fix this error what is the easiest way to fix as i am doing manually.give some examples and help me in cleanup.
    -lint issues, and structuring the PR description.

Affirmation

- Added lint script to package.json
- Wired lint into the build pipeline
- Fixed ~300 lint errors across src files
- Used Claude (Anthropic) to assist with fixes

Pre-existing coverage threshold issue (93.28% vs 95%) exists on master and is not introduced by this PR.
@Adarshkumar0509 Adarshkumar0509 force-pushed the fix/eslint-pipeline-v2 branch from dc1e6d3 to e116285 Compare April 16, 2026 18:29
@Adarshkumar0509
Copy link
Copy Markdown
Contributor Author

Adarshkumar0509 commented Apr 17, 2026

hello @sydseter sir can you take a look at this whenever u have time or suggest me something in this ?
image

@Adarshkumar0509
Copy link
Copy Markdown
Contributor Author

@sydseter sir, can you review this .

@sydseter
Copy link
Copy Markdown
Collaborator

@Adarshkumar0509 Sorry, I didn’t make it and I see now there are conflicts again.

@Adarshkumar0509
Copy link
Copy Markdown
Contributor Author

hii @sydseter sir i think i have resolved the conflicts , whenever you have time please take a look.

@sydseter
Copy link
Copy Markdown
Collaborator

@Adarshkumar0509 Disable for now.

@Adarshkumar0509
Copy link
Copy Markdown
Contributor Author

hii, @sydseter it now passing including build-website and smoke tests. its really helpful if you review this .

@sydseter
Copy link
Copy Markdown
Collaborator

I am getting 21 404 issues when running the build:

[500] GET /edition/webapp/VE4/3.0/en
Error: Cannot use resolve(...) with a non-absolute pathname or route ID (got ""). resolve is only for internal pathnames and route IDs; external URLs should be used directly.
at resolve (file:///C:/Users/johan/src/cornucopia-Adarshkumar0509/cornucopia.owasp.org/.svelte-kit/output/server/chunks/server2.js:8:11)
at file:///C:/Users/johan/src/cornucopia-Adarshkumar0509/cornucopia.owasp.org/.svelte-kit/output/server/chunks/cardNotFound.js:314:46
at Renderer.child (file:///C:/Users/johan/src/cornucopia-Adarshkumar0509/cornucopia.owasp.org/.svelte-kit/output/server/chunks/renderer.js:599:20)
at Renderer.component (file:///C:/Users/johan/src/cornucopia-Adarshkumar0509/cornucopia.owasp.org/.svelte-kit/output/server/chunks/renderer.js:681:24)
at CapecMapTable (file:///C:/Users/johan/src/cornucopia-Adarshkumar0509/cornucopia.owasp.org/.svelte-kit/output/server/chunks/cardNotFound.js:294:14)
at file:///C:/Users/johan/src/cornucopia-Adarshkumar0509/cornucopia.owasp.org/.svelte-kit/output/server/chunks/cardNotFound.js:454:7
at Renderer.child (file:///C:/Users/johan/src/cornucopia-Adarshkumar0509/cornucopia.owasp.org/.svelte-kit/output/server/chunks/renderer.js:599:20)
at Renderer.component (file:///C:/Users/johan/src/cornucopia-Adarshkumar0509/cornucopia.owasp.org/.svelte-kit/output/server/chunks/renderer.js:681:24)
at WebAppCardTaxonomy (file:///C:/Users/johan/src/cornucopia-Adarshkumar0509/cornucopia.owasp.org/.svelte-kit/output/server/chunks/cardNotFound.js:333:14)
at file:///C:/Users/johan/src/cornucopia-Adarshkumar0509/cornucopia.owasp.org/.svelte-kit/output/server/chunks/cardNotFound.js:848:7

@sydseter
Copy link
Copy Markdown
Collaborator

I am also see some of the same issues I reported earlier:

E.g: I get 404 when navigating to http://localhost:3000/taxonomy/cheat-sheets-asvs-4.0.3/#V5.2-Sanitization-and-Sandboxing-Requirements

You can reproduce it by choosing the OWASP Cheat Sheets mapping from here: http://localhost:3000/edition/webapp/VEK/2.2/en#card

@Adarshkumar0509
Copy link
Copy Markdown
Contributor Author

Ok sir I will be fixing this just started working on it

@Adarshkumar0509
Copy link
Copy Markdown
Contributor Author

hii @sydseter , all things are addressed and also verified locally its working can you take a look at this ?please let me no if any changes are req because its important

@sydseter
Copy link
Copy Markdown
Collaborator

Issue is still there

Skjermbilde 2026-04-27 000739

@Adarshkumar0509
Copy link
Copy Markdown
Contributor Author

hii @sydseter whenever you have time please take a look.

Comment thread cornucopia.owasp.org/src/lib/utils/cache.ts Outdated
Comment thread cornucopia.owasp.org/src/lib/utils/cache.ts Outdated
Comment thread cornucopia.owasp.org/src/lib/utils/cache.ts Outdated
Comment thread cornucopia.owasp.org/src/lib/utils/cache.ts Outdated
Comment thread cornucopia.owasp.org/src/lib/utils/cache.ts Outdated
Comment thread cornucopia.owasp.org/src/routes/edition/[edition]/+page.svelte Outdated
Comment thread cornucopia.owasp.org/src/routes/edition/[edition]/+page.svelte Outdated
Comment thread cornucopia.owasp.org/src/routes/edition/[edition]/+page.svelte Outdated
Comment thread cornucopia.owasp.org/src/routes/edition/[edition]/+page.svelte Outdated
Comment thread cornucopia.owasp.org/src/routes/edition/[edition]/+page.svelte Outdated
@Adarshkumar0509
Copy link
Copy Markdown
Contributor Author

Adarshkumar0509 commented Apr 27, 2026

The corrupted characters were caused by encoding issues and have all been fixed. Please review when you have time.

@Adarshkumar0509
Copy link
Copy Markdown
Contributor Author

hii @sydseter, i have addressed all the things and fixed them all and verified locally as well please take a look on this.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants