3.11.0 • Published 2 days ago

@sxzz/eslint-config v3.11.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days ago

@sxzz/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
  • Reasonable strict, but with better code quality.

Install

npm i -D @sxzz/eslint-config

Require Node.js >= 18.18, and ESLint >= 8.56.0.

Usage

import { sxzz } from '@sxzz/eslint-config'
export default sxzz(
  [
    /* your custom config */
  ],
  // Features: it'll detect installed dependency and enable necessary features automatically
  {
    prettier: true,
    markdown: true,
    vue: true, // auto detection
    unocss: false, // auto detection
  },
)

Presets

// eslint.config.js
import {
  presetJavaScript, // Ignore common files and include javascript support
  presetJsonc, // Includes basic json(c) file support and sorting json keys
  presetLangsExtensions, // Includes markdown, yaml + `presetJsonc` support
  presetBasic, // Includes `presetJavaScript` and typescript support

  // Includes
  // - `presetBasic` (JS+TS) support
  // - `presetLangsExtensions` (markdown, yaml, jsonc) support
  // - Vue support
  // - UnoCSS support (`uno.config.ts` is required)
  // - Prettier support
  presetAll,
} from '@sxzz/eslint-config'

export default presetAll

See preset.ts for more details.

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.

Sponsors

License

MIT License © 2021-PRESENT 三咲智子

3.10.1

2 days ago

3.10.0

2 days ago

3.11.0

2 days ago

3.9.1

24 days ago

3.9.0

27 days ago

3.8.7

2 months ago

3.8.6

2 months ago

3.8.4

2 months ago

3.8.3

2 months ago

3.8.2

2 months ago

3.8.5

2 months ago

3.8.1

2 months ago

3.8.0

3 months ago

3.7.6

4 months ago

3.7.5

5 months ago

3.7.4

6 months ago

3.7.3

6 months ago

3.7.2

6 months ago

3.5.4

8 months ago

3.4.0

9 months ago

3.2.2

10 months ago

3.2.1

10 months ago

3.2.0

10 months ago

3.6.2

7 months ago

3.6.1

8 months ago

3.6.0

8 months ago

3.2.3

10 months ago

3.6.4

7 months ago

3.6.3

7 months ago

3.3.1

9 months ago

3.3.0

9 months ago

3.1.2

10 months ago

3.1.1

10 months ago

3.7.1

6 months ago

3.5.3

8 months ago

3.7.0

7 months ago

3.5.2

8 months ago

3.5.1

8 months ago

3.5.0

8 months ago

3.3.2

9 months ago

3.1.0

10 months ago

3.0.0

11 months ago

3.0.0-beta.12

11 months ago

3.0.0-beta.10

1 year ago

3.0.0-beta.11

12 months ago

3.0.0-beta.1

1 year ago

3.0.0-beta.0

1 year ago

3.0.0-beta.3

1 year ago

3.0.0-beta.2

1 year ago

3.0.0-beta.5

1 year ago

3.0.0-beta.4

1 year ago

3.0.0-beta.7

1 year ago

3.0.0-beta.6

1 year ago

3.0.0-beta.9

1 year ago

3.0.0-beta.8

1 year ago

2.4.6

1 year ago

2.4.5

1 year ago

2.4.3

2 years ago

2.4.2

2 years ago

2.4.4

2 years ago

2.3.0

2 years ago

2.4.1

2 years ago

2.3.2

2 years ago

2.4.0

2 years ago

2.3.1

2 years ago

2.3.4

2 years ago

2.3.3

2 years ago

2.3.5

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.2.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

1.7.0

2 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.2

3 years ago

1.0.0

3 years ago