Skip to content

Commit

Permalink
Merge pull request #24 from eslint-kit/feat/astro-and-eslint-update
Browse files Browse the repository at this point in the history
feat: add astro support and update minumum eslint version
  • Loading branch information
risen228 authored Oct 20, 2024
2 parents 1ebfde7 + 3e64e07 commit a275fd9
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 a275fd9

Please sign in to comment.