diff --git a/eslint.config.mjs b/eslint.config.mjs index 997fe64..a597964 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -18,7 +18,17 @@ export default tseslint.config( tsconfigRootDir: import.meta.dirname, }, }, - } + }, /* --- Overrides --- */ + { + settings: { + 'import/resolver': { + typescript: { + alwaysTryTypes: true, + project: './tsconfig.json', + }, + }, + }, + } ); diff --git a/jest.config.mjs b/jest.config.mjs index 30f6993..f547571 100644 --- a/jest.config.mjs +++ b/jest.config.mjs @@ -7,6 +7,6 @@ export default { /* Overrides */ moduleNameMapper: { - // '^@src/(.*)$': '/src/$1', + '^@src/(.*)$': '/src/$1', }, }; diff --git a/package-lock.json b/package-lock.json index bb6874e..0882b50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "@vbetsch/config-prettier": "^1.0.0", "@vbetsch/config-tsconfig": "^1.0.1", "eslint-config-prettier": "^10.1.8", + "eslint-import-resolver-typescript": "^4.4.4", "eslint-plugin-import": "^2.32.0", "eslint-plugin-prettier": "^5.5.5" } @@ -2222,8 +2223,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@unrs/resolver-binding-linux-x64-musl": { "version": "1.11.1", @@ -2237,8 +2237,7 @@ "optional": true, "os": [ "linux" - ], - "peer": true + ] }, "node_modules/@vbetsch/config-eslint": { "version": "1.0.0", @@ -3215,7 +3214,6 @@ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "ms": "^2.1.3" }, @@ -3703,6 +3701,31 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-import-context": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/eslint-import-context/-/eslint-import-context-0.1.9.tgz", + "integrity": "sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-tsconfig": "^4.10.1", + "stable-hash-x": "^0.2.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-context" + }, + "peerDependencies": { + "unrs-resolver": "^1.0.0" + }, + "peerDependenciesMeta": { + "unrs-resolver": { + "optional": true + } + } + }, "node_modules/eslint-import-resolver-node": { "version": "0.3.10", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.10.tgz", @@ -3725,6 +3748,41 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-import-resolver-typescript": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.4.4.tgz", + "integrity": "sha512-1iM2zeBvrYmUNTj2vSC/90JTHDth+dfOfiNKkxApWRsTJYNrc8rOdxxIf5vazX+BiAXTeOT0UvWpGI/7qIWQOw==", + "dev": true, + "license": "ISC", + "dependencies": { + "debug": "^4.4.1", + "eslint-import-context": "^0.1.8", + "get-tsconfig": "^4.10.1", + "is-bun-module": "^2.0.0", + "stable-hash-x": "^0.2.0", + "tinyglobby": "^0.2.14", + "unrs-resolver": "^1.7.11" + }, + "engines": { + "node": "^16.17.0 || >=18.6.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-resolver-typescript" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-import-x": "*" + }, + "peerDependenciesMeta": { + "eslint-plugin-import": { + "optional": true + }, + "eslint-plugin-import-x": { + "optional": true + } + } + }, "node_modules/eslint-module-utils": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", @@ -4063,7 +4121,6 @@ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12.0.0" }, @@ -4830,6 +4887,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-bun-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz", + "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.7.1" + } + }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -6262,7 +6329,6 @@ "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", "dev": true, "license": "MIT", - "peer": true, "bin": { "napi-postinstall": "lib/cli.js" }, @@ -7152,7 +7218,6 @@ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", - "peer": true, "bin": { "semver": "bin/semver.js" }, @@ -7365,6 +7430,16 @@ "license": "BSD-3-Clause", "peer": true }, + "node_modules/stable-hash-x": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/stable-hash-x/-/stable-hash-x-0.2.0.tgz", + "integrity": "sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -7744,7 +7819,6 @@ "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" @@ -8137,7 +8211,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "napi-postinstall": "^0.3.0" }, diff --git a/package.json b/package.json index 9749f74..9a8e892 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "@vbetsch/config-prettier": "^1.0.0", "@vbetsch/config-tsconfig": "^1.0.1", "eslint-config-prettier": "^10.1.8", + "eslint-import-resolver-typescript": "^4.4.4", "eslint-plugin-import": "^2.32.0", "eslint-plugin-prettier": "^5.5.5" }, diff --git a/src/cypher.ts b/src/cypher.ts new file mode 100644 index 0000000..7e5b689 --- /dev/null +++ b/src/cypher.ts @@ -0,0 +1 @@ +export class Cypher {} diff --git a/tests/cypher.test.ts b/tests/cypher.test.ts index 00a152f..5367d71 100644 --- a/tests/cypher.test.ts +++ b/tests/cypher.test.ts @@ -1,3 +1,5 @@ +import { Cypher } from '@src/cypher'; + describe('Cypher', () => { it('should be OK', () => { const cypher: Cypher = new Cypher(); diff --git a/tsconfig.build.json b/tsconfig.build.json index 2e0617b..bcb13b1 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,10 +1,4 @@ { - "extends": ["./tsconfig.json", "@vbetsch/config-tsconfig/build/base"], - "compilerOptions": { - /* IMPORTANT: You have to define it ! */ - "outDir": "./dist/" - }, - /* Overrides */ "exclude": [ "**/*.spec.ts", "**/*.test.ts", @@ -12,5 +6,12 @@ "**/node_modules/**", "**/tests/**", "jest.config.ts" - ] + ], + "extends": ["./tsconfig.json", "@vbetsch/config-tsconfig/build/base"], + "compilerOptions": { + /* IMPORTANT: You have to define it ! */ + "outDir": "./dist/" + + /* Overrides */ + }, } diff --git a/tsconfig.json b/tsconfig.json index 246f81c..932d467 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,11 @@ { + "exclude": ["**/node_modules/**", "**/dist/**"], "extends": ["@vbetsch/config-tsconfig/base", "@vbetsch/config-tsconfig/strict"], /* Overrides */ "compilerOptions": { + "baseUrl": ".", "paths": { - // "@src/*": ["src/*"], + "@src/*": ["src/*"] } } }