diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 8bd937e..9941528 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -5,9 +5,7 @@ // List of extensions which should be recommended for users of this workspace. "recommendations": [ "yzhang.markdown-all-in-one", - "joaompinto.asciidoctor-vscode", - "cmstead.jsrefactor", - "eg2.vscode-npm-script", + "asciidoctor.asciidoctor-vscode", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "eamodio.gitlens", diff --git a/.vscode/settings.json b/.vscode/settings.json index 45268bf..84ea2dc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -79,8 +79,11 @@ ], "cSpell.language": "en,ru", "terminal.integrated.scrollback": 10000, - "jest.jestCommandLine": "yarn test", + "jest.jestCommandLine": "node_modules/.bin/jest --detectOpenHandles", "jest.runMode": "on-demand", - "jest.shell": "powershell", - "eslint.useFlatConfig": true + "jest.shell": "/bin/zsh", + "eslint.useFlatConfig": true, + "stylelint.packageManager": "pnpm", + "js/ts.implicitProjectConfig.module": "ES2022", + "js/ts.implicitProjectConfig.target": "ESNext", } diff --git a/src/SparqlGenSelect.ts b/src/SparqlGenSelect.ts index 5949444..37452dc 100644 --- a/src/SparqlGenSelect.ts +++ b/src/SparqlGenSelect.ts @@ -909,7 +909,7 @@ function genContextRecursive(entConstrs: EntConstrInternal[], index = 0): JsObje * @param ctxs */ function getPropFromCtxs(key: string, ctxs?: JsStrObjObj[]) { - let prop = undefined; + let prop: string | JsStrObjObj | undefined; if (ctxs) { for (let index = ctxs.length - 1; index > -1; index--) { const ctx = ctxs[index]; diff --git a/test/config.ts b/test/config.ts index 2d34dcd..743d09d 100644 --- a/test/config.ts +++ b/test/config.ts @@ -8,13 +8,13 @@ * SPDX-License-Identifier: GPL-3.0-only ********************************************************************************/ import { existsSync } from 'fs'; -import { env } from 'custom-env'; +import customEnv from 'custom-env'; -// emulate create-react-app behaviour witn .env files +// emulate create-react-app behavior with .env files if (existsSync('.env.test.local')) { - env('test.local'); + customEnv.env('test.local'); } else if (existsSync('.env.test')) { - env('test'); + customEnv.env('test'); } /** diff --git a/tsconfig-build.json b/tsconfig-build.json index 00c531c..e2da8d4 100644 --- a/tsconfig-build.json +++ b/tsconfig-build.json @@ -2,10 +2,10 @@ // see https://www.typescriptlang.org/tsconfig to better understand tsconfigs "extends": "./tsconfig", "include": ["src"], - "exclude": ["cypress", "es", "lib", "node_modules", "stories", "test"], + "exclude": ["es", "lib", "node_modules", "test"], "compilerOptions": { - "module": "es2020", - "target": "es2019", + "module": "es2022", + "target": "esnext", //"lib": ["dom", "dom.iterable", "esnext"] "types": [] } diff --git a/tsconfig.json b/tsconfig.json index b54618b..9a5448d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -31,11 +31,6 @@ // use Node's module resolution algorithm, instead of the legacy TS one "moduleResolution": "Bundler", "resolveJsonModule": true, - //"baseUrl": "./", - //"paths": { - // "*": ["src/*", "node_modules/*"] - //}, - //"jsx": "react", // interop between ESM and CJS modules. Recommended by TS "esModuleInterop": true, "isolatedModules": true, @@ -43,7 +38,6 @@ "skipLibCheck": true, // error out if import and file system have a casing mismatch. Recommended by TS "forceConsistentCasingInFileNames": true, - // `tsdx build` ignores this option, but it is commonly used when type-checking separately with `tsc` "noEmit": true } }