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

svelte-check

Package Overview
Dependencies
Maintainers
1
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-check - npm Package Compare versions

Comparing version 1.0.23 to 1.0.24

42

dist/src/index.js

@@ -86,2 +86,31 @@ "use strict";

}
function instantiateWriter(myArgs) {
const outputFormat = outputFormats.includes(myArgs['output'])
? myArgs['output']
: 'human-verbose';
if (outputFormat === 'human-verbose' || outputFormat === 'human') {
return new writers_1.HumanFriendlyWriter(process.stdout, outputFormat === 'human-verbose');
}
else {
return new writers_1.MachineFriendlyWriter(process.stdout);
}
}
function getOptions(myArgs) {
return {
compilerWarnings: stringToObj(myArgs['compiler-warnings']),
};
function stringToObj(str = '') {
return str
.split(',')
.map((s) => s.trim())
.filter((s) => !!s)
.reduce((settings, setting) => {
const [name, val] = setting.split(':');
if (val === 'error' || val === 'ignore') {
settings[name] = val;
}
return settings;
}, {});
}
}
(async () => {

@@ -101,13 +130,4 @@ var _a;

}
const outputFormat = outputFormats.includes(myArgs['output'])
? myArgs['output']
: 'human-verbose';
let writer;
if (outputFormat === 'human-verbose' || outputFormat === 'human') {
writer = new writers_1.HumanFriendlyWriter(process.stdout, outputFormat === 'human-verbose');
}
else {
writer = new writers_1.MachineFriendlyWriter(process.stdout);
}
const svelteCheck = new svelte_language_server_1.SvelteCheck(workspaceUri.fsPath);
const writer = instantiateWriter(myArgs);
const svelteCheck = new svelte_language_server_1.SvelteCheck(workspaceUri.fsPath, getOptions(myArgs));
const filePathsToIgnore = ((_a = myArgs['ignore']) === null || _a === void 0 ? void 0 : _a.split(',')) || [];

@@ -114,0 +134,0 @@ if (myArgs['watch']) {

{
"name": "svelte-check",
"description": "Svelte Code Checker Terminal Interface",
"version": "1.0.23",
"version": "1.0.24",
"main": "./dist/src/index.js",

@@ -6,0 +6,0 @@ "bin": "./bin/svelte-check",

@@ -63,2 +63,4 @@ # Check your code with svelte-check

`--compiler-warnings <code1:error|ignore,code2:error|ignore>` A list of Svelte compiler warning codes. Each entry defines whether that warning should be ignored or treated as an error. Warnings are comma-separated, between warning code and error level is a colon; all inside quotes. Example: --compiler-warnings "css-unused-selector:ignore,unused-export-let:error"
### More docs, preprocessor setup and troubleshooting

@@ -65,0 +67,0 @@

Sorry, the diff of this file is not supported yet

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