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

typescript-strictly-typed

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-strictly-typed - npm Package Compare versions

Comparing version 3.12.0 to 3.13.0

3

config-utils.js

@@ -45,2 +45,3 @@ import { dump, load } from "js-yaml";

config = {
source: file,
raw,

@@ -55,2 +56,3 @@ json: parse(raw),

config = {
source: file,
raw: JSON.stringify(json),

@@ -66,2 +68,3 @@ json,

config = {
source: file,
raw: JSON.stringify(json),

@@ -68,0 +71,0 @@ json,

4

eslint-strict.js

@@ -38,2 +38,3 @@ import {} from "jsonc-parser";

config = {
source: file,
raw: JSON.stringify({ rules: {} }),

@@ -49,2 +50,3 @@ json: { rules: {} },

config = {
source: file,
raw: JSON.stringify(packageJSONConfig.json.eslintConfig),

@@ -104,3 +106,3 @@ json: packageJSONConfig.json.eslintConfig,

function addTSConfig(config, path, rules) {
const typeCheckedEnabled = isTypeCheckedEnabled(config.raw);
const typeCheckedEnabled = isTypeCheckedEnabled(config.source);
config.raw = modifyJSON(config.raw, [...path, "rules", "eqeqeq"], "error");

@@ -107,0 +109,0 @@ config.raw = modifyJSON(config.raw, [...path, "rules", "prefer-arrow-callback"], "error");

{
"name": "typescript-strictly-typed",
"version": "3.12.0",
"version": "3.13.0",
"description": "Enable configurations for strictly typed TypeScript, ESLint, and optionally Angular.",

@@ -5,0 +5,0 @@ "funding": {

@@ -42,12 +42,26 @@ import { checkDependencyVersion, findConfig, getConfig, modifyJSON, saveConfig } from "./config-utils.js";

}
/* Clean up options included in strict mode */
config.raw = modifyJSON(config.raw, ["compilerOptions", "alwaysStrict"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "noImplicitAny"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "noImplicitThis"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictBindCallApply"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictFunctionTypes"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictNullChecks"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictPropertyInitialization"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "useUnknownInCatchVariables"], undefined);
/* If the configuration is extending another one, specific flags could be disabled
* in the parent configuration, so we enable them individually */
if (config.json.extends !== undefined) {
config.raw = modifyJSON(config.raw, ["compilerOptions", "alwaysStrict"], true);
config.raw = modifyJSON(config.raw, ["compilerOptions", "noImplicitAny"], true);
config.raw = modifyJSON(config.raw, ["compilerOptions", "noImplicitThis"], true);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictBindCallApply"], true);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictFunctionTypes"], true);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictNullChecks"], true);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictPropertyInitialization"], true);
config.raw = modifyJSON(config.raw, ["compilerOptions", "useUnknownInCatchVariables"], true);
}
/* Otherwise, clean up options included in strict mode to keep configuration small */
else {
config.raw = modifyJSON(config.raw, ["compilerOptions", "alwaysStrict"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "noImplicitAny"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "noImplicitThis"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictBindCallApply"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictFunctionTypes"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictNullChecks"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "strictPropertyInitialization"], undefined);
config.raw = modifyJSON(config.raw, ["compilerOptions", "useUnknownInCatchVariables"], undefined);
}
return saveConfig(cwd, file, config);
}
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