Skip to content

Commit

Permalink
fix: Jest global vars
Browse files Browse the repository at this point in the history
  • Loading branch information
vishal423 committed Sep 16, 2024
1 parent 05014f2 commit 8422e4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions generators/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ export default class extends ClientGenerator {
);
}
}
if (oldSvelteBlueprintVersion && lt(oldSvelteBlueprintVersion, '1.2.0')) {
this.removeFile(`.eslintrc.json`);
this.removeFile(`.eslintignore`);
}
},
async writingTemplateTask({ application }) {
await this.writeFiles({
Expand Down
7 changes: 3 additions & 4 deletions generators/client/templates/eslint.config.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@ export default [{
...globals.browser,
...globals.node,
...cypress.environments.globals.globals,
<%_ if (!this.blueprintConfig.jest) { _%>
<%_ if (this.blueprintConfig.jest) { _%>
"jest": true,
<%_ } else { _%>
vi: true,
<%_ } _%>
},

ecmaVersion: 2020,
sourceType: "module",
<%_ if (this.blueprintConfig.jest) { _%>
"jest": true,
<%_ } _%>
},

rules: {
Expand Down

0 comments on commit 8422e4c

Please sign in to comment.