Detalhes do pacote

@jessety/eslint-config

jessety463MIT2.4.1

ESLint config for TypeScript or JavaScript by @jessety

eslint, eslint-config, lint, linter

readme (leia-me)

@jessety/eslint-config

Yet another ESLint Shareable Config for TypeScript or JavaScript projects.

ci npm license

Install

```shell script npm install --save-dev eslint @jessety/eslint-config


## Usage

Shareable configs work by leveraging the [`extends`](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) feature in your [ESLint configuration](http://eslint.org/docs/user-guide/configuring). Once the package is installed, define `extends` to `@jessety`.

For example, a valid `.eslintrc.json` file could be:

```json
{
  "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 than base.
  • react - Rules for a React project
  • javascript - 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