Skip to content

Elevate JS, TS, and React with best practices for stellar code quality and consistency

Notifications You must be signed in to change notification settings

mayconfsousa/eslint-config-nebula

Repository files navigation

eslint-config-nebula

npm version

What's included?

Installation

npm add -D eslint eslint-config-nebula
pnpm add -D eslint eslint-config-nebula
yarn add -D eslint eslint-config-nebula
bun add -D eslint eslint-config-nebula

Configuration

Node

// eslint.config.mjs

import node from 'eslint-config-nebula/node'

export default [
  ...node,
  // Override any settings from the "eslint-config-nebula" config here
]

React

// eslint.config.mjs

import react from 'eslint-config-nebula/react'

export default [
  ...react,
  // Override any settings from the "eslint-config-nebula" config here
]

VS Code

// package.json

"scripts": {
  "lint": "eslint --fix && tsc --noEmit"
},

Recommend to use ESlint extension

// settings.json

"[javascript]": {
  "editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascriptreact]": {
  "editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
  "editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescriptreact]": {
  "editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"editor.codeActionsOnSave": {
  "source.fixAll": "explicit"
},