https://github.com/eruptionjs/config
Opinionated configuration for JavaScript/TypeScript projects. Prettier, ESLint, TypeScript and React.
https://github.com/eruptionjs/config
boilerplate eruptionjs eslint-config prettier-config
Last synced: 8 months ago
JSON representation
Opinionated configuration for JavaScript/TypeScript projects. Prettier, ESLint, TypeScript and React.
- Host: GitHub
- URL: https://github.com/eruptionjs/config
- Owner: eruptionjs
- License: mit
- Created: 2024-08-27T00:59:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-08T01:15:40.000Z (almost 2 years ago)
- Last Synced: 2024-09-29T01:06:31.749Z (over 1 year ago)
- Topics: boilerplate, eruptionjs, eslint-config, prettier-config
- Language: JavaScript
- Homepage:
- Size: 64.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @eruptionjs/config ⚙️
Opinionated configuration for projects using Prettier, ESLint, TypeScript and React.
## Installation
```bash
npm install --save-dev @eruptionjs/config
```
## usage
While you have full control over the configuration, you can use the settings in this project as a starting point for your own. In many cases, the default configurations may be all you need.
### Prettier configuration
Install `prettier` on your project, and add the eruptionjs configuration on your `package.json`:
```bash
npm install --save-dev prettier
```
**package.json**
```json
{
// ... Your existing configuration
"prettier": "@eruptionjs/config/prettier"
}
```
### TypeScript configuration
The Eruption TypeScript configuration extends the base TypeScript configuration with additional rules and settings.
To use the configuration, add the following to your `tsconfig.json` (create it if it doesn't exist):
```json
{
"extends": "@eruptionjs/config/typescript",
"include": ["@eruptionjs/reset.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
}
}
```
### ESLint configuration
The Eruption ESLint configuration extends the base ESLint configuration with additional rules and settings.
To use the configuration, install `eslint` on your project, and add the following to your `eslint.config.js` file (create it if it doesn't exist):
```bash
npm install --save-dev eslint
```
**eslint.config.js**
```js
import { config as defaultConfig } from '@eruptionjs/config/eslint'
/** @type {import("eslint").Linter.Config} */
export default [...defaultConfig]
```
### Biome configuration (Experimental 🧪)
Install `biome` on your project, and add the eruptionjs configuration on your `biome.json` file:
```bash
npm install --save-dev @biomejs/biome
```
**biome.json**
```json
{
"extends": "@eruptionjs/config/biome"
}
```
## License
MIT @ EruptionJS and its contributors.