Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use @typescript-eslint/parser when react typescript #350

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 5 additions & 0 deletions .changeset/flat-buttons-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"generator-single-spa": patch
---

fix generator typescript root-config project use @typescript-eslint/parser as eslint parser
5 changes: 5 additions & 0 deletions .changeset/ten-monkeys-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"generator-single-spa": patch
---

fix generator react typescript application / parcel project use @typescript-eslint/parser as eslint parser
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ module.exports = class SingleSpaReactGenerator extends PnpmGenerator {
delete packageJson.devDependencies["webpack-config-single-spa"];
// Will be replaced by webpack-config-single-spa-react-ts
delete packageJson.devDependencies["webpack-config-single-spa-ts"];
// 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-react-important-stuff",<%} else { %>"react-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 @@ -23,6 +23,7 @@
"@babel/runtime": "^7.15.3",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@typescript-eslint/parser": "^5.13.0",
"babel-jest": "^27.0.6",
"concurrently": "^6.2.1",
"cross-env": "^7.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ module.exports = class SingleSpaRootConfigGenerator 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}-root-config.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
@@ -1,4 +1,4 @@
{
"extends": ["<% if (typescript) { %>ts-<% } %>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 @@ -16,6 +16,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",
"concurrently": "^6.2.1",
"cross-env": "^7.0.3",
"eslint": "^7.32.0",
Expand Down
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