You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: Adding eslint and prettier to toolchain options (#70)
As per [this](#36)
comment thread, I've added eslint+prettier as a toolchain option.
I've tested start configurations in the contributing guide and all looks
to be working.
[This](https://github.com/TanStack/config/blob/main/prettier.config.js)
was my source for the prettier config. I used the tanstack config as
implemented [here](https://tanstack.com/config/latest/docs/eslint) in
the docs. Let me know if anything looks off, or feel free to push
changes!
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Available options:
46
46
-`--template <type>`: Choose between `file-router`, `typescript`, or `javascript`
47
47
-`--tailwind`: Enable Tailwind CSS
48
48
-`--package-manager`: Specify your preferred package manager (`npm`, `yarn`, `pnpm`, `bun`, or `deno`)
49
-
-`--toolchain`: Specify your toolchain solution for formatting/linting (`biome`)
49
+
-`--toolchain`: Specify your toolchain solution for formatting/linting (`biome`, `eslint+prettier`)
50
50
-`--no-git`: Do not initialize a git repository
51
51
-`--add-ons`: Enable add-on selection or specify add-ons to install
52
52
@@ -102,6 +102,8 @@ Choose your preferred solution for formatting and linting either through the int
102
102
103
103
Setting this flag to `biome` will configure it as your toolchain of choice, adding a `biome.json` to the root of the project. Consult the [biome documentation](https://biomejs.dev/guides/getting-started/) for further customization.
104
104
105
+
Setting this flag to `eslint+prettier` will configure it as your toolchain of choice, adding an `eslint.config.js` and `prettier.config.js` to the root of the project, as well as a `.prettierignore` file. Consult the [eslint documentation](https://eslint.org/docs/latest/) and [prettier documentation](https://prettier.io/docs/) for further customization.
Copy file name to clipboardExpand all lines: templates/react/base/README.md.ejs
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -31,17 +31,20 @@ This project uses [Tailwind CSS](https://tailwindcss.com/) for styling.
31
31
<% } else { %>
32
32
This project uses CSSfor styling.
33
33
<% } %>
34
-
<%if (toolchain && toolchain ==='biome') { %>
34
+
<%if (toolchain && toolchain !=='none') { %>
35
35
## Linting & Formatting
36
+
<%if (toolchain ==='biome') { %>
36
37
This project uses [Biome](https://biomejs.dev/) for linting and formatting. The following scripts are available:
37
-
38
+
<% } %>
39
+
<%if (toolchain ==='eslint+prettier') { %>
40
+
This project uses [eslint](https://eslint.org/) and [prettier](https://prettier.io/) for linting and formatting. Eslint is configured using [tanstack/eslint-config](https://tanstack.com/config/latest/docs/eslint). The following scripts are available:
Copy file name to clipboardExpand all lines: templates/solid/base/README.md.ejs
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -195,6 +195,21 @@ Loaders simplify your data fetching logic dramatically. Check out more informati
195
195
196
196
Files prefixed with `demo` can be safely deleted. They are there to provide a starting point for you to play around with the features you've installed.
197
197
198
+
<%if (toolchain && toolchain !=='none') { %>
199
+
## Linting & Formatting
200
+
<%if (toolchain ==='biome') { %>
201
+
This project uses [Biome](https://biomejs.dev/) for linting and formatting. The following scripts are available:
202
+
<% } %>
203
+
<%if (toolchain ==='eslint+prettier') { %>
204
+
This project uses [eslint](https://eslint.org/) and [prettier](https://prettier.io/) for linting and formatting. Eslint is configured using [tanstack/eslint-config](https://tanstack.com/config/latest/docs/eslint). The following scripts are available:
205
+
<% } %>
206
+
```bash
207
+
<%= getPackageManagerRunScript('lint') %>
208
+
<%= getPackageManagerRunScript('format') %>
209
+
<%= getPackageManagerRunScript('check') %>
210
+
```
211
+
<% } %>
212
+
198
213
# Learn More
199
214
200
215
You can learn more about all of the offerings from TanStack in the [TanStack documentation](https://tanstack.com).
0 commit comments