ts-ide-overrides
Advanced tools
Comparing version 0.1.3 to 0.1.4
"use strict"; | ||
const strictOptions = [ | ||
const typeCheckingOptions = [ | ||
// strict family options | ||
"strict", | ||
@@ -12,2 +13,13 @@ "alwaysStrict", | ||
"useUnknownInCatchVariables", | ||
// others | ||
'allowUnreachableCode', | ||
'allowUnusedLabels', | ||
'exactOptionalPropertyTypes', | ||
'noFallthroughCasesInSwitch', | ||
'noImplicitOverride', | ||
'noImplicitReturns', | ||
'noPropertyAccessFromIndexSignature', | ||
'noUncheckedIndexedAccess', | ||
'noUnusedLocals', | ||
'noUnusedParameters', | ||
]; | ||
@@ -41,3 +53,3 @@ function init(modules) { | ||
.reduce((acc, comment) => { | ||
const directives = comment.message.match(/@ts-ide-(enable|disable)-\S+/g); | ||
const directives = comment.message.match(/@ts-ide-(enable|disable)-[-\w]+/g); | ||
directives && | ||
@@ -51,3 +63,3 @@ directives.forEach((directive) => { | ||
.replace(/-./g, (str) => str.slice(1).toUpperCase()); | ||
if (strictOptions.includes(property)) { | ||
if (typeCheckingOptions.includes(property)) { | ||
acc[property] = enable; | ||
@@ -54,0 +66,0 @@ } |
{ | ||
"name": "ts-ide-overrides", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "TypeScript language service plugin to toggle strict checks in editors", | ||
@@ -21,3 +21,5 @@ "keywords": [ | ||
"scripts": { | ||
"build": "tsc" | ||
"build": "tsc", | ||
"prepublish": "yarn build", | ||
"publish": "npm publish" | ||
}, | ||
@@ -24,0 +26,0 @@ "peerDependencies": { |
# ts-ide-overrides | ||
TypeScript language service plugin to override _strict mode family_ options within an editor. | ||
TypeScript language service plugin to override _strict mode family_ and boolean type checking options within an editor. | ||
@@ -9,2 +9,4 @@ The plugin helps raise visibility of strict mode issues without breaking your build process. | ||
The the other boolean type-checking options supported are `allowUnreachableCode`, `allowUnusedLabels`, `exactOptionalPropertyTypes`, `noFallthroughCasesInSwitch`, `noImplicitOverride`, `noImplicitReturns`, `noPropertyAccessFromIndexSignature`, `noUncheckedIndexedAccess`, `noUnusedLocals` and `noUnusedParameters`. | ||
## Install | ||
@@ -11,0 +13,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6478
75
61