8000 Add `pre-commit` config for `eslint` by mattkram · Pull Request #259 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 20 commits into from
May 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace extends with contents
When running pre-commit, we cannot resolve the import
  • Loading branch information
mattkram committed May 7, 2022
commit 780ad9e1891e7a0104c992c136757234307725f0
10 changes: 9 additions & 1 deletion pyscriptjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"extends": "@tsconfig/svelte/tsconfig.json",
"$schema": "https://json.schemastore.org/tsconfig",
Copy link
Contributor Author

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.

"display": "Svelte",
"_version": "3.0.0",

"include": ["src/**/*"],
"exclude": ["node_modules/*", "__sapper__/*", "public/*"],
Expand All @@ -21,6 +23,12 @@
/** Requests the runtime types from the svelte modules by default. Needed for TS files or else you get errors. */
"types": ["svelte"],

/**
TypeScript doesn't know about import usages in the template because it only sees the
script of a Svelte file. Therefore preserve all value imports. Requires TS 4.5 or higher.
*/
"preserveValueImports": true,

"strict": false,
"esModuleInterop": true,
"skipLibCheck": true,
Expand Down
0