eslint-config-lapikit
v0.0.2
Published
Official ESLint configuration for [Lapikit](https://lapikit.dev) — prevents false positives caused by Lapikit's `<kit:*>` syntax and preprocessor.
Maintainers
Readme
eslint-config-lapikit
Official ESLint configuration for Lapikit — prevents false positives caused by Lapikit's <kit:*> syntax and preprocessor.
Why?
Lapikit uses a custom <kit:*> syntax that is transformed into standard Svelte components at build time. Some of these components rely on named snippets (like activator, indicator, etc.) that ESLint may incorrectly flag as unused variables.
This package configures ESLint to ignore these false positives so you can focus on writing code.
Requirements
- ESLint
>=9.0.0(flat config) @typescript-eslint/eslint-plugin>=6.0.0lapikit>=0.5.0
Installation
npm install -D eslint-config-lapikitpnpm add -D eslint-config-lapikityarn add -D eslint-config-lapikitbun add -D eslint-config-lapikitUsage
Add the config to your eslint.config.js:
import lapikitConfig from "eslint-config-lapikit";
export default [...lapikitConfig];That's it! The config will automatically handle all Lapikit-specific false positives for .svelte files.
Handling Conflicts
eslint-config-lapikit configures the @typescript-eslint/no-unused-vars rule for Lapikit snippets. If you already have a custom configuration for this rule, place the Lapikit config first so your own rules take precedence:
import lapikitConfig from "eslint-config-lapikit";
export default [
...lapikitConfig, // always first
{
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
// your custom options here
varsIgnorePattern: "^myCustomPattern$",
},
],
},
},
];What's Included
This config applies the following rules to all **/*.svelte files:
| Rule | Configuration |
| ----------------------------------- | -------------------------------------- |
| @typescript-eslint/no-unused-vars | Ignores Lapikit reserved snippet names |
Ignored snippet names
The following snippet names are recognized as Lapikit reserved snippets and will not be flagged as unused:
activatorindicatorappendprependcloseloadtooltipprependInner,appendInner
Known Limitations
This package only handles ESLint false positives. Your IDE may still show a ts(6133) warning for the same snippets — this is a separate issue with the TypeScript language server. See the documentation for more information.
License
Licensed under the MIT license.
Copyright © 2025 - 2026 Nycolaide
