Skip to content

Latest commit

 

History

History
82 lines (63 loc) · 2.48 KB

README.md

File metadata and controls

82 lines (63 loc) · 2.48 KB

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"
},