eslint-config-gorgon
v4.0.8
Published
> [!NOTE] > Stable and ready for use.
Readme
eslint-config-gorgon
[!NOTE] Stable and ready for use.
An opinionated ESLint configuration that integrates Prettier, TypeScript, React, and more. Designed for modern stacks.
Features
- Auto-detection: Automatically enables React, TypeScript, and Node.js rules based on your project dependencies.
- Performance: Uses dynamic imports to load only the necessary plugins, keeping startup fast.
- Integrated Prettier: Runs Prettier as an ESLint rule with Tailwind CSS support built-in.
- Modern: Built for ESLint Flat Config (
eslint.config.mjs).
Install
pnpm i -D eslint-config-gorgonUsage
Create eslint.config.mjs in your project root:
Minimal (Auto-detect)
import { init } from "eslint-config-gorgon";
export default init();With Options
import { init } from "eslint-config-gorgon";
export default init({
// Enable/disable specific features (defaults to auto-detect)
react: true,
typescript: true,
node: false,
// Other options
a11y: true, // Enable accessibility rules (default: true)
prettier: true, // Enable Prettier integration (default: true)
ignores: ["**/temp/**"], // Add custom ignores
});Options
| Option | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| react | boolean | Auto-detect | Enable React and React Hooks rules. |
| typescript | boolean | Auto-detect | Enable TypeScript rules. |
| node | boolean | Auto-detect | Enable Node.js specific rules. |
| a11y | boolean | true | Enable JSX accessibility rules. |
| prettier | boolean | true | Enable Prettier integration (includes Tailwind CSS support). |
| ignores | string[] | [] | Custom glob patterns to ignore. |
VS Code Setup
Update your .vscode/settings.json to ensure ESLint runs correctly:
{
"prettier.enable": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
]
}And install the VS Code ESLint extension.
License
MIT
