12.0.1 • Published 7 months ago

@wezom/eslint-config-ts-react v12.0.1

Weekly downloads
217
License
BSD-3-Clause
Repository
github
Last release
7 months ago

@wezom/eslint-config-ts-react

ESLint shareable config React + TypeScript based on the @wezom/eslint-config-react and the @wezom/eslint-config-ts.

Rules

See full list of extends with code examples

Usage

We strongly recommend using this config with Prettier together.
See description.

Install

# base packages
npm i -D eslint babel-eslint eslint-config-prettier
# wezom configs
npm i -D @wezom/eslint-config @wezom/eslint-config-ts @wezom/eslint-config-ts-react

Setup linter
.eslintrc.json

{
	"root": true,
	"extends": ["@wezom/eslint-config", "eslint-config-prettier"],
	"parser": "babel-eslint",
	"overrides": [
		{
			"files": ["*.ts"],
			"extends": ["@wezom/eslint-config-ts", "eslint-config-prettier"],
			"parserOptions": {
				"project": "./tsconfig.json"
			}
		},
		{
			"files": ["*.tsx"],
			"extends": [
				"@wezom/eslint-config-ts-react",
				"eslint-config-prettier"
			],
			"parserOptions": {
				"project": "./tsconfig.json"
			}
		}
	]
}

Add npm scripts
package.json

{
	"scripts": {
		"test": "npm run prettier && npm run eslint",
		"eslint": "eslint src/**/*.{js,ts,tsx}",
		"eslint:autofix": "npm run eslint -- --fix",
		"prettier": "prettier src/ --check",
		"prettier:autofix": "npm run prettier -- --write"
	}
}

Test your files

npm run test
12.0.0

7 months ago

12.0.1

7 months ago

10.0.0

2 years ago

10.0.1

2 years ago

11.0.5

2 years ago

11.0.2

2 years ago

11.0.3

2 years ago

11.0.0

2 years ago

11.0.1

2 years ago

9.1.0

2 years ago

9.0.0

2 years ago

8.0.0

3 years ago

7.0.0

3 years ago

7.0.1

3 years ago

5.0.0-beta.0

3 years ago

6.0.0-beta.0

3 years ago

4.0.0-beta.0

3 years ago

3.0.0-beta.0

3 years ago

2.1.1-beta.0

3 years ago

2.1.0-beta.0

3 years ago

2.0.0-beta.0

3 years ago

1.0.1-beta.0

3 years ago

1.0.0-beta.0

3 years ago

0.6.0-beta.0

3 years ago