Skip to content

VLTHellolin/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

192 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

@hellolin-eslint/config πŸ“

NPM Version GitHub Action

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.

Usage

pnpm install -D eslint @hellolin-eslint/config

In your eslint.config.js (or .ts):

import defineConfig from '@hellolin-eslint/config';

export default defineConfig();

Customization

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-config

Alternatively you can run the lint command once, and the CLI will prompt you to install missing dependencies automatically.

Editor support

VSCode

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

Acknowledgements

This project is inspired by @antfu/eslint-config, @sxzz/eslint-config, and eslint-config-sukka.

License

Released under the MIT License.

Copyright Β© 2025 hellolin. All rights reserved.

About

πŸ“ Opinionated ESLint config for frontend developers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors