Skip to content

HearthSim's common ESLint configuration with React support

License

Notifications You must be signed in to change notification settings

HearthSim/eslint-config-typescript-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@hearthsim/eslint-config-typescript-react

This repository contains the HearthSim common ESLint configuration with Typescript and React support.

For a version without React support use @HearthSim/eslint-config-typescript instead.

Setup

  1. Install
$ yarn add -D eslint @hearthsim/eslint-config-typescript-react
  1. Install ESLint plugins
    Plugins are resolved relative to the final project and must thus installed explicitly as part of the project:
$ yarn add -D \
              @typescript-eslint/eslint-plugin@^5.4.0 \
              [email protected] \
              [email protected] \
              [email protected] \
              [email protected]
  1. Configure ESLint:

Create or update your.eslintrc.js:

module.exports = {
	root: true,
	extends: ["@hearthsim/eslint-config-typescript-react"],
	env: {
		browser: true,
	},
};
  1. Add the scripts to your package.json:
{
	"scripts": {
		"lint:eslint": "eslint --cache ./"
	}
}

Philosophy

Zero tolerance for Errors false positives

If a rule is not able to handle the ways we legitimately use it, it needs to be downgraded to a warning. Errors are reserved for critical issues that can directly introduce security risks, break the application or lead to severe performance penalties.

About

HearthSim's common ESLint configuration with React support

Resources

License

Stars

Watchers

Forks

Packages

No packages published