eslint-plugin-expect-type
Advanced tools
Comparing version 0.0.3 to 0.0.4
"use strict"; | ||
const rules_1 = require("./rules"); | ||
const configs = Object.keys(rules_1.rules).reduce((acc, name) => (Object.assign(Object.assign({}, acc), { [`expect-type/${name}`]: 'error' })), {}); | ||
module.exports = { | ||
rules: { | ||
rule: rules_1.expectType, | ||
}, | ||
rules: rules_1.rules, | ||
configs: { | ||
recommended: { | ||
rules: { | ||
'expect-type/rule': 'error', | ||
}, | ||
rules: configs, | ||
}, | ||
}, | ||
}; |
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./expectType")); | ||
const expect_1 = require("./expect"); | ||
exports.rules = { | ||
[expect_1.name]: expect_1.rule, | ||
}; |
@@ -7,5 +7,3 @@ "use strict"; | ||
function getParserServices(context) { | ||
if (!context.parserServices || | ||
!context.parserServices.program || | ||
!context.parserServices.esTreeNodeToTSNodeMap) { | ||
if (!context.parserServices || !context.parserServices.program || !context.parserServices.esTreeNodeToTSNodeMap) { | ||
/** | ||
@@ -12,0 +10,0 @@ * The user needs to have configured "project" in their parserOptions |
{ | ||
"name": "eslint-plugin-expect-type", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "ESLint plugin with $ExpectType, $ExpectError and $ExpectTypeSnapshot type assertions", | ||
@@ -9,3 +9,19 @@ "author": { | ||
"main": "dist/index.js", | ||
"files": [ | ||
"dist" | ||
], | ||
"license": "Apache-2.0", | ||
"engines": { | ||
"node": ">=10.3.0" | ||
}, | ||
"scripts": { | ||
"build": "tsc", | ||
"test": "jest --runInBand", | ||
"format": "prettier \"**/*.{ts,js,json,md}\" --write", | ||
"prepublishOnly": "tsc" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ibezkrovnyi/eslint-plugin-expect-type.git" | ||
}, | ||
"keywords": [ | ||
@@ -29,29 +45,37 @@ "dtslint", | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ibezkrovnyi/eslint-plugin-expect-type.git" | ||
"peerDependencies": { | ||
"eslint": "^5.0.0 || ^6.0.0", | ||
"typescript": ">=3.7.5" | ||
}, | ||
"dependencies": { | ||
"@typescript-eslint/experimental-utils": "^2.0.0", | ||
"fs-extra": "^8.1.0", | ||
"typescript": "^3.5.3" | ||
"fs-extra": "^8.1.0" | ||
}, | ||
"devDependencies": { | ||
"@types/dedent": "^0.7.0", | ||
"@types/eslint": "^6.1.3", | ||
"@types/estree": "^0.0.42", | ||
"@types/fs-extra": "^8.0.0", | ||
"@types/glob": "^7.1.1", | ||
"@types/jest": "^24.0.15", | ||
"@types/node": "^12.7.2", | ||
"@typescript-eslint/eslint-plugin": "^2.0.0", | ||
"@typescript-eslint/parser": "^2.0.0", | ||
"prettier": "^1.18.2", | ||
"tsutils": "^3.17.1" | ||
}, | ||
"engines": { | ||
"node": ">=10.3.0" | ||
}, | ||
"scripts": { | ||
"build": "tsc", | ||
"prepublishOnly": "tsc" | ||
}, | ||
"files": [ | ||
"dist" | ||
] | ||
"@typescript-eslint/eslint-plugin": "^2.3.1", | ||
"@typescript-eslint/parser": "^2.3.1", | ||
"babel-eslint": "^10.0.2", | ||
"dedent": "^0.7.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-prettier": "^6.9.0", | ||
"eslint-plugin-eslint-plugin": "^2.2.0", | ||
"eslint-plugin-import": "^2.20.0", | ||
"eslint-plugin-jest": "^23.4.0", | ||
"eslint-plugin-jsdoc": "^20.0.5", | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"jest": "^24.9.0", | ||
"json-schema": "^0.2.5", | ||
"lint-staged": "^9.5.0", | ||
"prettier": "^1.19.1", | ||
"ts-jest": "^24.3.0", | ||
"tsutils": "^3.17.1", | ||
"typescript": "^3.7.5" | ||
} | ||
} |
@@ -74,3 +74,3 @@ # eslint-plugin-expect-type | ||
```ts | ||
// $ExpectTypeSnapshot Foo | ||
// $ExpectTypeSnapshot MyFooSnapshot | ||
const Foo = { | ||
@@ -83,4 +83,7 @@ a: 1, | ||
By running `eslint --fix` the following file will be created in the folder of `foo.test.ts`: | ||
****type-snapshots**/foo.test.ts.snap.json** | ||
``` | ||
__type-snapshots__/foo.test.ts.snap.json | ||
``` | ||
By running `eslint` snapshot type will be matched with actual type and Error will be emitted in case types don't match. | ||
@@ -87,0 +90,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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
33090
470
100
4
25
1
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Addedacorn@7.4.1(transitive)
+ Addedansi-escapes@4.3.2(transitive)
+ Addedansi-regex@4.1.15.0.1(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedargparse@1.0.10(transitive)
+ Addedastral-regex@1.0.0(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedchardet@0.7.0(transitive)
+ Addedcli-cursor@3.1.0(transitive)
+ Addedcli-width@3.0.0(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcross-spawn@6.0.6(transitive)
+ Addeddoctrine@3.0.0(transitive)
+ Addedemoji-regex@7.0.38.0.0(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedeslint@6.8.0(transitive)
+ Addedeslint-utils@1.4.3(transitive)
+ Addedespree@6.2.1(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedexternal-editor@3.1.0(transitive)
+ Addedfigures@3.2.0(transitive)
+ Addedfile-entry-cache@5.0.1(transitive)
+ Addedflat-cache@2.0.1(transitive)
+ Addedflatted@2.0.2(transitive)
+ Addedfunctional-red-black-tree@1.0.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedglobals@12.4.0(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedignore@4.0.6(transitive)
+ Addedinquirer@7.3.3(transitive)
+ Addedis-fullwidth-code-point@2.0.03.0.0(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedlevn@0.3.0(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedmute-stream@0.0.8(transitive)
+ Addednice-try@1.0.5(transitive)
+ Addedonetime@5.1.2(transitive)
+ Addedoptionator@0.8.3(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedpath-key@2.0.1(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedprelude-ls@1.1.2(transitive)
+ Addedprogress@2.0.3(transitive)
+ Addedregexpp@2.0.1(transitive)
+ Addedrestore-cursor@3.1.0(transitive)
+ Addedrimraf@2.6.3(transitive)
+ Addedrun-async@2.4.1(transitive)
+ Addedrxjs@6.6.7(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsemver@5.7.26.3.1(transitive)
+ Addedshebang-command@1.2.0(transitive)
+ Addedshebang-regex@1.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedslice-ansi@2.1.0(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addedstring-width@3.1.04.2.3(transitive)
+ Addedstrip-ansi@5.2.06.0.1(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedtable@5.4.6(transitive)
+ Addedtext-table@0.2.0(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedtmp@0.0.33(transitive)
+ Addedtype-check@0.3.2(transitive)
+ Addedtype-fest@0.21.30.8.1(transitive)
+ Addedtypescript@5.7.2(transitive)
+ Addedv8-compile-cache@2.4.0(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwrite@1.0.3(transitive)
- Removedtypescript@^3.5.3
- Removed@eslint-community/eslint-utils@4.4.1(transitive)
- Removed@eslint-community/regexpp@4.12.1(transitive)
- Removed@eslint/config-array@0.19.0(transitive)
- Removed@eslint/core@0.9.0(transitive)
- Removed@eslint/eslintrc@3.2.0(transitive)
- Removed@eslint/js@9.16.0(transitive)
- Removed@eslint/object-schema@2.1.4(transitive)
- Removed@eslint/plugin-kit@0.2.3(transitive)
- Removed@humanfs/core@0.19.1(transitive)
- Removed@humanfs/node@0.16.6(transitive)
- Removed@humanwhocodes/module-importer@1.0.1(transitive)
- Removed@humanwhocodes/retry@0.3.10.4.1(transitive)
- Removed@types/estree@1.0.6(transitive)
- Removedacorn@8.14.0(transitive)
- Removedargparse@2.0.1(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removedescape-string-regexp@4.0.0(transitive)
- Removedeslint@9.16.0(transitive)
- Removedeslint-scope@8.2.0(transitive)
- Removedeslint-visitor-keys@3.4.34.2.0(transitive)
- Removedespree@10.3.0(transitive)
- Removedfile-entry-cache@8.0.0(transitive)
- Removedfind-up@5.0.0(transitive)
- Removedflat-cache@4.0.1(transitive)
- Removedflatted@3.3.2(transitive)
- Removedglob-parent@6.0.2(transitive)
- Removedglobals@14.0.0(transitive)
- Removedignore@5.3.2(transitive)
- Removedjs-yaml@4.1.0(transitive)
- Removedjson-buffer@3.0.1(transitive)
- Removedkeyv@4.5.4(transitive)
- Removedlevn@0.4.1(transitive)
- Removedlocate-path@6.0.0(transitive)
- Removedlodash.merge@4.6.2(transitive)
- Removedoptionator@0.9.4(transitive)
- Removedp-limit@3.1.0(transitive)
- Removedp-locate@5.0.0(transitive)
- Removedpath-exists@4.0.0(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedprelude-ls@1.2.1(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedtype-check@0.4.0(transitive)
- Removedtypescript@3.9.10(transitive)
- Removedwhich@2.0.2(transitive)
- Removedyocto-queue@0.1.0(transitive)