@typescript-eslint/experimental-utils 1.9.1-alpha.8 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +16 -17
- package/dist/eslint-utils/RuleCreator.d.ts +2 -5
- package/dist/eslint-utils/RuleCreator.d.ts.map +1 -1
- package/dist/eslint-utils/RuleCreator.js +1 -3
- package/dist/eslint-utils/RuleCreator.js.map +1 -1
- package/dist/eslint-utils/deepMerge.d.ts +3 -2
- package/dist/eslint-utils/deepMerge.d.ts.map +1 -1
- package/dist/eslint-utils/deepMerge.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +8 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.10.2](https://github.com/typescript-eslint/typescript-eslint/compare/v1.10.1...v1.10.2) (2019-06-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @typescript-eslint/experimental-utils
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.10.1](https://github.com/typescript-eslint/typescript-eslint/compare/v1.10.0...v1.10.1) (2019-06-09)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @typescript-eslint/experimental-utils
|
|
17
|
+
|
|
18
|
+
# [1.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.9.0...v1.10.0) (2019-06-09)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **experimental-utils:** add `endLine` and `endColumn` ([#517](https://github.com/typescript-eslint/typescript-eslint/issues/517)) ([d9e5f15](https://github.com/typescript-eslint/typescript-eslint/commit/d9e5f15))
|
|
23
|
+
- **experimental-utils:** Avoid typescript import at runtime ([#584](https://github.com/typescript-eslint/typescript-eslint/issues/584)) ([fac5c7d](https://github.com/typescript-eslint/typescript-eslint/commit/fac5c7d)), closes [/github.com/typescript-eslint/typescript-eslint/pull/425#issuecomment-498162293](https://github.com//github.com/typescript-eslint/typescript-eslint/pull/425/issues/issuecomment-498162293)
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
- make utils/TSESLint export typed classes instead of just types ([#526](https://github.com/typescript-eslint/typescript-eslint/issues/526)) ([370ac72](https://github.com/typescript-eslint/typescript-eslint/commit/370ac72))
|
|
28
|
+
- support TypeScript versions >=3.2.1 <3.6.0 ([#597](https://github.com/typescript-eslint/typescript-eslint/issues/597)) ([5d2b962](https://github.com/typescript-eslint/typescript-eslint/commit/5d2b962))
|
|
29
|
+
|
|
6
30
|
# [1.9.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.8.0...v1.9.0) (2019-05-12)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @typescript-eslint/experimental-utils
|
package/README.md
CHANGED
|
@@ -14,20 +14,19 @@ Once it is stable, it will be renamed to `@typescript-eslint/util` for a `2.0.0`
|
|
|
14
14
|
|
|
15
15
|
## Exports
|
|
16
16
|
|
|
17
|
-
| Name
|
|
18
|
-
|
|
|
19
|
-
| [`TSESTree`]
|
|
20
|
-
| [`AST_NODE_TYPES`]
|
|
21
|
-
| [`AST_TOKEN_TYPES`]
|
|
22
|
-
| [`TSESLint`]
|
|
23
|
-
| [`ESLintUtils`]
|
|
24
|
-
| [`
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
[`
|
|
28
|
-
[`
|
|
29
|
-
[`
|
|
30
|
-
[`
|
|
31
|
-
[`
|
|
32
|
-
[`
|
|
33
|
-
[`TSESLint`](./src/ts-eslint)
|
|
17
|
+
| Name | Description |
|
|
18
|
+
| ------------------- | ---------------------------------------------------------------------------------------------- |
|
|
19
|
+
| [`TSESTree`] | Types for the TypeScript flavour of ESTree created by `@typescript-eslint/typescript-estree`. |
|
|
20
|
+
| [`AST_NODE_TYPES`] | An enum with the names of every single _node_ found in `TSESTree`. |
|
|
21
|
+
| [`AST_TOKEN_TYPES`] | An enum with the names of every single _token_ found in `TSESTree`. |
|
|
22
|
+
| [`TSESLint`] | Types for ESLint, correctly typed to work with the types found in `TSESTree`. |
|
|
23
|
+
| [`ESLintUtils`] | Tools for creating eslint rules with TypeScript. |
|
|
24
|
+
| [`ParserServices`] | The parser services provided when parsing a file using `@typescript-eslint/typescript-estree`. |
|
|
25
|
+
|
|
26
|
+
[`ast_node_types`]: ../packages/typescript-estree/src/ts-estree/ast-node-types.ts
|
|
27
|
+
[`ast_token_types`]: ../packages/typescript-estree/src/ts-estree/ast-node-types.ts
|
|
28
|
+
[`eslintutils`]: ./src/eslint-utils
|
|
29
|
+
[`eslintutils.createrule`]: ./src/eslint-utils/createRule.ts
|
|
30
|
+
[`parserservices`]: ../packages/typescript-estree/src/ts-estree/parser.ts
|
|
31
|
+
[`tsestree`]: ../packages/typescript-estree/src/ts-estree/ts-estree.ts
|
|
32
|
+
[`tseslint`]: ./src/ts-eslint
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { RuleMetaData, RuleMetaDataDocs, RuleListener, RuleContext, RuleModule } from '../ts-eslint/Rule';
|
|
2
|
-
declare type
|
|
3
|
-
declare type CreateRuleMetaDocs = RemoveProps<RuleMetaDataDocs, 'url'> & {
|
|
4
|
-
tslintName?: string;
|
|
5
|
-
};
|
|
2
|
+
declare type CreateRuleMetaDocs = Omit<RuleMetaDataDocs, 'url'>;
|
|
6
3
|
declare type CreateRuleMeta<TMessageIds extends string> = {
|
|
7
4
|
docs: CreateRuleMetaDocs;
|
|
8
|
-
} &
|
|
5
|
+
} & Omit<RuleMetaData<TMessageIds>, 'docs'>;
|
|
9
6
|
export declare function RuleCreator(urlCreator: (ruleName: string) => string): <TOptions extends any[], TMessageIds extends string, TRuleListener extends RuleListener = RuleListener>({ name, meta, defaultOptions, create, }: {
|
|
10
7
|
name: string;
|
|
11
8
|
meta: CreateRuleMeta<TMessageIds>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleCreator.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/RuleCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,UAAU,EACX,MAAM,mBAAmB,CAAC;AAI3B,aAAK,
|
|
1
|
+
{"version":3,"file":"RuleCreator.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/RuleCreator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,UAAU,EACX,MAAM,mBAAmB,CAAC;AAI3B,aAAK,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;AACxD,aAAK,cAAc,CAAC,WAAW,SAAS,MAAM,IAAI;IAChD,IAAI,EAAE,kBAAkB,CAAC;CAC1B,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;AAE5C,wBAAgB,WAAW,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM;;;;;uDAsCnE"}
|
|
@@ -6,9 +6,7 @@ function RuleCreator(urlCreator) {
|
|
|
6
6
|
// TODO - when the above PR lands; add type checking for the context.report `data` property
|
|
7
7
|
return function createRule({ name, meta, defaultOptions, create, }) {
|
|
8
8
|
return {
|
|
9
|
-
meta: Object.assign({}, meta, { docs: Object.assign({}, meta.docs, { url: urlCreator(name)
|
|
10
|
-
? [`\`${meta.docs.tslintName}\` from TSLint`]
|
|
11
|
-
: undefined }) }),
|
|
9
|
+
meta: Object.assign({}, meta, { docs: Object.assign({}, meta.docs, { url: urlCreator(name) }) }),
|
|
12
10
|
create(context) {
|
|
13
11
|
const optionsWithDefault = applyDefault_1.applyDefault(defaultOptions, context.options);
|
|
14
12
|
return create(context, optionsWithDefault);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleCreator.js","sourceRoot":"","sources":["../../src/eslint-utils/RuleCreator.ts"],"names":[],"mappings":";;AAOA,iDAA8C;
|
|
1
|
+
{"version":3,"file":"RuleCreator.js","sourceRoot":"","sources":["../../src/eslint-utils/RuleCreator.ts"],"names":[],"mappings":";;AAOA,iDAA8C;AAQ9C,SAAgB,WAAW,CAAC,UAAwC;IAClE,oHAAoH;IACpH,2FAA2F;IAC3F,OAAO,SAAS,UAAU,CAIxB,EACA,IAAI,EACJ,IAAI,EACJ,cAAc,EACd,MAAM,GASP;QACC,OAAO;YACL,IAAI,oBACC,IAAI,IACP,IAAI,oBACC,IAAI,CAAC,IAAI,IACZ,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,MAExB;YACD,MAAM,CAAC,OAAO;gBACZ,MAAM,kBAAkB,GAAG,2BAAY,CACrC,cAAc,EACd,OAAO,CAAC,OAAO,CAChB,CAAC;gBACF,OAAO,MAAM,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;YAC7C,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAtCD,kCAsCC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
declare type ObjectLike<T = any> = Record<string, T>;
|
|
2
2
|
/**
|
|
3
3
|
* Check if the variable contains an object stricly rejecting arrays
|
|
4
4
|
* @param obj an object
|
|
@@ -12,5 +12,6 @@ export declare function isObjectNotArray<T extends object>(obj: T | any[]): obj
|
|
|
12
12
|
* @param second The second object
|
|
13
13
|
* @returns a new object
|
|
14
14
|
*/
|
|
15
|
-
export declare function deepMerge
|
|
15
|
+
export declare function deepMerge(first?: ObjectLike, second?: ObjectLike): Record<string, any>;
|
|
16
|
+
export {};
|
|
16
17
|
//# sourceMappingURL=deepMerge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/deepMerge.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../src/eslint-utils/deepMerge.ts"],"names":[],"mappings":"AAAA,aAAK,UAAU,CAAC,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAE7C;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC,CAE3E;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,GAAE,UAAe,EAAE,MAAM,GAAE,UAAe,uBA2BxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepMerge.js","sourceRoot":"","sources":["../../src/eslint-utils/deepMerge.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;AACH,SAAgB,gBAAgB,CAAmB,GAAc;IAC/D,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC;AAFD,4CAEC;AAED;;;;;;GAMG;AACH,SAAgB,SAAS,
|
|
1
|
+
{"version":3,"file":"deepMerge.js","sourceRoot":"","sources":["../../src/eslint-utils/deepMerge.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;AACH,SAAgB,gBAAgB,CAAmB,GAAc;IAC/D,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC;AAFD,4CAEC;AAED;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,QAAoB,EAAE,EAAE,SAAqB,EAAE;IACvE,iDAAiD;IACjD,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAErE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAC5B,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACX,MAAM,WAAW,GAAG,GAAG,IAAI,KAAK,CAAC;QACjC,MAAM,YAAY,GAAG,GAAG,IAAI,MAAM,CAAC;QAEnC,IAAI,WAAW,IAAI,YAAY,EAAE;YAC/B,IAAI,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE;gBACjE,cAAc;gBACd,GAAG,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;aAC/C;iBAAM;gBACL,aAAa;gBACb,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;aACxB;SACF;aAAM,IAAI,WAAW,EAAE;YACtB,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;SACvB;aAAM;YACL,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;SACxB;QAED,OAAO,GAAG,CAAC;IACb,CAAC,EACD,EAAgB,CACjB,CAAC;AACJ,CAAC;AA3BD,8BA2BC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ import * as ESLintUtils from './eslint-utils';
|
|
|
2
2
|
import * as TSESLint from './ts-eslint';
|
|
3
3
|
import * as TSESLintScope from './ts-eslint-scope';
|
|
4
4
|
export { ESLintUtils, TSESLint, TSESLintScope };
|
|
5
|
-
export { AST_NODE_TYPES, AST_TOKEN_TYPES,
|
|
5
|
+
export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/typescript-estree/dist/ts-estree';
|
|
6
|
+
export { ParserServices, } from '@typescript-eslint/typescript-estree/dist/parser-options';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAQhD,OAAO,EACL,cAAc,EACd,eAAe,EACf,QAAQ,GACT,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EACL,cAAc,GACf,MAAM,0DAA0D,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,8 +15,11 @@ const TSESLintScope = __importStar(require("./ts-eslint-scope"));
|
|
|
15
15
|
exports.TSESLintScope = TSESLintScope;
|
|
16
16
|
// for convenience's sake - export the types directly from here so consumers
|
|
17
17
|
// don't need to reference/install both packages in their code
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
// NOTE - this uses hard links inside ts-estree to avoid initing the entire package
|
|
19
|
+
// via its main file (which imports typescript at runtime).
|
|
20
|
+
// Not every eslint-plugin written in typescript requires typescript at runtime.
|
|
21
|
+
var ts_estree_1 = require("@typescript-eslint/typescript-estree/dist/ts-estree");
|
|
22
|
+
exports.AST_NODE_TYPES = ts_estree_1.AST_NODE_TYPES;
|
|
23
|
+
exports.AST_TOKEN_TYPES = ts_estree_1.AST_TOKEN_TYPES;
|
|
24
|
+
exports.TSESTree = ts_estree_1.TSESTree;
|
|
22
25
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,4DAA8C;AAIrC,kCAAW;AAHpB,sDAAwC;AAGlB,4BAAQ;AAF9B,iEAAmD;AAEnB,sCAAa;AAE7C,4EAA4E;AAC5E,8DAA8D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,4DAA8C;AAIrC,kCAAW;AAHpB,sDAAwC;AAGlB,4BAAQ;AAF9B,iEAAmD;AAEnB,sCAAa;AAE7C,4EAA4E;AAC5E,8DAA8D;AAE9D,mFAAmF;AACnF,kEAAkE;AAClE,uFAAuF;AACvF,iFAI6D;AAH3D,qCAAA,cAAc,CAAA;AACd,sCAAA,eAAe,CAAA;AACf,+BAAA,QAAQ,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/experimental-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"description": "(Experimental) Utilities for working with TypeScript + ESLint together",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
"README.md",
|
|
17
17
|
"LICENSE"
|
|
18
18
|
],
|
|
19
|
-
"repository":
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
|
|
22
|
+
"directory": "packages/experimental-utils"
|
|
23
|
+
},
|
|
20
24
|
"bugs": {
|
|
21
25
|
"url": "https://github.com/typescript-eslint/typescript-eslint/issues"
|
|
22
26
|
},
|
|
@@ -32,12 +36,12 @@
|
|
|
32
36
|
"typecheck": "tsc --noEmit"
|
|
33
37
|
},
|
|
34
38
|
"dependencies": {
|
|
35
|
-
"@typescript-eslint/typescript-estree": "1.
|
|
39
|
+
"@typescript-eslint/typescript-estree": "1.10.2",
|
|
36
40
|
"eslint-scope": "^4.0.0"
|
|
37
41
|
},
|
|
38
42
|
"peerDependencies": {
|
|
39
43
|
"eslint": "*",
|
|
40
44
|
"typescript": "*"
|
|
41
45
|
},
|
|
42
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "0d10cb3cd7c1316fdae46a6d20111438bc289999"
|
|
43
47
|
}
|