chore: add ESLint config and commands for linting JavaScript bindings.#248
Conversation
e6cb58f to
db0db0d
Compare
db0db0d to
ef552ce
Compare
There was a problem hiding this comment.
I pushed a commit to lean on pre-commit / prek and the pre-commit.ci service to run automated CI tests. Do you think this is okay @victor-linroth-sensmetry ?
I appreciate having prek catch issues before I even commit / push, and also to avoid burdening github runners which we are bottlenecking on whenever more than one PR is triggered.
Screencast.from.2026-03-31.14-39-18.webm
resolved by victor!
|
@consideRatio I don't care too much about exactly how things are run in the CI, but I'd like to have the option to run things manually as well. |
|
Okay nice, you can do that with
|
|
Are we intending to make |
With the commit I made, it became the streamlined way to run eslint locally. I initially added alongside the adding of eslint to a devDependency + script in package.json, allowing for npm install + npm run lint to work. I failed to avoid needing to duplicate eslint/globals dependencies then, and figured it was better to remove them from package.json and lean on prek + pre-commit.ci at that point, to avoid maintenance burden updating two sets of deps, and also avoiding having the github CI tests install eslint without using it. Should we add back the additions to package.json and document npm run lint as well? |
If we're not the point where we want to make |
|
I'd like pre-commit.ci to be used for anything related to lint/formatting, as it then aligns with doing it for prek/pre-commit locally. You see value in having npm run lint along the side - adding it back! |
|
Why was the config changed from ESM to CommonJS? ESM seems like the default choice for ESLint and the package is of type |
It was dor compatibility with prek/pre-commit, which installs node dependencies in other places than directly under a node modules subfolder. With .cjs file, a node path env var is respected, but not with a .mjs file. |
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
…ning chores Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: Erik Sundell <erik.sundell+2025@sensmetry.com>
This is provided alongside pre-commit doing it as well. Signed-off-by: Erik Sundell <erik.sundell+2025@sensmetry.com>
a9099fb to
3daa21a
Compare
No description provided.