Skip to content

Conversation

@leeland-turnkey
Copy link
Contributor

Add Prettier, ESLint, and Build Validation CI Checks

Adds CI checks for code quality and build validation:

Code Quality Checks

  • ESLint: Added ESLint configuration (.eslintrc.json) and lint scripts for export, import, and export-and-sign
  • Format Check: New CI job runs Prettier checks on the three folders
  • Lint Check: Separate CI job runs ESLint checks

NOTE:
I didn't fix any of the linting errors. I believe this can get done in a separate ticket.

Build Validation

  • Build Check: New CI job verifies that dist folders match committed versions after running npm run build
    • Only runs for webpack projects: import and export-and-sign
    • Catches cases where source code changes but dist wasn't rebuilt and committed

All checks run in parallel using matrix strategies for faster CI execution.

@socket-security
Copy link

socket-security bot commented Jan 8, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedeslint@​8.57.09610010050100
Addedeslint@​8.57.19710010050100

View full report

@andrewkmin
Copy link
Contributor

andrewkmin commented Jan 8, 2026

Going through these 1 by 1 (can be addressed in followup PR)

/home/runner/work/frames/frames/export-and-sign/src/event-handlers.js
Warning:     6:10  warning  'HpkeDecrypt' is defined but never used       no-unused-vars
- can simply be removed

Error:    59:7   error    Unexpected lexical declaration in case block  no-case-declarations
- just need to wrap switch case statements in {}

Error:   526:15  error    'onInjectWalletBundle' is not defined         no-undef
 - we can remove the `if (event.data && event.data["type"] == "INJECT_WALLET_EXPORT_BUNDLE")` case entirely

/home/runner/work/frames/frames/export-and-sign/src/turnkey-core.js
Error:   184:13  error    Do not access Object.prototype method 'hasOwnProperty' from target object  no-prototype-builtins
Error:   184:47  error    Do not access Object.prototype method 'hasOwnProperty' from target object  no-prototype-builtins
- just need to use a new/different method for these

Warning:   442:7   warning  'decoded' is assigned a value but never used                               no-unused-vars
- can remove

Error:   505:7   error    Unexpected lexical declaration in case block                               no-case-declarations
- just need to wrap switch case statements in {}

Warning:   512:7   warning  Unexpected console statement                                               no-console
- hm... not sure about this

Warning:   535:33  warning  'element' is defined but never used. Allowed unused args must match /^_/u  no-unused-vars
- can remove

Copy link
Contributor

@andrewkmin andrewkmin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏👏👏

_cloneInto(to) {
to || (to = Object.create(Object.getPrototypeOf(this), {}));
const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;
to = to;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a linting error about self assignment. It does look a little weird. I'll add them to the eslintignore file later!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this and oble-hashes are essentially vendored; we can ignore them from lint for now

@leeland-turnkey leeland-turnkey merged commit 251f863 into main Jan 9, 2026
23 checks passed
@leeland-turnkey leeland-turnkey deleted the leeland/eng-2940-frames-add-ci-checks branch January 9, 2026 16:41
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.

3 participants