Skip to content

chore: better eslint#228

Merged
andreabadesso merged 2 commits into
masterfrom
chore/better-eslint
Apr 7, 2025
Merged

chore: better eslint#228
andreabadesso merged 2 commits into
masterfrom
chore/better-eslint

Conversation

@andreabadesso
Copy link
Copy Markdown
Collaborator

@andreabadesso andreabadesso commented Apr 2, 2025

Motivation

The motivation for the changes in this PR is to fix ESLint issues in editors by ensuring each project gets the correct ESLint configuration. Currently, ESLint is failing because it is unable to correctly parse TypeScript files for each project.

Acceptance Criteria

  • Ensure ESLint correctly parses TypeScript files for the common, daemon, and wallet-service packages.
  • Update the Nix flake configuration to properly inherit nodePackages and configure the development shell.
  • Add TypeScript dependency to the project root
  • Introduce a new tsconfig.json in the root importing packages tsconfigs

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged.
  • Make sure either the unit tests and/or the QA tests are capable of testing the new features.
  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@andreabadesso andreabadesso self-assigned this Apr 2, 2025
@andreabadesso andreabadesso added the enhancement New feature or request label Apr 2, 2025
@andreabadesso andreabadesso moved this from Todo to In Progress (WIP) in Hathor Network Apr 2, 2025
@andreabadesso andreabadesso moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Apr 2, 2025
@andreabadesso andreabadesso requested review from r4mmer and tuliomir April 2, 2025 14:26
Comment thread flake.nix
devshell = {
startup = {
setup.text = ''
export PATH="$PWD/node_modules/.bin:$PWD/packages/daemon/node_modules/.bin:$PWD/packages/wallet-service/node_modules/.bin:$PATH"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

question(non-blocking): While I think adding the .bin folder to the path is a smart move, maybe it relies too much on the internal implementation of NodeJS.

What is our actual need for this export? Couldn't we just replace our usage of those binaries with npx myDependency, since npx is available since npm 8?

Copy link
Copy Markdown
Collaborator Author

@andreabadesso andreabadesso Apr 7, 2025

Choose a reason for hiding this comment

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

Yea, the idea here is to have typescript available in the path, so the LSP from the dev editor can use it

This it good so we don't have to install typescript globally (using npm)

Also, we are using yarn in this repository, so we shouldn't use npm here

@github-project-automation github-project-automation Bot moved this from In Progress (Done) to In Review (WIP) in Hathor Network Apr 7, 2025
@tuliomir tuliomir moved this from In Review (WIP) to In Review (Done) in Hathor Network Apr 7, 2025
@andreabadesso andreabadesso merged commit 71e233c into master Apr 7, 2025
1 check passed
@andreabadesso andreabadesso deleted the chore/better-eslint branch April 7, 2025 18:35
@github-project-automation github-project-automation Bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Apr 7, 2025
r4mmer added a commit that referenced this pull request Apr 7, 2025
…-lib-v2.1.1

* origin/master:
  chore: better eslint (#228)
@andreabadesso andreabadesso moved this from Waiting to be deployed to Done in Hathor Network May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants