Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-svelte

Package Overview
Dependencies
Maintainers
5
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-svelte - npm Package Compare versions

Comparing version 2.39.0 to 2.39.1

2

lib/meta.d.ts
export declare const name = "eslint-plugin-svelte";
export declare const version = "2.39.0";
export declare const version = "2.39.1";

@@ -8,2 +8,2 @@ "use strict";

exports.name = 'eslint-plugin-svelte';
exports.version = '2.39.0';
exports.version = '2.39.1';

@@ -11,2 +11,3 @@ import type { AST } from 'svelte-eslint-parser';

code: string;
codeForV5: string;
token: AST.Token | AST.Comment;

@@ -13,0 +14,0 @@ };

@@ -6,2 +6,17 @@ "use strict";

const SVELTE_IGNORE_PATTERN = /^\s*svelte-ignore/m;
/**
* Map of legacy code -> new code
* See https://github.com/sveltejs/svelte/blob/c9202a889612df3c2fcb369096a5573668be99d6/packages/svelte/src/compiler/utils/extract_svelte_ignore.js#L6
*/
const V5_REPLACEMENTS = {
'non-top-level-reactive-declaration': 'reactive_declaration_invalid_placement',
'module-script-reactive-declaration': 'reactive_declaration_module_script',
'empty-block': 'block_empty',
'avoid-is': 'attribute_avoid_is',
'invalid-html-attribute': 'attribute_invalid_property_name',
'a11y-structure': 'a11y_figcaption_parent',
'illegal-attribute-character': 'attribute_illegal_colon',
'invalid-rest-eachblock-binding': 'bind_invalid_each_rest',
'unused-export-let': 'export_let_unused'
};
/** Extract all svelte-ignore comment items */

@@ -63,2 +78,3 @@ function getSvelteIgnoreItems(context) {

code: trimmed,
codeForV5: V5_REPLACEMENTS[trimmed] || trimmed.replace(/-/gu, '_'),
range: [start, end],

@@ -65,0 +81,0 @@ token

@@ -57,2 +57,3 @@ "use strict";

'css-unused-selector',
'css_unused_selector',
'css-invalid-global',

@@ -369,3 +370,4 @@ 'css-invalid-global-selector'

for (const comment of (0, extract_leading_comments_1.extractLeadingComments)(context, node).reverse()) {
const ignoreItem = ignoreComments.find((item) => item.token === comment && item.code === warning.code);
const ignoreItem = ignoreComments.find((item) => item.token === comment &&
(item.code === warning.code || item.codeForV5 === warning.code));
if (ignoreItem) {

@@ -383,3 +385,4 @@ unusedIgnores.delete(ignoreItem);

for (const comment of (0, extract_leading_comments_1.extractLeadingComments)(context, node).reverse()) {
const ignoreItem = ignoreComments.find((item) => item.token === comment && CSS_WARN_CODES.has(item.code));
const ignoreItem = ignoreComments.find((item) => item.token === comment &&
(CSS_WARN_CODES.has(item.code) || CSS_WARN_CODES.has(item.codeForV5)));
if (ignoreItem) {

@@ -386,0 +389,0 @@ unusedIgnores.delete(ignoreItem);

{
"name": "eslint-plugin-svelte",
"version": "2.39.0",
"version": "2.39.1",
"description": "ESLint plugin for Svelte using AST",

@@ -8,8 +8,4 @@ "repository": "git+https://github.com/sveltejs/eslint-plugin-svelte.git",

"author": "Yosuke Ota (https://github.com/ota-meshi)",
"contributors": [
"JounQin (https://github.com/JounQin)"
],
"funding": "https://github.com/sponsors/ota-meshi",
"license": "MIT",
"packageManager": "pnpm@7.33.7",
"engines": {

@@ -30,2 +26,26 @@ "node": "^14.17.0 || >=16.0.0"

],
"scripts": {
"build": "pnpm run build:meta && pnpm run build:ts",
"build:meta": "pnpm run ts ./tools/update-meta.ts",
"build:ts": "tsc --project ./tsconfig.build.json",
"clean": "rimraf .nyc_output lib coverage build .svelte-kit svelte.config-dist.js",
"cover": "nyc --reporter=lcov pnpm run test",
"debug": "pnpm run mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
"lint": "run-p lint:*",
"lint-fix": "pnpm run lint:es --fix && pnpm run lint:style --fix",
"lint:es": "eslint --cache .",
"mocha": "pnpm run ts ./node_modules/mocha/bin/mocha.js",
"new": "pnpm run ts ./tools/new-rule.ts",
"prebuild": "pnpm run clean",
"prerelease": "pnpm run clean && pnpm run build",
"release": "changeset publish",
"test": "pnpm run mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
"test:debug": "env-cmd -e debug pnpm run test",
"test:update-fixtures": "env-cmd -e update-fixtures pnpm run test",
"ts": "node -r esbuild-register",
"typecov": "type-coverage",
"update": "pnpm run ts ./tools/update.ts",
"version": "env-cmd -e version pnpm run update",
"version:ci": "env-cmd -e version-ci pnpm run update && changeset version"
},
"peerDependencies": {

@@ -43,3 +63,2 @@ "eslint": "^7.0.0 || ^8.0.0-0 || ^9.0.0-0",

"@jridgewell/sourcemap-codec": "^1.4.15",
"debug": "^4.3.4",
"eslint-compat-utils": "^0.5.0",

@@ -52,106 +71,39 @@ "esutils": "^2.0.3",

"postcss-selector-parser": "^6.0.16",
"semver": "^7.6.0",
"svelte-eslint-parser": ">=0.36.0 <1.0.0"
"semver": "^7.6.2",
"svelte-eslint-parser": "^0.36.0"
},
"devDependencies": {
"@1stg/browserslist-config": "^2.0.0",
"@1stg/stylelint-config": "^6.0.0",
"@babel/core": "^7.24.4",
"@babel/eslint-parser": "^7.24.1",
"@babel/core": "^7.24.5",
"@babel/eslint-parser": "^7.24.5",
"@babel/plugin-proposal-function-bind": "^7.24.1",
"@babel/types": "^7.24.0",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@changesets/get-release-plan": "^4.0.0",
"@eslint-community/eslint-plugin-eslint-comments": "4.3.0",
"@fontsource/fira-mono": "^5.0.12",
"@ota-meshi/eslint-plugin": "^0.17.1",
"@sindresorhus/slugify": "^2.2.1",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.5.6",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
"@types/babel__core": "^7.20.5",
"@types/cross-spawn": "^6.0.6",
"@types/escape-html": "^1.0.4",
"@types/eslint": "^8.56.10",
"@types/eslint-scope": "^3.7.7",
"@types/eslint-utils": "^3.0.5",
"@types/eslint-visitor-keys": "^3.3.0",
"@types/esutils": "^2.0.2",
"@types/json-schema": "^7.0.15",
"@types/less": "^3.0.6",
"@types/markdown-it": "^14.0.1",
"@types/markdown-it-container": "^2.0.10",
"@types/markdown-it-emoji": "^3.0.0",
"@types/mocha": "^10.0.6",
"@types/node": "^20.12.7",
"@types/node": "^20.12.12",
"@types/postcss-safe-parser": "^5.0.4",
"@types/prismjs": "^1.26.3",
"@types/semver": "^7.5.8",
"@types/stylus": "^0.48.42",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"@typescript/vfs": "^1.5.0",
"acorn": "^8.11.3",
"assert": "^2.1.0",
"cross-spawn": "^7.0.3",
"env-cmd": "^10.1.0",
"esbuild": "^0.21.0",
"esbuild": "^0.21.3",
"esbuild-register": "^3.5.0",
"escape-html": "^1.0.3",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-formatter-friendly": "^7.0.0",
"eslint-plugin-eslint-plugin": "^6.0.0",
"eslint-plugin-jsdoc": "^48.2.3",
"eslint-plugin-json-schema-validator": "^5.1.0",
"eslint-plugin-jsonc": "^2.15.1",
"eslint-plugin-markdown": "^5.0.0",
"eslint-plugin-mdx": "^3.1.5",
"eslint-plugin-n": "^17.2.1",
"eslint-plugin-node-dependencies": "^0.12.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-regexp": "^2.5.0",
"eslint-plugin-svelte": "^2.37.0",
"eslint-plugin-yml": "^1.14.0",
"eslint-scope": "^8.0.1",
"eslint-typegen": "^0.2.3",
"eslint-typegen": "^0.2.4",
"eslint-visitor-keys": "^4.0.0",
"espree": "^10.0.1",
"estree-walker": "^3.0.3",
"globals": "^15.0.0",
"less": "^4.2.0",
"locate-character": "^3.0.0",
"magic-string": "^0.30.10",
"markdown-it-anchor": "^8.6.7",
"markdown-it-container": "^4.0.0",
"markdown-it-emoji": "^3.0.0",
"mocha": "^10.4.0",
"npm-run-all2": "^6.1.2",
"nyc": "^15.1.0",
"pako": "^2.1.0",
"postcss-nested": "^6.0.1",
"prettier": "^3.2.5",
"prettier-plugin-pkg": "^0.18.1",
"prettier-plugin-svelte": "^3.2.3",
"prism-svelte": "^0.5.0",
"prismjs": "^1.29.0",
"rimraf": "^5.0.5",
"sass": "^1.75.0",
"sass": "^1.77.2",
"source-map-js": "^1.2.0",
"stylelint": "~16.5.0",
"stylelint-config-standard": "^36.0.0",
"stylus": "^0.63.0",
"svelte": "^5.0.0-next.112",
"svelte-adapter-ghpages": "0.2.2",
"svelte": "5.0.0-next.152",
"svelte-i18n": "^4.0.0",
"tslib": "^2.6.2",
"type-coverage": "^2.28.1",
"typescript": "~5.4.5",
"typescript-eslint": "^7.7.0",
"util": "^0.12.5",
"vite": "^5.2.9",
"vite-plugin-eslint4b": "^0.4.0",
"vite-plugin-svelte-md": "^0.1.7",
"yaml": "^2.4.1"
"type-coverage": "^2.28.2",
"yaml": "^2.4.2"
},

@@ -162,3 +114,3 @@ "publishConfig": {

"typeCoverage": {
"atLeast": 97,
"atLeast": 98.9,
"cache": true,

@@ -172,34 +124,3 @@ "detail": true,

"update": true
},
"scripts": {
"build": "pnpm run build:meta && pnpm run build:ts",
"build:meta": "pnpm run ts ./tools/update-meta.ts",
"build:ts": "tsc --project ./tsconfig.build.json",
"clean": "rimraf .nyc_output lib coverage build .svelte-kit svelte.config-dist.js",
"cover": "nyc --reporter=lcov pnpm run test",
"debug": "pnpm run mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
"docs:build": "pnpm run svelte-kit build",
"docs:preview": "pnpm run svelte-kit preview",
"docs:watch": "pnpm run svelte-kit dev",
"lint": "run-p lint:*",
"lint-fix": "pnpm run lint-fix:md \"./**/*.md\" && pnpm run lint:es --fix && pnpm run lint:style --fix",
"lint-fix:md": "prettier --cache --write \"./**/*.md\"",
"lint:es": "eslint --cache .",
"lint:md": "prettier --cache --check \"./**/*.md\"",
"lint:style": "stylelint --cache .",
"mocha": "pnpm run ts ./node_modules/mocha/bin/mocha.js",
"new": "pnpm run ts ./tools/new-rule.ts",
"prebuild": "pnpm run clean",
"prerelease": "pnpm run clean && pnpm run build",
"release": "changeset publish",
"svelte-kit": "env-cmd -e sveltekit node node_modules/vite/bin/vite.js",
"test": "pnpm run mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
"test:debug": "env-cmd -e debug pnpm run test",
"test:update-fixtures": "env-cmd -e update-fixtures pnpm run test",
"ts": "node -r esbuild-register",
"typecov": "type-coverage",
"update": "pnpm run ts ./tools/update.ts && pnpm run lint-fix:md",
"version": "env-cmd -e version pnpm run update",
"version:ci": "env-cmd -e version-ci pnpm run update && changeset version"
}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc