Skip to content

Commit

Permalink
ESLINTJS-61 Allow for wider margin of Typescript versions (#4983)
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiez authored Dec 3, 2024
1 parent 70428c3 commit 13066ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generate-eslint-package-json.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ const eslintPluginDependencies = [
'typescript',
];

const fixedVersions = {
typescript: '^5',
};

const mainPackageJson = JSON.parse(
await fs.readFile(join(dirname(fileURLToPath(import.meta.url)), 'package.json'), 'utf8'),
);
Expand All @@ -47,7 +51,7 @@ for (const [name, value] of Object.entries(mainPackageJson.dependencies).concat(
Object.entries(mainPackageJson.devDependencies),
)) {
if (eslintPluginDependencies.includes(name)) {
dependencies[name] = value;
dependencies[name] = fixedVersions[name] ?? value;
const i = missingDependencies.indexOf(name);
missingDependencies.splice(i, 1);
}
Expand Down

0 comments on commit 13066ab

Please sign in to comment.