Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
feat: add solid config
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolassutter committed Jan 15, 2024
1 parent 44445a8 commit 842544c
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 0 deletions.
8 changes: 8 additions & 0 deletions helpers/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ export function getConfigs(answers: ProgramAnswers) {
configs.push('alsacreations/typescript')
}

if (answers.solid && !answers.typescript) {
configs.push('alsacreations/solid')
}

if (answers.solid && answers.typescript) {
configs.push('alsacreations/solid-typescript')
}

if ((answers.vue || answers.nuxt) && answers.prettier) {
configs.push('alsacreations/prettier-vue')
}
Expand Down
1 change: 1 addition & 0 deletions helpers/deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export function getDeps(answers: ProgramAnswers) {
answers.typescript ? 'typescript' : undefined,
answers.prettier ? 'prettier' : undefined,
answers.astro && answers.prettier ? 'prettier-plugin-astro' : undefined,
answers.solid ? 'eslint-plugin-solid' : undefined,
// Prettier sans framework
!answers.vue && !answers.nuxt && answers.prettier
? 'eslint-config-prettier'
Expand Down
4 changes: 4 additions & 0 deletions helpers/questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const questions = [
name: 'typescript',
message: 'Do you use TypeScript ?',
},
{
name: 'solid',
message: 'Do you use Solid ?',
},
{
name: 'astro',
message: 'Do you use Astro ?',
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
"./vue-typescript": {
"require": "./dist/src/vue-typescript/index.js",
"types": "./dist/src/vue-typescript/index.d.ts"
},
"./solid": {
"require": "./dist/src/solid/index.js",
"types": "./dist/src/solid/index.d.ts"
},
"./solid-typescript": {
"require": "./dist/src/solid-typescript/index.js",
"types": "./dist/src/solid-typescript/index.d.ts"
}
},
"bin": "dist/bin/bin.js",
Expand Down
10 changes: 10 additions & 0 deletions src/solid-typescript/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from 'eslint-define-config'

function getConfig() {
return defineConfig({
plugins: ['solid'],
extends: ['plugin:solid/typescript'],
})
}

export = getConfig()
10 changes: 10 additions & 0 deletions src/solid/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from 'eslint-define-config'

function getConfig() {
return defineConfig({
plugins: ['solid'],
extends: ['plugin:solid/recommended'],
})
}

export = getConfig()

0 comments on commit 842544c

Please sign in to comment.