4.1.8 • Published 6 months ago

@sarast/eslint-config v4.1.8

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

@sarast/eslint-config npm

A opinionated ESLint config preset for JavaScript, TypeScript, Vue 3, and Prettier.

Features

  • Format with Prettier.
  • Designed to work with TypeScript, Vue 3 out-of-box.
  • Support JSON(5), YAML, Markdown...
  • Sort imports, package.json, tsconfig.json...
  • ESLint Flat config, compose easily!
  • Ignores common files like dist, node_modules, coverage, and files in .gitignore.
  • Reasonable defaults, best practices, only one-line of config
  • Reasonable strict, but with better code quality.

Install

npm i -D @sarast/eslint-config

Require Node.js >= 20.0.0, and ESLint >= 9.20.0.

Usage

import { sarast } from '@sarast/eslint-config';
export default sarast(
  // Features: it'll detect installed dependency and enable necessary features automatically
  {
    prettier: true,
    markdown: true,
    vue: true, // auto detection
  },
  [
    /* your custom config */
  ],
).removeRules('foo/bar'); // see more in https://github.com/antfu/eslint-flat-config-utils;

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
  // - Prettier support
  presetAll,
} from '@sarast/eslint-config';

export default presetAll;

See preset.ts for more details.

Comparing to @antfu/eslint-config

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

Credit

This eslint config is inspired by:

License

MIT License © 2024-PRESENT Sardor Astanov

1.8.2

10 months ago

1.6.4

12 months ago

1.8.1

10 months ago

1.6.3

12 months ago

1.8.0

11 months ago

1.6.2

12 months ago

1.6.1

1 year ago

4.1.8

6 months ago

1.6.0

1 year ago

1.4.2

1 year ago

4.1.7

6 months ago

1.4.1

1 year ago

1.4.0

1 year ago

2.2.0

7 months ago

2.2.3

7 months ago

2.2.2

7 months ago

2.2.4

7 months ago

2.0.0

9 months ago

3.0.0

7 months ago

4.0.0

7 months ago

1.9.2

10 months ago

1.9.1

10 months ago

1.9.0

10 months ago

1.7.0

11 months ago

1.5.0

1 year ago

2.1.2

8 months ago

2.1.1

8 months ago

2.1.3

8 months ago

2.1.6

8 months ago

2.1.0

8 months ago

4.1.4

6 months ago

4.1.3

6 months ago

4.1.6

6 months ago

4.1.5

6 months ago

4.1.0

7 months ago

1.6.8

11 months ago

1.6.7

11 months ago

4.1.2

6 months ago

1.6.6

11 months ago

4.1.1

7 months ago

1.6.5

11 months ago

1.10.0

9 months ago

1.3.0

1 year ago

1.2.2

1 year ago

1.2.0

1 year ago

1.2.1

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago