https://github.com/rhannachi/eslint-config-prettier
Configure 🛠ESLint and Prettier for a React TypeScript project
https://github.com/rhannachi/eslint-config-prettier
eslint eslint-config eslint-prettier linter prettier react reactjs typescript
Last synced: 3 months ago
JSON representation
Configure 🛠ESLint and Prettier for a React TypeScript project
- Host: GitHub
- URL: https://github.com/rhannachi/eslint-config-prettier
- Owner: rhannachi
- License: mit
- Created: 2023-08-01T09:24:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-01T14:32:00.000Z (over 1 year ago)
- Last Synced: 2025-02-13T03:21:39.472Z (4 months ago)
- Topics: eslint, eslint-config, eslint-prettier, linter, prettier, react, reactjs, typescript
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@rhannachi/eslint-config-prettier
- Size: 149 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Configure 🛠ESLint and Prettier for a React/Next.js TypeScript project
```bash
npm i --dev @rhannachi/eslint-config-prettier
```* If you are using **React** add `@rhannachi/eslint-config-prettier` to the extends in your .eslintrc file:
```json
{
"extends": [
"@rhannachi/eslint-config-prettier"
]
}
```* If you are using **Next.js** add `@rhannachi/eslint-config-prettier/next` to the extends in your .eslintrc file:
```json
{
"extends": [
"@rhannachi/eslint-config-prettier/next"
]
}
```Extend your current config file tsconfig.json:
```json
{
"extends": "@rhannachi/eslint-config-prettier/tsconfig.json"
}
```* If you are using **React**:
```json
{
"scripts": {
"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "eslint . --fix --ext .ts,.tsx"
}
}
```* If you are using **Next.js**:
```json
{
"scripts": {
"lint": "next lint . --ext .ts,.tsx",
"lint:fix": "next lint . --fix --ext .ts,.tsx"
}
}
```