Skip to content

Latest commit

 

History

History
114 lines (78 loc) · 3.51 KB

README.md

File metadata and controls

114 lines (78 loc) · 3.51 KB

Social Card of ESLint Config

npm version GitHub Actions Commitizen friendly npm downloads

@ow3/eslint-config

Forked from @antfu/eslint-config

  • Single quotes, no semi
  • Auto fix for formatting (aimed to be used as standalone without Prettier)
  • Designed to work with TypeScript, Vue out-of-box (React opt-in)
  • Lint also for json, yaml, markdown
  • Sorted imports, dangling commas for cleaner commit diff
  • Reasonable defaults, best practices, only one-line of config
Changes in this fork
  • Improved component library linting & formatting
  • Stacks support
  • Laravel support
  • Other minor additions, i.e. no-constant-binary-expression usage

Usage

Install

pnpm add -D eslint @ow3/eslint-config

Config

Simply create a .eslintrc file in your project root with the following content:

{
  "extends": "@ow3"
}

Please note, you won't need a .eslintignore file as it is pre-defined via this preset.

ESLint Scripts

Simply add the following to your package.json:

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

VS Code Integration

Create .vscode/settings.json in your project root and add the following setting:

{
  "prettier.enable": false,
  "editor.formatOnSave": false,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}

Extended Reading

Learn more about the context - Why I don't use Prettier.

Check Also

📈 Changelog

Please see our releases page for more information on what has changed recently.

🏝 Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discussions on GitHub

For casual chit-chat with others using this package:

Join the Open Web Discord Server

📄 License

The MIT License (MIT). Please see LICENSE for more information.

Made with ❤️