0.3.1 • Published 1 year ago

@brzezinskimarcin/eslint-config v0.3.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@brzezinskimarcin/eslint-config 🎨

npm GitHub license

ESlint config based on antfu/eslint-config with the following differences:

Usage

Install

pnpm add -D eslint @brzezinskimarcin/eslint-config

Config .eslintrc.js

JavaScript:
module.exports = {
  extends: '@brzezinskimarcin'
}

You don't need .eslintignore normally as it has been provided by the preset.

TypeScript :
process.env.ESLINT_TSCONFIG = 'tsconfig.json';

module.exports = {
  extends: '@brzezinskimarcin'
}

It assumes your file with typescript configuration is named tsconfig.json.

Add script for package.json

For example:

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

Config VS Code auto fix

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

{
  "prettier.enable": false,
  "editor.formatOnSave": false,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}

License