From f2879fc29149c0a32973fa1ca78aa2a73af4cceb Mon Sep 17 00:00:00 2001 From: Luca Iachini Date: Fri, 22 Mar 2024 16:06:49 +0100 Subject: [PATCH] change ts config --- .gitignore | 2 +- jest.config.js | 5 ----- jest.config.json | 4 ++++ package.json | 28 +++++++++++----------------- tsconfig.json | 20 ++++++-------------- 5 files changed, 22 insertions(+), 37 deletions(-) delete mode 100644 jest.config.js create mode 100644 jest.config.json diff --git a/.gitignore b/.gitignore index 88edb62..b947077 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ node_modules/ -lib/ +dist/ diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 5ed1ed6..0000000 --- a/jest.config.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @type {import('ts-jest').JestConfigWithTsJest} */ -export default { - preset: 'ts-jest', - testEnvironment: 'node', -}; diff --git a/jest.config.json b/jest.config.json new file mode 100644 index 0000000..3de76d6 --- /dev/null +++ b/jest.config.json @@ -0,0 +1,4 @@ +{ + "preset": "ts-jest", + "roots": ["test", "src"] +} diff --git a/package.json b/package.json index 7a2d815..9c45d6c 100644 --- a/package.json +++ b/package.json @@ -1,23 +1,26 @@ { "name": "@luca-iachini/prettier-plugin-fluent", - "version": "1.0.4", + "version": "1.0.5", + "description": "Fluent Prettier Plugin", + "author": "Luca Iachini", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/luca-iachini/prettier-plugin-fluent.git" }, - "author": "Luca Iachini", + "homepage": "https://github.com/luca-iachini/prettier-plugin-fluent#readme", + "bugs": { + "url": "https://github.com/luca-iachini/prettier-plugin-fluent/issues" + }, "keywords": [ "prettier", "plugin", "fluent" ], - "description": "Fluent Prettier Plugin", - "type": "module", - "main": "./lib/index.js", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "exports": { - ".": "./lib/index.js", - "./parser": "./lib/parser.js" + ".": "./dist/index.js" }, "devDependencies": { "@changesets/cli": "^2.27.1", @@ -50,14 +53,5 @@ "peerDependencies": { "prettier": "^3.1.1" }, - "types": "./lib/index.d.ts", - "bugs": { - "url": "https://github.com/luca-iachini/prettier-plugin-fluent/issues" - }, - "homepage": "https://github.com/luca-iachini/prettier-plugin-fluent#readme", - "directories": { - "lib": "lib", - "test": "test" - }, - "files": ["./lib"] + "files": ["./dist"] } diff --git a/tsconfig.json b/tsconfig.json index 8c8aee8..d6f8ca4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,20 +1,12 @@ { "compilerOptions": { - "declaration": true, - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["esnext", "dom"], - "target": "esnext", - "outDir": "./lib", - "removeComments": true, - "inlineSourceMap": true, - "inlineSources": true, - "preserveConstEnums": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, + "target": "es5", + "baseUrl": "./", "strict": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true + "outDir": "./dist", + "esModuleInterop": true, + "moduleResolution": "node", + "declaration": true }, "include": ["src/**/*", "test/**/*"], "exclude": ["node_modules", "**/*.test.ts"]