Skip to content

Commit

Permalink
Fix typescript-checkJS script
Browse files Browse the repository at this point in the history
  • Loading branch information
aweebit committed Aug 13, 2023
1 parent 880b028 commit 3602ff2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 17 deletions.
2 changes: 2 additions & 0 deletions lib/suggestSimilar.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-check

const maxDistance = 3;

function editDistance(a, b) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"test": "jest && npm run test-typings",
"test-esm": "node ./tests/esm-imports-test.mjs",
"test-typings": "tsd",
"typescript-checkJS": "tsc --allowJS --checkJS index.js lib/*.js --noEmit",
"typescript-checkJS": "tsc -p tsconfig.checkJs.json",
"test-all": "npm run test && npm run lint && npm run typescript-checkJS && npm run test-esm"
},
"files": [
Expand Down
14 changes: 14 additions & 0 deletions tsconfig.checkJs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noImplicitAny": false,
"noImplicitThis": false
},
"include": [
"**/*.ts",
"index.js",
"lib/**/*.js"
]
}
34 changes: 18 additions & 16 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"types": [
"node",
"jest"
],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"include": ["**/*.ts"],
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"types": [
"node",
"jest"
],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"include": [
"**/*.ts"
]
}

0 comments on commit 3602ff2

Please sign in to comment.