typescript-strictly-typed
Advanced tools
Comparing version 2.7.0 to 2.8.0
@@ -8,3 +8,3 @@ "use strict"; | ||
* - `@typescript-eslint/no-explicit-any` | ||
* - `@typescript-eslint/explicit-function-return-type` | ||
* - `@typescript-eslint/explicit-module-boundary-types` | ||
* {@link https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin} | ||
@@ -42,2 +42,3 @@ * | ||
checkConfig(config); | ||
let tsConfigAdded = false; | ||
/* If there is an override, rules must be set inside it, or they won't be checked */ | ||
@@ -48,2 +49,3 @@ for (const override of (_b = config.overrides) !== null && _b !== void 0 ? _b : []) { | ||
addTSConfig(override); | ||
tsConfigAdded = true; | ||
} | ||
@@ -58,3 +60,5 @@ if (files.some((file) => file.includes(htmlFilesConfig))) { | ||
/* Add rules at root level */ | ||
addTSConfig(config); | ||
if (!tsConfigAdded) { | ||
addTSConfig(config); | ||
} | ||
if (packageJSONConfig) { | ||
@@ -108,4 +112,14 @@ packageJSONConfig.eslintConfig = config; | ||
} | ||
config.rules['@typescript-eslint/no-explicit-any'] = 'error'; | ||
config.rules['@typescript-eslint/explicit-function-return-type'] = 'error'; | ||
if (Array.isArray(config.rules['@typescript-eslint/no-explicit-any'])) { | ||
config.rules['@typescript-eslint/no-explicit-any'][0] = 'error'; | ||
} | ||
else { | ||
config.rules['@typescript-eslint/no-explicit-any'] = 'error'; | ||
} | ||
if (Array.isArray(config.rules['@typescript-eslint/explicit-module-boundary-types'])) { | ||
config.rules['@typescript-eslint/explicit-module-boundary-types'][0] = 'error'; | ||
} | ||
else { | ||
config.rules['@typescript-eslint/explicit-module-boundary-types'] = 'error'; | ||
} | ||
} | ||
@@ -116,3 +130,8 @@ function addAngularHTMLConfig(config) { | ||
} | ||
config.rules['@angular-eslint/template/no-any'] = 'error'; | ||
if (Array.isArray(config.rules['@angular-eslint/template/no-any'])) { | ||
config.rules['@angular-eslint/template/no-any'][0] = 'error'; | ||
} | ||
else { | ||
config.rules['@angular-eslint/template/no-any'] = 'error'; | ||
} | ||
} | ||
@@ -119,0 +138,0 @@ function normalizeConfigToArray(config) { |
{ | ||
"name": "typescript-strictly-typed", | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "Enable configurations for strictly typed TypeScript, ESLint or TSLint, and optionally Angular.", | ||
@@ -25,3 +25,3 @@ "funding": { | ||
"release:patch": "VERSION=patch npm run release && npm run githubrelease", | ||
"release": "if test $VERSION; then npm run build && npm version $VERSION && npm run build && npm publish dist && git push && git push --tags; fi", | ||
"release": "if test $VERSION; then npm run build && npm version $VERSION && npm run build && npm publish ./dist && git push && git push --tags; fi", | ||
"githubrelease": "CHANGELOG=$(sed -n \"/^## $npm_package_version/,/^## /p\" CHANGELOG.md | sed '1d;$d') && gh release create v$npm_package_version --title v$npm_package_version --notes \"$CHANGELOG\"" | ||
@@ -52,18 +52,18 @@ }, | ||
"chalk": "4.1.0", | ||
"js-yaml": "4.0.0", | ||
"js-yaml": "4.1.0", | ||
"json5": "2.2.0", | ||
"pkg-up": "3.1.0", | ||
"semver": "7.3.4" | ||
"semver": "7.3.5" | ||
}, | ||
"devDependencies": { | ||
"@types/js-yaml": "4.0.0", | ||
"@types/node": "14.14.31", | ||
"@types/node": "14.14.41", | ||
"@types/semver": "7.3.4", | ||
"@typescript-eslint/eslint-plugin": "4.15.2", | ||
"@typescript-eslint/parser": "4.15.2", | ||
"@typescript-eslint/eslint-plugin": "4.22.0", | ||
"@typescript-eslint/parser": "4.22.0", | ||
"copyfiles": "2.4.1", | ||
"eslint": "7.20.0", | ||
"eslint": "7.24.0", | ||
"rimraf": "3.0.2", | ||
"typescript": "4.2.2" | ||
"typescript": "4.2.4" | ||
} | ||
} |
@@ -47,3 +47,3 @@ # TypeScript Strictly Typed | ||
- `@typescript-eslint/no-explicit-any` | ||
- `@typescript-eslint/explicit-function-return-type` | ||
- `@typescript-eslint/explicit-module-boundary-types` | ||
- [TSLint rules](https://palantir.github.io/tslint/rules/) | ||
@@ -50,0 +50,0 @@ - `no-any` |
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
26779
501
+ Addedjs-yaml@4.1.0(transitive)
+ Addedsemver@7.3.5(transitive)
- Removedjs-yaml@4.0.0(transitive)
- Removedsemver@7.3.4(transitive)
Updatedjs-yaml@4.1.0
Updatedsemver@7.3.5