Skip to content

Versatile eslint presets for modern JavaScript and TypeSript projects

License

Notifications You must be signed in to change notification settings

nberlette/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@brlt/eslint-config

  • Reasonable defaults for best-practices in only one-line of config
  • Single quotes, no semicolons
  • Auto fix for formatting (to be used standalone without Prettier)
  • TypeScript, Vue, React supported out-of-box (Svelte and Astro support is coming soon)
  • Supports json, yaml, markdown
  • Sorted imports and sorted package.json fields
  • Trailing Commas

Installation

pnpm add -D eslint @brlt/eslint-config




Add to your scripts in package.json

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

Configuration

There's no need to fuss with .eslintignore most of the time - the preset takes care of that.

The simplest way to integrate this with a project is to use the eslintConfig field in `package.json:


package.json

{
  "eslintConfig": {
    "extends": "@brlt"
  }
}

.eslintrc (json)

{
  "extends": "@brlt"
}

.eslintrc.js

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




Config VS Code auto fix

Create .vscode/settings.json if it doesn't already exist, and make sure you have the dbaeumer.vscode-eslint extension installed.

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




Other Projects




License

MIT

About

Versatile eslint presets for modern JavaScript and TypeSript projects

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published