Skip to content
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

add type checking #76

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module.exports = {

// #region ERB rules

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
22 changes: 20 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"lint:scripts": "eslint --ext .cjs,.js,.jsx,.ts,.tsx --cache .",
"lint:styles": "stylelint **/*.{css,scss}",
"lint-fix": "npm run lint-fix:scripts && npm run lint:styles -- --fix",
"lint-fix:scripts": "prettier --write \"**/*.{ts,tsx,js,jsx,cjs}\" && npm run lint:scripts"
"lint-fix:scripts": "prettier --write \"**/*.{ts,tsx,js,jsx,cjs}\" && npm run lint:scripts",
"typecheck": "tsc -p ./tsconfig.json"
},
"browserslist": [],
"peerDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-ignore: TS2307 - Cannot find module '@papi/backend' or its corresponding type declarations
import { logger } from '@papi/backend';

export async function activate() {
Expand Down
8 changes: 4 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
// Include default type declarations
"node_modules/@types",
// Include papi-dts type declarations (for papi.d.ts)
"../paranext-core/lib",
// "../paranext-core/lib",
// Include core extensions' type declarations
"../paranext-core/extensions/src",
// "../paranext-core/extensions/src",
// Include this extension's type declarations. It's in this location so there aren't any
// unexpected files there for typeRoots to include
"src/types",
"src/types"

/**
* Add extension repos' `src/types` folders here if you want to use local development type
Expand All @@ -48,7 +48,7 @@

// Include cached extension type declarations in case this extension needs to depend on them
// These are last, so any modules in the above typeRoots take precedence.
"../paranext-core/dev-appdata/cache/extension-types"
// "../paranext-core/dev-appdata/cache/extension-types"
],
// Papi exposes decorators for use in classes
"experimentalDecorators": true,
Expand Down