Skip to content

Commit

Permalink
Moved eslint section of readme to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
wrenhawth committed Jul 26, 2024
1 parent 22d5364 commit 96a7de6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 31 deletions.
31 changes: 0 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,3 @@ OctoLooper separates the creative process for creating a short musical loop into
## Credits and Thanks
* Sample sounds were sourced from the freely available [Ultimate Boom Bap Drum Kit](https://soundpacks.com/free-sound-packs/ultimate-boom-bap-drum-kit/) and [Sample Pi](https://github.com/alex-esc/sample-pi) sample packs.
* <a href="https://www.freepik.com/free-vector/psychedelic-music-covers-60-s-70-s-style_9427916.htm#query=ocean%20cartoon%20background&position=9&from_view=keyword&track=ais_user&uuid=aca952f8-2402-4097-a4b5-baabef368312https:/downloadscdn5.freepik.com/download_vector/jpg/0/23/9/9427/9427916_4173921.jpg?token=exp=1720163738~hmac=0e27451574c6f80e55e4c2f5a9db71fd">Background Image by freepik</a>

# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
30 changes: 30 additions & 0 deletions eslint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list

0 comments on commit 96a7de6

Please sign in to comment.