5.0.0 • Published 10 months ago

@lasalefamine/eslint-config v5.0.0

Weekly downloads
8
License
MIT
Repository
github
Last release
10 months ago

CI npm

@lasalefamine/eslint-config

Complete ESlint configuration. Batteries included.

WARN

From version 5.0.0 we are using ESlint 9.

There are 3 ESLint configurations for your usage.

Our default export contains all of our ESLint rules, including ECMAScript 6+ and React. It requires eslint, eslint-plugin-import, eslint-plugin-simple-import-sort, eslint-plugin-react, eslint-plugin-react-hooks, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, typescript, and eslint-plugin-jsx-a11y. If you don't need React, see @lasalefamine/eslint-config-base.

Install

First install the dependencies:

yarn add --dev eslint eslint-plugin-import eslint-plugin-simple-import-sort eslint-plugin-react eslint-plugin-react-hooks @typescript-eslint/eslint-plugin @typescript-eslint/parser typescript eslint-plugin-jsx-a11y

Then add the config:

yarn add --dev @lasalefamine/eslint-config

Usage

@lasalefamine/eslint-config

Add to your .eslintrc

{
  "extends": "@lasalefamine/eslint-config",
  "parserOptions": {
    "project": "tsconfig.json"
  }
}

tsconfig.eslint.json

Create a new tsconfig.eslint.json files for overrides the include and exclude of your main tsconfig.json, so that ESLint will be able to lint everything without complaining:

{
  "extends": "./tsconfig.json",
  "exclude": [
    "node_modules"
  ],
  "include": [
    "**/*.js",
    "**/*.ts",
    "**/*.tsx"
  ]
}

And in your .eslintrc:

{
  "extends": "@lasalefamine/eslint-config",
  "parserOptions": {
    "project": "tsconfig.eslint.json"
  },
}

@lasalefamine/eslint-config/hooks

This entry point enables the linting rules for React hooks (requires v16.8+). To use add to your .eslintrc

{
  "extends": ["@lasalefamine/eslint-config", "@lasalefamine/eslint-config/hooks"]
  ...
}

@lasalefamine/eslint-config/a11y

This entry point enables the linting rules for React A11y. To use add to your .eslintrc

{
  "extends": ["@lasalefamine/eslint-config", "@lasalefamine/eslint-config/a11y"]
  ...
}

Develop

You can run tests with yarn test.

You can make sure this module lints with itself using yarn lint.

5.0.0

10 months ago

3.1.1

10 months ago

4.0.4

10 months ago

4.0.1

10 months ago

4.0.0

10 months ago

4.0.3

10 months ago

4.0.2

10 months ago

3.0.3

2 years ago

3.1.0

2 years ago

3.0.2

2 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.1

3 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.2

5 years ago