2.0.2 • Published 4 months ago

@sunwise/eslint-config v2.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@sunwise/eslint-config npm

Flat ESLint config for JavaScript, TypeScript, Vue 2, Vue 3, Prettier.

Legacy Version

Features

  • Format with Prettier.
  • Designed to work with TypeScript, Vue 2 and 3 out-of-box.
  • Support JSON(5), YAML, Markdown...
  • Sort imports, package.json, tsconfig.json...
  • ESLint Flat config, compose easily!
  • Reasonable defaults, best practices, only one-line of config

Install

npm i -D @sunwise/eslint-config

Require Node.js >= 16.14.

Usage

// eslint.config.js
import { sunwise } from '@sunwise/eslint-config'

export default sunwise

Custom Config

import { sunwise } from '@sunwise/eslint-config'
export default sunwise(
  [
    /* your custom config */
  ],
  { vue: true, prettier: true, markdown: true, unocss: false },
)

VSCode

{
  "eslint.experimental.useFlatConfig": true
}

Comparing to @antfu/eslint-config

Most of the rules are the same, but there are some differences:

  • Use Prettier instead of ESLint Stylistic.
  • Support both Vue 2 and Vue 3.
  • Support Vue Reactivity Transform.
  • More stricter rules.