3.0.8 • Published 4 years ago

@seancroach/eslint-config-typescript v3.0.8

Weekly downloads
91
License
MIT
Repository
github
Last release
4 years ago

@seancroach/eslint-config-typescript

A shared ESLint configuration I use across my TypeScript projects.

Highlights

  • Enforces all the recommended TypeScript practices
  • Ensures your code adheres to the Prettier Style Guide
  • Lints your import statements to follow the best conventions
  • Applies best practices on ESLint directive comments such as /* eslint-disable */

Like many shared configurations, you could write all the configurations yourself, but why do that when it's already right here to use!

Installation

@seancroach/eslint-config-typescript has a few peer dependencies that have to be downloaded alongside it:

Install @seancroach/eslint-config-typescript and its peer dependencies through npm:

npm install --save-dev @seancroach/eslint-config-typescript eslint prettier typescript

Usage

You can configure ESlint a variety of ways; refer to the documentation here for more info.

I suggest to do your configurations from your package.json whenever possible to reduce the amount of dotfiles in your project. For example, in your package.json, do the following:

{
	"name": "my-cool-project",
	"eslintConfig": {
		"extends": "@seancroach/eslint-config-typescript"
	}
}

By default, @seancroach/eslint-config-typescript will look for a tsconfig.eslint.json file in your workspace directory. It is advised your tsconfig.eslint.json file looks like so:

{
	"extends": "<path to (root) tsconfig>",
	"compilerOptions": {
		// Ensure no one accidentally builds the "lint" project.
		"noEmit": true
	},
	"include": [
		// Include all TypeScript files.
		"**/*.ts"
	]
}

License

This package is available as open source under the terms of the MIT License.

3.0.8

4 years ago

3.0.7

5 years ago

3.0.6

5 years ago

3.0.5

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago