7.1.2 • Published 7 days ago

@rasmuslp/eslint-config v7.1.2

Weekly downloads
15
License
ISC
Repository
github
Last release
7 days ago

@rasmuslp/eslint-config

NPM package Github: CI CD

This configuration is based on eslint-config-airbnb-typescript, but with a few tweaks and most notibly:

  • indentation: tab

Configurations

This project provides both a JavaScript and a TypeScript configuration file. Defaults to TypeScript.

Installation

Install the config:

$ npm install --save-dev @rasmuslp/eslint-config

NB: For npm 6 the peer dependencies also needs to be installed manually.

See peer dependencies:

$ npm info "@rasmuslp/eslint-config@latest" peerDependencies

Automatically install peer dependencies:

$ npx install-peerdeps --dev @rasmuslp/eslint-config

Usage

Configure eslint in your project by extending this configuration in your local .eslintrc.json

{
	"root": true,
	"parserOptions": {
		"project": "./tsconfig.eslint.json"
	},
	"extends": [
		"@rasmuslp"
	]
}

The TypeScript config is utilized by certain rules that require type information.

To lint all project files, besides what the default tsconfig does, add tsconfig.eslint.json with:

{
	"extends": "./tsconfig.json",
	"include": ["./"]
}

Lastly, specify the minimum supported Node version in package.json to enable checks for using unsupported Node features.

	"engines": {
		"node": ">=18.18.0"
	}

TypeScript and React

Install additional dependencies

$ npm install --save-dev eslint-config-airbnb

Configure eslint in your project by extending this configuration in your local .eslintrc.json

{
	"root": true,
	"extends": [
		// Load broader rules first
		"airbnb",
		"airbnb-typescript",
		// Then override with more specific rule set
		"@rasmuslp/eslint-config/src/typescript-react"
	]
}

JavaScript

You can omit installing @typescript-eslint/eslint-plugin and typescript, but you will get warnings about missing peer dependencies.

Configure eslint in your project by extending this configuration in your local .eslintrc.json

{
	"root": true,
	"extends": "@rasmuslp/eslint-config/src/javascript"
}
7.1.2

7 days ago

7.1.1

27 days ago

7.1.0

27 days ago

7.1.0-1

27 days ago

7.1.0-0

28 days ago

7.0.0

2 months ago

6.0.1

3 months ago

6.0.0

3 months ago

6.0.0-7

4 months ago

6.0.0-6

5 months ago

6.0.0-5

6 months ago

6.0.0-3

8 months ago

6.0.0-4

7 months ago

6.0.0-1

9 months ago

6.0.0-2

9 months ago

6.0.0-0

9 months ago

5.23.0

1 year ago

5.21.0

1 year ago

5.22.1

1 year ago

5.22.0

1 year ago

5.19.0

1 year ago

5.20.0

1 year ago

5.18.0

1 year ago

5.17.0

1 year ago

5.15.0

1 year ago

5.13.0

2 years ago

5.11.0

2 years ago

5.16.0

1 year ago

5.8.0

2 years ago

5.6.0

2 years ago

5.14.0

1 year ago

5.12.0

2 years ago

5.10.0

2 years ago

5.9.0

2 years ago

5.7.0

2 years ago

5.5.0

2 years ago

5.4.0

2 years ago

5.3.0

2 years ago

5.0.0-0

2 years ago

5.2.0

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago

4.5.0

2 years ago

4.6.0

2 years ago

4.4.0

2 years ago

4.3.0

2 years ago

4.2.0

2 years ago

4.1.0

2 years ago

4.0.0-0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

3.2.0

3 years ago

3.2.0-0

3 years ago

3.1.0-0

3 years ago

3.1.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

3.0.0-1

3 years ago

3.0.0-0

3 years ago

2.0.0-17

3 years ago

2.0.0-16

3 years ago

2.0.0-15

3 years ago

2.0.0-14

3 years ago

2.0.0-13

3 years ago

2.0.0-12

3 years ago

2.0.0-11

4 years ago

2.0.0-10

4 years ago

2.0.0-9

4 years ago

2.0.0-8

4 years ago

2.0.0-6

4 years ago

2.0.0-5

4 years ago

2.0.0-7

4 years ago

2.0.0-3

4 years ago

2.0.0-2

4 years ago

2.0.0-1

4 years ago

2.0.0-0

4 years ago

1.2.1

5 years ago

1.2.0

5 years ago