Gathering detailed insights and metrics for eslint-plugin-svelte3-new
Gathering detailed insights and metrics for eslint-plugin-svelte3-new
Gathering detailed insights and metrics for eslint-plugin-svelte3-new
Gathering detailed insights and metrics for eslint-plugin-svelte3-new
npm install eslint-plugin-svelte3-new
Typescript
Module System
Node Version
NPM Version
71.6
Supply Chain
98.8
Quality
75
Maintenance
50
Vulnerability
100
License
JavaScript (81%)
Svelte (18.51%)
TypeScript (0.49%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
373 Stars
193 Commits
43 Forks
14 Watchers
1 Branches
24 Contributors
Updated on Jul 03, 2025
Latest Version
1.0.0
Package Id
eslint-plugin-svelte3-new@1.0.0
Unpacked Size
20.39 kB
Size
7.05 kB
File Count
5
NPM Version
6.9.0
Node Version
10.16.2
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
An ESLint plugin for Svelte v3 components.
$
are always allowed, as this is the syntax for reactive assignmentsInstall the plugin package:
npm install eslint-plugin-svelte3
Then add svelte3
to the plugins
array in your .eslintrc.*
.
For example:
1{ 2 "parserOptions": { 3 "ecmaVersion": 2019, 4 "sourceType": "module" 5 }, 6 "env": { 7 "es6": true, 8 "browser": true 9 }, 10 "plugins": [ 11 "svelte3" 12 ], 13 "rules": { 14 15 }, 16 "settings": { 17 18 } 19}
This plugin needs to be able to require('svelte/compiler')
. If ESLint, this plugin, and Svelte are all installed locally in your project, this should not be a problem.
Important! Make sure you do not have eslint-plugin-html
enabled on the files you want linted as Svelte components, as the two plugins won't get along.
Some settings work best with a function as their value, which is only possible using a CommonJS .eslintrc.js
file, and not a JSON or YAML configuration file. Using overrides
in the configuration file for specific globs will also give you more control over the configuration.
svelte3/enabled
This can be true
or false
or a function that accepts a file path and returns whether this plugin should process it.
The default is to lint all files that end in .svelte
. This can be changed by passing a new function, or by using ESLint overrides
for this setting for specific globs.
svelte3/ignore-warnings
This can be true
or false
or an array of Svelte compiler warning codes or a function that indicates whether to ignore it in the linting. The function will be passed two arguments - the warning code and the full warning object - and should return a boolean.
The default is to not ignore any warnings.
svelte3/compiler-options
Most compiler options do not affect the validity of compiled components, but a couple of them can. If you are compiling to custom elements, or for some other reason need to control how the plugin compiles the components it's linting, you can use this setting.
This can be an object of compiler options or a function that accepts a file path and returns an object of compiler options.
The default is to compile with { generate: false }
.
svelte3/ignore-styles
If you're using some sort of preprocessor on the component styles, then it's likely that when this plugin calls the Svelte compiler on your component, it will throw an exception. In a perfect world, this plugin would be able to apply the preprocessor to the component and then use source maps to translate any warnings back to the original source. In the current reality, however, you can instead simply disregard styles written in anything other than standard CSS. You won't get warnings about the styles from the linter, but your application will still use them (of course) and compiler warnings will still appear in your build logs.
This can be true
or false
or a function that accepts an object of attributes on a <style>
tag (like that passed to a Svelte preprocessor) and returns whether to ignore the style block for the purposes of linting.
The default is to not ignore any styles.
svelte3/lint-template
Experimental! Requires at least Svelte 3.2.0!
This can be true
or false
or a function that accepts a file path and returns whether this plugin should also lint its template expressions.
The default is to not lint any expressions in the template.
It's probably a good idea to make sure you can lint from the command line before proceeding with configuring your editor.
Using this with the command line eslint
tool shouldn't require any special actions. Just remember that if you are running eslint
on a directory, you need to pass it the --ext
flag to tell it which nonstandard file extensions you want to lint.
See INTEGRATIONS.md for how to use this plugin with your text editor.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 13/30 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More