@importantimport/eslint-config-svelte
v0.1.2
Published
An ESLint Flat Config for !mportantImport.
Downloads
10
Maintainers
Readme
@importantimport/eslint-config-svelte
An ESLint Flat Config for !mportantImport.
Features
- Based on
@importantimport/eslint-config
- Single quotes, no semi
- Auto fix for formatting (aimed to be used standalone without Prettier)
- Validating TSDoc
- Automatically sort any data that fits! (via eslint-plugin-perfectionist)
- Svelte Support
Usage
Install
pnpm add -D eslint @importantimport/eslint-config-svelte prettier prettier-plugin-svelte
Config
// eslint.config.js
export { default } from '@importantimport/eslint-config-svelte'
// .prettierrc.json
// https://github.com/sveltejs/kit/blob/master/packages/create-svelte/shared/%2Bprettier/.prettierrc
{
"overrides": [{"files": "*.svelte", "options": {"parser": "svelte"}}],
"pluginSearchDirs": ["."],
"plugins": ["prettier-plugin-svelte"],
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none",
"useTabs": true
}
VSCode
Add svelte
to eslint.validate
.
// .vscode/settings.json
{
"eslint.validate": [
"javascript",
"json",
"jsonc",
"json5",
+ "svelte"
]
}