@sarast/eslint-config v4.1.8
@sarast/eslint-config 
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-configRequire 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:
- Use Prettier instead of ESLint Stylistic.
- Vue 3 Support.
- Stricter rules.
Credit
This eslint config is inspired by:
@sxzz/eslint-config, created by Kevin Deng 三咲智子@antfu/eslint-config, created by Anthony Fu- Vite, created by Evan You and Vite community
License
MIT License © 2024-PRESENT Sardor Astanov
10 months ago
12 months ago
10 months ago
12 months ago
11 months ago
12 months ago
1 year ago
6 months ago
1 year ago
1 year ago
6 months ago
1 year ago
1 year ago
7 months ago
7 months ago
7 months ago
7 months ago
9 months ago
7 months ago
7 months ago
10 months ago
10 months ago
10 months ago
11 months ago
1 year ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
11 months ago
11 months ago
6 months ago
11 months ago
7 months ago
11 months ago
9 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago