Skip to content

Commit

Permalink
feat: (cspell-io) support ESM (#4261)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Mar 1, 2023
1 parent 7a47e72 commit 980dddc
Show file tree
Hide file tree
Showing 198 changed files with 560 additions and 785 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const config = {
},
},
{
files: ['vitest.config.*', '**/*.test.*'],
files: ['vitest.config.*', '**/*.test.*', '**/test.*'],
rules: {
'node/no-extraneous-import': 'off',
'node/no-extraneous-require': 'off',
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ lerna.json
packages/*/dist/
packages/cspell-bundled-dicts/cspell-default.config.js
test-fixtures/**
tsconfig*.json
**/cspell-bad.json
.yarn
.pnp.cjs
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
},
"scripts": {
"build": "tsc -p .",
"build-dev": "tsc -p tsconfig.dev.json",
"clean": "pnpm run clean-dist && pnpm run clean-repos",
"clean-dist": "shx rm -rf dist .tsbuildinfo",
"clean-repos": "shx rm -rf repositories/temp temp",
Expand All @@ -37,7 +36,6 @@
"devDependencies": {
"@cspell/cspell-bundled-dicts": "workspace:*",
"@cspell/dict-de-de": "^3.0.2",
"@types/node": "^18.14.2",
"@types/shelljs": "^0.8.11",
"cspell": "workspace:*",
"jest": "^29.4.3"
Expand Down
7 changes: 0 additions & 7 deletions integration-tests/tsconfig.dev.json

This file was deleted.

4 changes: 1 addition & 3 deletions integration-tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"outDir": "dist"
},
"include": [
"src"
]
"include": ["src"]
}
1 change: 0 additions & 1 deletion packages/cspell-bundled-dicts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"scripts": {
"build": "tsc -p .",
"build-dev": "tsc -p tsconfig.dev.json",
"build-dict": "cspell-tools-cli compile compatibility-words.txt",
"clean": "echo clean",
"clean-build": "pnpm run clean && pnpm run build",
Expand Down
7 changes: 0 additions & 7 deletions packages/cspell-bundled-dicts/tsconfig.dev.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/cspell-code-snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"scripts": {
"clean": "shx rm -rf dist coverage .tsbuildinfo",
"build": "tsc -p .",
"build-dev": "tsc -p tsconfig.dev.json",
"clean-build": "pnpm run clean && pnpm run build",
"coverage": "jest --coverage",
"test-watch": "jest --watch",
Expand Down
7 changes: 0 additions & 7 deletions packages/cspell-code-snippets/tsconfig.dev.json

This file was deleted.

4 changes: 1 addition & 3 deletions packages/cspell-code-snippets/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"outDir": "dist"
},
"include": [
"src"
]
"include": ["src"]
}
2 changes: 0 additions & 2 deletions packages/cspell-config-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
],
"scripts": {
"build": "tsc -p .",
"build-dev": "tsc -p tsconfig.dev.json",
"watch": "tsc -p . -w",
"clean": "shx rm -rf dist coverage .tsbuildinfo",
"clean-build": "pnpm run clean && pnpm run build",
Expand All @@ -49,7 +48,6 @@
"yaml": "^1.10.2"
},
"devDependencies": {
"@types/node": "^18.14.2",
"jest": "^29.4.3"
}
}
7 changes: 0 additions & 7 deletions packages/cspell-config-lib/tsconfig.dev.json

This file was deleted.

5 changes: 1 addition & 4 deletions packages/cspell-config-lib/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
"skipLibCheck": false,
"outDir": "dist"
},
"include": [
"src/**/*.ts",
"src/**/*.test.ts"
]
"include": ["src/**/*.ts", "src/**/*.test.ts"]
}
1 change: 0 additions & 1 deletion packages/cspell-dictionary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
],
"scripts": {
"build": "tsc -p .",
"build-dev": "tsc -p tsconfig.dev.json",
"watch": "tsc -p . -w",
"clean": "shx rm -rf dist temp coverage .tsbuildinfo",
"clean-build": "pnpm run clean && pnpm run build",
Expand Down
7 changes: 0 additions & 7 deletions packages/cspell-dictionary/tsconfig.dev.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/cspell-dynamic-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"scripts": {
"clean": "shx rm -rf dist coverage .tsbuildinfo",
"build": "pnpm run compile",
"build-dev": "tsc -p tsconfig.dev.json",
"clean-build": "pnpm run clean && pnpm run build",
"compile": "tsc -p .",
"test": "jest"
Expand Down
7 changes: 0 additions & 7 deletions packages/cspell-dynamic-loader/tsconfig.dev.json

This file was deleted.

5 changes: 1 addition & 4 deletions packages/cspell-dynamic-loader/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@
"compilerOptions": {
"outDir": "dist"
},
"include": [
"src/**/*.ts",
"src/**/*.test.ts"
]
"include": ["src/**/*.ts", "src/**/*.test.ts"]
}
1 change: 0 additions & 1 deletion packages/cspell-eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"devDependencies": {
"@types/eslint": "^8.21.1",
"@types/estree": "^1.0.0",
"@types/node": "^18.14.2",
"@typescript-eslint/parser": "^5.54.0",
"@typescript-eslint/types": "^5.54.0",
"@typescript-eslint/typescript-estree": "^5.54.0",
Expand Down
16 changes: 7 additions & 9 deletions packages/cspell-eslint-plugin/src/common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile":"../../dist/common/compile.tsbuildInfo",
"rootDir": ".",
"outDir": "../../dist/common"
},
"include": [
"."
]
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../dist/common/compile.tsbuildInfo",
"rootDir": ".",
"outDir": "../../dist/common"
},
"include": ["."]
}
16 changes: 7 additions & 9 deletions packages/cspell-eslint-plugin/src/plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile":"../../dist/plugin/compile.tsbuildInfo",
"rootDir": ".",
"outDir": "../../dist/plugin"
},
"include": [
"."
],
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../dist/plugin/compile.tsbuildInfo",
"rootDir": ".",
"outDir": "../../dist/plugin"
},
"include": ["."],
"references": [
{ "path": "../_auto_generated_/tsconfig.json" },
{ "path": "../common/tsconfig.json" },
Expand Down
20 changes: 8 additions & 12 deletions packages/cspell-eslint-plugin/src/worker/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile":"../../dist/worker/compile.tsbuildInfo",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../dist/worker/compile.tsbuildInfo",
"target": "ES2020",
"module": "ES2020",
"moduleResolution": "node16",
"rootDir": ".",
"outDir": "../../dist/worker"
},
"include": [
"."
],
"references": [
{ "path": "../common/tsconfig.json" }
]
"rootDir": ".",
"outDir": "../../dist/worker"
},
"include": ["."],
"references": [{ "path": "../common/tsconfig.json" }]
}
9 changes: 2 additions & 7 deletions packages/cspell-eslint-plugin/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@

// "noPropertyAccessFromIndexSignature": true,
"pretty": true,
"types": [
"node"
]
"types": ["node"]
},
"exclude": [
"dist",
"node_modules"
]
"exclude": ["dist", "node_modules"]
}
18 changes: 9 additions & 9 deletions packages/cspell-eslint-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile":"./dist/compile.tsbuildInfo"
},
"compilerOptions": {
"tsBuildInfoFile": "./dist/compile.tsbuildInfo"
},
"files": [],
"references": [
{ "path": "./src/_auto_generated_/tsconfig.json" },
{ "path": "./src/worker/tsconfig.json" },
{ "path": "./src/common/tsconfig.json" },
{ "path": "./src/plugin/tsconfig.json" }
]
"references": [
{ "path": "./src/_auto_generated_/tsconfig.json" },
{ "path": "./src/worker/tsconfig.json" },
{ "path": "./src/common/tsconfig.json" },
{ "path": "./src/plugin/tsconfig.json" }
]
}
5 changes: 1 addition & 4 deletions packages/cspell-gitignore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
],
"scripts": {
"build": "tsc -p .",
"build-dev": "tsc -p tsconfig.dev.json",
"watch": "tsc -p . -w",
"clean": "shx rm -rf dist coverage .tsbuildinfo",
"clean-build": "pnpm run clean && pnpm run build",
Expand All @@ -53,7 +52,5 @@
"cspell-glob": "workspace:*",
"find-up": "^5.0.0"
},
"devDependencies": {
"@types/node": "^18.14.2"
}
"devDependencies": {}
}
7 changes: 0 additions & 7 deletions packages/cspell-gitignore/tsconfig.dev.json

This file was deleted.

5 changes: 1 addition & 4 deletions packages/cspell-gitignore/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
"skipLibCheck": true,
"outDir": "dist"
},
"include": [
"src/**/*.ts",
"src/**/*.test.ts"
]
"include": ["src/**/*.ts", "src/**/*.test.ts"]
}
2 changes: 0 additions & 2 deletions packages/cspell-glob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
],
"scripts": {
"build": "tsc -p .",
"build-dev": "tsc -p tsconfig.dev.json",
"watch": "tsc -p . -w",
"clean": "shx rm -rf dist coverage .tsbuildinfo",
"clean-build": "pnpm run clean && pnpm run build",
Expand All @@ -47,7 +46,6 @@
},
"devDependencies": {
"@types/micromatch": "^4.0.2",
"@types/node": "^18.14.2",
"jest": "^29.4.3"
}
}
7 changes: 0 additions & 7 deletions packages/cspell-glob/tsconfig.dev.json

This file was deleted.

5 changes: 1 addition & 4 deletions packages/cspell-glob/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@
"compilerOptions": {
"outDir": "dist"
},
"include": [
"src/**/*.ts",
"src/**/*.test.ts"
]
"include": ["src/**/*.ts", "src/**/*.test.ts"]
}
2 changes: 0 additions & 2 deletions packages/cspell-grammar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
],
"scripts": {
"build": "tsc -p .",
"build-dev": "tsc -p tsconfig.dev.json",
"watch": "tsc -p . -w",
"clean": "shx rm -rf dist coverage .tsbuildinfo",
"clean-build": "pnpm run clean && pnpm run build",
Expand All @@ -65,7 +64,6 @@
"node": ">=14"
},
"devDependencies": {
"@types/node": "^18.14.2",
"jest": "^29.4.3"
},
"dependencies": {
Expand Down
7 changes: 0 additions & 7 deletions packages/cspell-grammar/tsconfig.dev.json

This file was deleted.

5 changes: 1 addition & 4 deletions packages/cspell-grammar/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@
"compilerOptions": {
"outDir": "dist"
},
"include": [
"src/**/*.ts",
"src/**/*.test.ts"
]
"include": ["src/**/*.ts", "src/**/*.test.ts"]
}
Loading

0 comments on commit 980dddc

Please sign in to comment.