Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

An extremely opinionated eslint config

License

Notifications You must be signed in to change notification settings

explodingcamera/eslint-config

Repository files navigation

ESLint shareable config

Some Features

  • Mostly Autofixable
  • Prettier is run automatically (No extra config needed)
  • React/JSX + React Hooks support
  • Security Issue Detection
  • Enforces Promise best-practices
  • TypeScript support & much more

Install

$ npm install -D -E eslint @explodingcamera/eslint-config

(For typescript support, you need to have typescript installed too)

Usage

Install the eslint plugin for your editor and enable Fix-On-Save Then, add the ESLint config in your package.json:

{
	"name": "my-awesome-project",
	"eslintConfig": {
		"extends": "@explodingcamera/eslint-config"
	}
}

Or in .eslintrc.json:

{
	"extends": "@explodingcamera/eslint-config"
}

Now you can also use it via the eslint cli:

$ npx eslint --format=pretty file.js

Note for vs-code users:

Sometimes the vscode plugin can act up, I recommend updating your config:

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