@jessety/eslint-config
v2.4.1
Published
ESLint config for TypeScript or JavaScript by @jessety
Downloads
661
Maintainers
Readme
@jessety/eslint-config
Yet another ESLint Shareable Config for TypeScript or JavaScript projects.
Install
npm install --save-dev eslint @jessety/eslint-config
Usage
Shareable configs work by leveraging the extends
feature in your ESLint configuration. Once the package is installed, define extends
to @jessety
.
For example, a valid .eslintrc.json
file could be:
{
"extends": "@jessety"
}
The eslint-config
suffix may be omitted because it is assumed by ESLint.
Configurations
This package contains the following sharable configurations:
base
- Core rules for TypeScript node projects. Does not require TypeScript build. Fast.strict
- Stricter rules for TypeScript node projects. Requires type checking. Slower thanbase
.react
- Rules for a React projectjavascript
- ESLint rules for JavaScript projects
As of version 2.x.x, base
is the default export for .ts
files, and javascript
is the default for .js
, .mjs
, or .cjs
files. To request one or the other, specify which in the eslintrc
file. For example, a .eslintrc.json
file that uses react
configuration may look like this:
{
"extends": "@jessety/eslint-config/react"
}
A project that uses a mix of both TypeScript and JavaScript may look like this:
{
"overrides": [
{
"files": ["**/*.ts"],
"extends": "@jessety"
},
{
"files": ["**/*.{js,cjs,mjs}"],
"extends": "@jessety/eslint-config/javascript"
}
]
}
The base
and strict
configuration require typescript
and eslint
as peer dependencies. The javascript
configuration only requires eslint
.
License
MIT © Jesse Youngblood