3.1.0 • Published 7 months ago

@lasalefamine/eslint-config v3.1.0

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

CI npm

@lasalefamine/eslint-config

Complete ESlint configuration. Batteries included.

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.

3.0.3

10 months ago

3.1.0

7 months ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.2

4 years ago