@futagoza/eslint-config-svelte
v16.1.0
Published
Futago-za Ryuu's ESLint configurations for .svelte files.
Downloads
24
Maintainers
Readme
This package contains configuration files for ESLint v7.15+
This is a configuration file for ESLint that is used to lint JavaScript source embedded within my .svelte
files.
NOTE 1: This configuration is only for enabling .svelte
linting, therefore it is recommended to also use @futagoza/eslint-config-javascript or something similar alongside this configuration.
NOTE 2: To lint .svelte
files that contain TypeScript code blocks use @futagoza/eslint-config-svelte.ts instead of this package.
NOTE 3: This configuration require's Svelte 3+, but the peerDependencies
field is set as "svelte": "*"
so that any version of Svelte supported by eslint-plugin-svelte3 can be used.
installation
$ npm i --save-dev @futagoza/eslint-config-svelte
usage
Put the following into your configuration (.eslintrc.*
file or the "eslintConfig" field in package.json
):
{
"extends": "@futagoza/svelte"
}
configurations
A list of usable configurations as well the configurations they use:
@futagoza/svelte
(default, extends @futagoza/dev/code and @futagoza/globals/browser)@futagoza/svelte/sapper
(extends default and optionally more (see below))
sapper configuration
The @futagoza/svelte/sapper configuration will optionally extend other configurations:
- Having a
src/client.js
file will use @futagoza/dev/code and @futagoza/globals/browser - Having a
src/server.js
file will use @futagoza/dev/node - Having a
src/service-worker.js
file will use @futagoza/dev/code and @futagoza/globals/worker
NOTE: Sapper load's other src/**/*.js
files, but these don't have expectations like the above.
license
Copyright © 2019+ Futago-za Ryuu Released under the MIT License, http://opensource.org/licenses/MIT