Skip to content

Commit

Permalink
fix: use @typescript-eslint/parser when util typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
pmjhonwang committed Mar 2, 2022
1 parent 09217a8 commit 058abb1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/calm-colts-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"generator-single-spa": patch
---

fix generator util typescript project use @typescript-eslint/parser as eslint parser
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,13 @@ module.exports = class SingleSpaUtilModuleGenerator extends PnpmGenerator {
delete packageJson.devDependencies["eslint-config-important-stuff"];
// Will be replaced by webpack-config-single-spa-ts
delete packageJson.devDependencies["webpack-config-single-spa"];
// Will be replaced by @typescript-eslint/parser
delete packageJson.devDependencies["@babel/eslint-parser"];

packageJson.types = `dist/${this.options.orgName}-${this.options.projectName}.d.ts`;
} else {
// Will be replaced by @babel/eslint-parser
delete packageJson.devDependencies["@typescript-eslint/parser"];
}

this.fs.extendJSON(this.destinationPath("package.json"), packageJson);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<%if (typescript) { %>"ts-important-stuff",<%} else { %>"important-stuff",<% } %>
"plugin:prettier/recommended"
],
"parser": "@babel/eslint-parser"
"parser": <%if (typescript) { %>"@typescript-eslint/parser"<%} else { %>"@babel/eslint-parser"<% } %>
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@babel/runtime": "^7.15.3",
"@typescript-eslint/parser": "^5.13.0",
"babel-jest": "^27.0.6",
"concurrently": "^6.2.1",
"cross-env": "^7.0.3",
Expand Down

0 comments on commit 058abb1

Please # to comment.