Skip to content

uvarovag/eslint-config-ts-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-config-ts-react

Shared ESLint 9 Flat configuration for TypeScript React projects.

Installation

To use this configuration in your project, install the required dependencies:

npm install --save-dev @uvarovag/eslint-config-ts-react eslint@^9.16.0

Usage

Step 1: Create a eslint.config.mjs file

import reactConfig from '@uvarovag/eslint-config-ts-react'

export default [...reactConfig]

Step 2: Run ESLint

npx eslint '**/*.{ts,tsx}' --fix

Use together with Prettier

Installation

To use this configuration in your project, install the necessary dependencies:

npm install --save-dev @uvarovag/prettier-config prettier

Step 1: Create a .prettierrc file

"@uvarovag/prettier-config"

Step 2: Format your code

npx prettier --write '**/*.{ts,tsx,js,json,css,html,md}'

Use Prettier and ESLint in Visual Studio Code

Step 1: Install Plugins

Step 2: Add the following to settings.json in VSCode

{
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "prettier.requireConfig": true,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": "explicit"
    },
    "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
    "eslint.experimental.useFlatConfig": true
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published