eslint-config-temoncher

2.1.5 • Public • Published

eslint-config-temoncher

Personal set of super-strict eslint rules for various environments. The package is made so strict on purpose, to allow excluding unnecessary rules rather than adding new ones intentionally.

For even more strict rules visit Unicorn

Install config and core peer dependencies

Via npm:

npm i -D eslint eslint-config-temoncher

Via yarn:

yarn add -D eslint eslint-config-temoncher

Available configurations

JavaScript

Extension of eslint-config-airbnb-base.

  1. Install peer dependencies of the javascript package:

    Using npm:

    npm i -D eslint-plugin-import

    Using yarn:

    yarn add -D eslint-plugin-import
  2. Add "extends": "temoncher/javascript" to your .eslintrc

    {
      "extends": [
        "temoncher/javascript",
      ],
    };
    

TypeScript extends javascript

  1. Install peer dependencies of the javascript package

  2. Install typescript-eslint parser and plugin, along with peer dependencies of the typescript package:

    Using npm:

    npm i -D eslint-config-airbnb-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser

    Using yarn:

    yarn add -D eslint-config-airbnb-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser
  3. Configure typescript parser and add "extends": "temoncher/typescript" to your .eslintrc:

    {
      parserOptions: {
        parser: '@typescript-eslint/parser',
        project: ['./tsconfig.json'],
      },
      "extends": [
        "temoncher/typescript",
      ],
    };
    

React extends javascript

  1. Install peer dependencies of the javascript package

  2. Install peer dependencies of the react package:

    Using npm:

    npm i -D eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks

    Using yarn:

    yarn add -D eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks
  3. Add "extends": "temoncher/react" to your .eslintrc

    {
      "extends": [
        "temoncher/react",
      ],
    };
    

React-Typescript extends javascript, react, typescript

  1. Install peer dependencies of the javascript package

  2. Install peer dependencies of the react package

  3. Install peer dependencies of the typescript package

  4. Add "extends": "temoncher/react-typescript" to your .eslintrc

    {
      "extends": [
        "temoncher/react-typescript",
      ],
    };
    

Vue-cli extends javascript

⚠ WARNING: For Vue CLI projects only. This package expects you to have Vue CLI project with installed @vue/cli-plugin-eslint.

  1. Install peer dependencies of the javascript package

  2. Install peer dependencies of the vue package:

    Using npm:

    npm i -D eslint-plugin-vue @vue/eslint-config-airbnb

    Using yarn:

    yarn add -D eslint-plugin-vue @vue/eslint-config-airbnb
  3. Add "extends": "temoncher/vue-cli" to your .eslintrc

    {
      "extends": [
        "temoncher/vue-cli",
      ],
    };
    

Vue-Typescript extends javascript, vue-cli, typescript

⚠ WARNING: For Vue CLI projects only. This package expects you to have Vue CLI project with installed @vue/cli-plugin-eslint.

  1. Install peer dependencies of the javascript package

  2. Install peer dependencies of the vue-cli package

  3. Install latest versions of @typescript-eslint packages, to gain access to it's rules

    Using npm:

    npm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/eslint-config-typescript

    Using yarn:

    yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/eslint-config-typescript
  4. Add "extends": "temoncher/vue-cli-typescript" to your .eslintrc

    {
      "extends": [
        "temoncher/vue-cli-typescript",
      ],
    };
    

Package Sidebar

Install

npm i eslint-config-temoncher

Weekly Downloads

15

Version

2.1.5

License

MIT

Unpacked Size

19.6 kB

Total Files

19

Last publish

Collaborators

  • temoncher