-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add pre-commit
config for eslint
#259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I've exhausted my efforts to get this working. Open for help from anyone who knows more about For reference, I have gotten so far as to have all the proper dependencies installed. However, with the project files as-is, I have two errors depending on whether this line is commented out or not. If it is commented out, this error is raised. /code/pyscriptjs/examples/mario/js/bcoin.js
0:0 error Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: examples/mario/js/bcoin.js.
The file must be included in at least one of the projects provided If it is not commented out, this error is raised. /Users/mkramer/dev/pyscript/pyscriptjs/src/interpreter.ts
0:0 error Parsing error: File '@tsconfig/svelte/tsconfig.json' not found |
Mmmm... does it work if you remove the Mario example? |
That doesn't affect it. $ pre-commit run eslint --files pyscriptjs/src/interpreter.ts |
Update: I'm very close and I think will be able to resolve this |
When running pre-commit, we cannot resolve the import
27b3979
to
780ad9e
Compare
for more information, see https://pre-commit.ci
🎉 Time to clean things up 🎉 |
This reverts commit cec87e9.
… mattkram/eslint-pre-commit
@@ -1,5 +1,7 @@ | |||
{ | |||
"extends": "@tsconfig/svelte/tsconfig.json", | |||
"$schema": "https://json.schemastore.org/tsconfig", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to replace this with values which were taken from the source npm
package: https://www.npmjs.com/package/@tsconfig/svelte
This is because, while the import could be found locally when packages were installed in node_modules
, it could not be found while pre-commit
was running.
@fpliger we can also potentially remove |
@mattkram +1 for removing it |
👍 Yeah, no harm duplicating |
* Add eslint config Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Adds
pre-commit
configuration foreslint
.In my efforts to get this to work, I was unable to resolve a missing import in
tsconfig.json
. I was able to resolve this by replacing theextends
field with three fields from the base template available at npm here.After many commits, it ends up being a very simple PR 😄