Skip to content

lffg-labs/eslint-config-lffg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-config-lffg ✨💫

My personal ESLint configuration, which I use for almost all my projects. It is highly opinionated, and includes Prettier and TypeScript support by default.

🚀 Quick Start

Install it:

yarn add eslint eslint-config-lffg --dev

Add the following to your package.json:

"eslintConfig": {
  "extends": "lffg"
},
"scripts": {
  "lint": "yarn lint:raw .",
  "lint:fix": "yarn lint:raw --fix .",
  "lint:raw": "eslint --max-warnings=0 --ignore-path .gitignore"
}

Then, you will be able to run:

  • lint, to run the linter without correcting any problems;
  • lint:fix, to run the linter and correct all the fixable problems;
  • lint:raw, to run the linter with custom options. I personally use that in some CI environments.

⚙️ Custom Configurations

By default, eslint-config-lffg extends three subconfigurations, which are also included in this repository:

  • es, which lints ECMAScript (JavaScript) and TypeScript files;
  • react, which lints files that uses React.

If you are not using React, you may only extend the es configuration:

{
  "extends": "lffg/es"
}

📖 License

Copyright © 2019-current Luiz Felipe Gonçalves.
MIT Licensed.