Skip to content

Commit bed59c7

Browse files
Switch to --moduleResolution bundler and --module preserve, remove @ts-ignore comments.
1 parent faedf5c commit bed59c7

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

config/build-chartcuterie.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import fs from 'node:fs/promises';
66
import path from 'node:path';
77
import {fileURLToPath} from 'node:url';
88

9-
// @ts-expect-error need to switch tsconfig to use module: esnext or es2020
109
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
1110
const workspaceRoot = path.resolve(scriptDir, '..');
1211
const packageJsonPath = path.join(workspaceRoot, 'package.json');

config/tsconfig.base.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
//
1515
// [0]: https://babeljs.io/docs/en/babel-preset-typescript
1616
// [1]: https://node.green
17-
"module": "commonjs",
17+
"module": "preserve",
1818
"target": "ES2022",
19-
"moduleResolution": "nodenext",
19+
"moduleResolution": "bundler",
2020

2121
// We add esnext to lib to pull in types for all newer ECMAScript features
2222
"lib": ["esnext", "dom", "dom.iterable"],

eslint.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ export default typescript.config([
167167
// https://typescript-eslint.io/packages/parser/#projectservice
168168
// `projectService` is recommended, but slower, with our current tsconfig files.
169169
projectService: true,
170-
// @ts-expect-error TS1343: The import.meta meta-property is only allowed when the --module option is es2020, es2022, esnext, system, node16, or nodenext
171170
tsconfigRootDir: import.meta.dirname,
172171
},
173172
},

0 commit comments

Comments
 (0)