Skip to content

Commit

Permalink
ESLINTJS-61 Move Typescript as peerDependency
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiez committed Dec 3, 2024
1 parent b4f521d commit b87aaa2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions generate-eslint-package-json.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ const eslintPluginDependencies = [
'minimatch',
'scslre',
'semver',
'typescript',
];

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

const mainPackageJson = JSON.parse(
await fs.readFile(join(dirname(fileURLToPath(import.meta.url)), 'package.json'), 'utf8'),
);
Expand All @@ -46,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 Expand Up @@ -82,7 +87,6 @@ await fs.writeFile(
dependencies,
peerDependencies: {
eslint: '^8.0.0 || ^9.0.0',
typescript: '>=5.0.0',
},
},
null,
Expand Down

0 comments on commit b87aaa2

Please sign in to comment.