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

svelte-eslint-parser

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-eslint-parser - npm Package Compare versions

Comparing version 0.0.19 to 0.1.0

24

lib/context/index.js

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

const path_1 = __importDefault(require("path"));
const lodash_1 = __importDefault(require("lodash"));
const script_let_1 = require("./script-let");

@@ -215,3 +214,3 @@ const let_directive_collection_1 = require("./let-directive-collection");

getLocFromIndex(index) {
const lineNumber = lodash_1.default.sortedLastIndex(this.lineStartIndices, index);
const lineNumber = sortedLastIndex(this.lineStartIndices, index);
return {

@@ -229,1 +228,22 @@ line: lineNumber,

exports.LinesAndColumns = LinesAndColumns;
/**
* Uses a binary search to determine the highest index at which value should be inserted into array in order to maintain its sort order.
*/
function sortedLastIndex(array, value) {
let lower = 0;
let upper = array.length;
while (lower < upper) {
const mid = Math.floor(lower + (upper - lower) / 2);
const target = array[mid];
if (target < value) {
lower = mid + 1;
}
else if (target > value) {
upper = mid;
}
else {
return mid + 1;
}
}
return upper;
}

12

package.json
{
"name": "svelte-eslint-parser",
"version": "0.0.19",
"version": "0.1.0",
"description": "Svelte parser for ESLint",

@@ -41,4 +41,3 @@ "main": "lib/index.js",

"eslint-visitor-keys": "^2.0.0",
"espree": "^7.3.1",
"lodash": "^4.17.20"
"espree": "^7.3.1"
},

@@ -50,7 +49,6 @@ "peerDependencies": {

"@ota-meshi/eslint-plugin": "^0.7.0",
"@ota-meshi/eslint-plugin-svelte": "0.0.18",
"@ota-meshi/eslint-plugin-svelte": "0.0.19",
"@types/eslint": "^7.2.0",
"@types/eslint-scope": "^3.7.0",
"@types/eslint-visitor-keys": "^1.0.0",
"@types/lodash": "^4.14.167",
"@types/mocha": "^8.0.0",

@@ -68,3 +66,3 @@ "@types/node": "^14.0.13",

"eslint-plugin-prettier": "^3.2.0",
"eslint-plugin-regexp": "^0.10.0",
"eslint-plugin-regexp": "^0.11.0",
"eslint-plugin-svelte3": "^3.2.0",

@@ -81,3 +79,3 @@ "eslint-plugin-vue": "^7.2.0",

"svelte": "^3.37.0",
"ts-node": "^9.0.0",
"ts-node": "^10.0.0",
"typescript": "^4.0.0",

@@ -84,0 +82,0 @@ "vue-eslint-parser": "^7.2.0"

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