Skip to content

Commit

Permalink
[refactor] Type info, dev tools configs
Browse files Browse the repository at this point in the history
  • Loading branch information
amivanoff committed Jul 30, 2024
1 parent 6a5ec27 commit a34af8c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 20 deletions.
4 changes: 1 addition & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 6 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
2 changes: 1 addition & 1 deletion src/SparqlGenSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
8 changes: 4 additions & 4 deletions test/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down
6 changes: 3 additions & 3 deletions tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
}
Expand Down
6 changes: 0 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,13 @@
// 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,
// significant perf increase by skipping checking .d.ts files, particularly those in node_modules. Recommended by TS
"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
}
}

0 comments on commit a34af8c

Please sign in to comment.