- Perfectionist plugin - Enforces consistent sorting for objects, imports, TypeScript types, enums, JSX props, and more.
- Prettier plugin - Integrates Prettier with ESLint, reporting formatting issues as ESLint errors.
- React plugin - Provides linting rules for React applications.
- React Hooks plugin - Enforces the Rules of Hooks.
- React Refresh plugin - Ensures components support fast refresh updates.
- TailwindCSS plugin - Enforces best practices and consistency with Tailwind CSS.
- Unused Imports plugin - Detects and removes unused ES6 imports.
- React Refresh plugin - Ensures components are compatible with fast refresh updates.
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
// eslint.config.mjs
import node from 'eslint-config-nebula/node'
export default [
...node,
// Override any settings from the "eslint-config-nebula" config here
]
// eslint.config.mjs
import react from 'eslint-config-nebula/react'
export default [
...react,
// Override any settings from the "eslint-config-nebula" config here
]
// 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"
},