Skip to content

Commit

Permalink
feat: add astro support and update minumum eslint version
Browse files Browse the repository at this point in the history
  • Loading branch information
risen228 committed Oct 20, 2024
1 parent 1ebfde7 commit 3e64e07
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 630 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@nestjs/schematics": "^8.0.0",
"@nestjs/testing": "^8.0.0",
"@types/axios": "^0.14.0",
"@types/eslint": "^8",
"@types/express": "^4.17.13",
"@types/inquirer": "^8.2.1",
"@types/jest": "27.5.0",
Expand Down
5 changes: 5 additions & 0 deletions src/modules/commands/init.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ export class InitCommand implements CommandRunner {
}
}

if (await this.meta.hasAstro()) {
presets.push(builder.preset('astro'))
extensions.add('astro')
}

if (await this.meta.hasNextJs()) {
presets.push(builder.preset('nextJs'))
directories.add('pages').add('app').add('lib')
Expand Down
4 changes: 4 additions & 0 deletions src/modules/meta/meta.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export class MetaService {
return this.hasRuntimeDependency('react')
}

public async hasAstro() {
return this.hasRuntimeDependency('astro')
}

public async hasNextJs() {
return this.hasRuntimeDependency('next')
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/versions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export enum Versions {
ESLintKitMajor = '11',
ESLintKit = '^11.0.0',
ESLint = '^8.56.0',
ESLint = '^8.57.0',
Prettier = '^3.0.0',
}
Loading

0 comments on commit 3e64e07

Please sign in to comment.