0.3.0 • Published 4 days ago

eslint-config-reperio v0.3.0

Weekly downloads
-
License
-
Repository
github
Last release
4 days ago

eslint-config-reperio

This is a sharable ESLint configuration for Reperio. It is based on the following packages:

Getting started

  1. Install the package and peer dependencies:
npm install --save-dev eslint-config-reperio eslint@8 prettier
  1. Add the following to your .eslintrc.json file:
{
  "extends": "reperio"
}
  1. Add npm run lint and npm run format scripts to package.json since most of the rules are automatically fixable.
{
  "scripts": {
    "lint": "eslint . --ignore-path .gitignore",
    "format": "eslint . --fix --ignore-path .gitignore"
  }
}

Editor integration

It's recommended to install the ESLint and Prettier extensions for your editor. For VS Code, you can install the ESLint extension and Prettier extension.

It is also recommended to enable "Format On Save". Here is an example configuration for VS Code's settings.json:

{
  "[javascript]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint",
    "editor.formatOnSave": false
  },
  "[javascriptreact]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint",
    "editor.formatOnSave": false
  },
  "[typescript]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint",
    "editor.formatOnSave": false
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint",
    "editor.formatOnSave": false
  },
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  },
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnPaste": true,
  "editor.formatOnSave": true,
  "eslint.codeActionsOnSave.rules": null,
  "eslint.format.enable": true
}

Disabling rules

The perfectionist rules are faily opinionated for sorting, so you can disable them as needed, e.g.:

// eslint-disable-next-line perfectionist/sort-objects
const helloWorld = { b: 2, a: 1 }
0.3.0

4 days ago

0.2.2

5 days ago

0.2.1

6 days ago

0.2.0

6 days ago

0.1.1

26 days ago

0.1.0

26 days ago