Skip to content

Commit

Permalink
docs: mention Solid support
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 8, 2024
1 parent 22193c4 commit e906a69
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new), compose easily!
- Using [ESLint Stylistic](https://github.com/eslint-stylistic/eslint-stylistic)
- Respects `.gitignore` by default
- Optional [React](#react), [Svelte](#svelte), [UnoCSS](#unocss), [Astro](#astro) support
- Optional [React](#react), [Svelte](#svelte), [UnoCSS](#unocss), [Astro](#astro), [Solid](#solid) support
- Optional [formatters](#formatters) support for CSS, HTML, etc.
- **Style principle**: Minimal for reading, stable for diff, consistent

Expand Down Expand Up @@ -482,6 +482,25 @@ Running `npx eslint` should prompt you to install the required dependencies, oth
npm i -D eslint-plugin-astro
```

#### Solid

To enable Solid support, you need to explicitly turn it on:

```js
// eslint.config.js
import antfu from '@antfu/eslint-config'

export default antfu({
solid: true,
})
```

Running `npx eslint` should prompt you to install the required dependencies, otherwise, you can install them manually:

```bash
npm i -D eslint-plugin-solid
```

#### UnoCSS

To enable UnoCSS support, you need to explicitly turn it on:
Expand Down
7 changes: 7 additions & 0 deletions src/cli/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export const frameworkOptions: PromItem<FrameworkOption>[] = [
label: c.magenta('Astro'),
value: 'astro',
},
{
label: c.cyan('Solid'),
value: 'solid',
},
{
label: c.blue('Slidev'),
value: 'slidev',
Expand Down Expand Up @@ -101,6 +105,9 @@ export const dependenciesMap = {
slidev: [
'prettier-plugin-slidev',
],
solid: [
'eslint-plugin-solid',
],
svelte: [
'eslint-plugin-svelte',
'svelte-eslint-parser',
Expand Down
2 changes: 1 addition & 1 deletion src/cli/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface PromItem<T> {
hint?: string
}

export type FrameworkOption = 'vue' | 'react' | 'svelte' | 'astro' | 'slidev'
export type FrameworkOption = 'vue' | 'react' | 'svelte' | 'astro' | 'solid' | 'slidev'

export type ExtraLibrariesOption = 'formatter' | 'unocss'

Expand Down

0 comments on commit e906a69

Please sign in to comment.