2.2.2 β€’ Published 7 months ago

@vchikalkin/eslint-config-awesome v2.2.2

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

@vchikalkin/eslint-config-awesome πŸŽ‰

  • πŸ› οΈ Most rules autofixable
  • 🎯 Designed to work with TypeScript, NextJS, React projects
  • πŸ† Powered by Canonical, SonarJS
  • βš™οΈ Using ESLint Flat config

Requirements

πŸš€ Usage

πŸ“₯ Install

pnpm add -D eslint typescript @vchikalkin/eslint-config-awesome

βš™οΈ Config eslint.config.js

Common usage:

const config = require('@vchikalkin/eslint-config-awesome');

/** @type {import("eslint").Linter.Config} */
module.exports = config['react-typescript'];

Extend config:

const config = require('@vchikalkin/eslint-config-awesome');

/** @type {import("eslint").Linter.Config} */
module.exports = [
  ...config['react-typescript'],
  {
    rules: {
      'rule-name': 'off',
    },
    ignores: ['node_modules'],
  },
  //...other configs
];

βž• Add script for package.json

For example:

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

✨ Config VS Code auto fix

Install VS Code ESLint extension, VS Code Prettier extension and create .vscode/settings.json

{
  "editor.codeActionsOnSave": {
    "source.fixAll": "explicit",
    "source.fixAll.eslint": "explicit",
    "source.removeUnusedImports": "explicit"
  },
  "eslint.lintTask.enable": true,
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "json",
    "typescript",
    "typescriptreact",
    "yaml"
  ]
}

βš™οΈ Config .prettierrc:

Prettier is not needed, ESLint Config AwesomeπŸŽ‰ includes eslint-plugin-prettier with that config:

{
  "arrowParens": "always",
  "bracketSameLine": false,
  "bracketSpacing": true,
  "endOfLine": "auto",
  "insertPragma": false,
  "jsxSingleQuote": false,
  "printWidth": 100,
  "proseWrap": "preserve",
  "quoteProps": "as-needed",
  "requirePragma": false,
  "semi": true,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "all",
  "useTabs": false
}
2.3.0

7 months ago

2.2.2

7 months ago

2.2.1

9 months ago

2.2.0

9 months ago

2.1.0

9 months ago

2.0.6

10 months ago

2.0.3

10 months ago

2.0.2

10 months ago

2.0.5

10 months ago

2.0.4

10 months ago

2.0.1

10 months ago

2.0.0

10 months ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago