Opinionated ESLint config for frontend developers.
- 1 line of code === a pack of powerful rules that applies best practices and uses beautiful styles.
- Compose with your config easily using ESLint flat config.
- Designed to work smoothly with TypeScript, Node.js, Markdown, JSON, YAML, etc.
- Optionally load modules such as React, Next.js, UnoCSS, Storybook, etc.
- Format your source code comfortably using ESLint Stylistic.
pnpm install -D eslint @hellolin-eslint/configIn your eslint.config.js (or .ts):
import defineConfig from '@hellolin-eslint/config';
export default defineConfig();import defineConfig from '@hellolin-eslint/config';
export default defineConfig({
autoDetect: true,
javascript: {
env: {
browser: true,
webWorker: true,
},
},
typescript: true,
markdown: {
type: 'commonmark',
},
react: {
checkNonJSXFiles: true,
additionalHooks: ['useAbortableEffect'],
},
});Some modules are not included in the main package @hellolin-eslint/copnfig. To use React features, for example, you need to install an additional plugin:
pnpm install -D @hellolin-eslint/react-configAlternatively you can run the lint command once, and the CLI will prompt you to install missing dependencies automatically.
Make sure the ESLint extension is installed, then add the following settings to .vscode/settings.json:
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off", "fixable": true },
{ "rule": "format/*", "severity": "off", "fixable": true },
{ "rule": "perfectionist/*", "severity": "off", "fixable": true },
{ "rule": "json/sort-*", "severity": "off", "fixable": true },
{ "rule": "*-indent", "severity": "off", "fixable": true },
{ "rule": "*-spacing", "severity": "off", "fixable": true },
{ "rule": "*-spaces", "severity": "off", "fixable": true },
{ "rule": "*-order", "severity": "off", "fixable": true },
{ "rule": "*-dangle", "severity": "off", "fixable": true },
{ "rule": "*-newline", "severity": "off", "fixable": true },
{ "rule": "*quotes", "severity": "off", "fixable": true },
{ "rule": "*semi", "severity": "off", "fixable": true }
],
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"gql",
"graphql",
"css",
"less",
"scss",
"pcss",
"postcss"
]
}This project is inspired by @antfu/eslint-config, @sxzz/eslint-config, and eslint-config-sukka.
Released under the MIT License.
Copyright Β© 2025 hellolin. All rights reserved.