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 2.1.2 to 2.2.0

36

angular-strict.js

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

function enableAngularStrict(cwd) {
enableCodelyzerStrict(cwd);
const file = config_utils_1.findConfig(cwd, ['tsconfig.base.json', 'tsconfig.json']);

@@ -34,1 +35,36 @@ if (!file) {

exports.default = enableAngularStrict;
/**
* Enable the following Codelizer lint option:
* - `template-no-any` {@link http://codelyzer.com/rules/template-no-any/}
* @param cwd Working directory path
*/
function enableCodelyzerStrict(cwd) {
const file = config_utils_1.findConfig(cwd, ['tslint.json', 'tslint.yaml', 'tslint.yml']);
if (file) {
const config = config_utils_1.getConfig(cwd, file);
if (config && isCodelyzer(config.rulesDirectory)) {
if (!config.rules) {
config.rules = {};
}
config.rules['template-no-any'] = true;
config_utils_1.saveConfig(cwd, file, config);
}
}
}
/**
* Check if Codelyzer is enabled
* @param rulesDirectory TSLint `rulesDirectory`
*/
function isCodelyzer(rulesDirectory) {
if (typeof rulesDirectory === 'string') {
return rulesDirectory.includes('codelyzer');
}
else if (Array.isArray(rulesDirectory)) {
for (const ruleDirectory of rulesDirectory) {
if (ruleDirectory.includes('codelyzer')) {
return true;
}
}
}
return false;
}

12

package.json
{
"name": "typescript-strictly-typed",
"version": "2.1.2",
"version": "2.2.0",
"description": "Enable configurations for strictly typed TypeScript, ESLint or TSLint, and optionally Angular.",

@@ -55,10 +55,10 @@ "funding": {

"@types/json5": "0.0.30",
"@types/node": "12.12.62",
"@typescript-eslint/eslint-plugin": "4.4.0",
"@typescript-eslint/parser": "4.4.0",
"@types/node": "14.14.6",
"@typescript-eslint/eslint-plugin": "4.6.1",
"@typescript-eslint/parser": "4.6.1",
"copyfiles": "2.4.0",
"eslint": "7.10.0",
"eslint": "7.12.1",
"rimraf": "3.0.2",
"typescript": "4.0.3"
"typescript": "4.0.5"
}
}

@@ -51,2 +51,4 @@ # TypeScript Strictly Typed

- `strictInputAccessModifiers`
- [Angular Codelyzer lint options](http://codelyzer.com)
- `template-no-any`

@@ -53,0 +55,0 @@ ## By the same author

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