eslint-plugin-obsidian 2.11.2 → 3.0.0-alpha.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/dist/dto/callExpression.d.ts +1 -1
- package/dist/dto/callExpression.d.ts.map +1 -1
- package/dist/dto/callExpression.js +11 -4
- package/dist/dto/callExpression.js.map +1 -1
- package/dist/dto/class.d.ts +2 -1
- package/dist/dto/class.d.ts.map +1 -1
- package/dist/dto/class.js +10 -8
- package/dist/dto/class.js.map +1 -1
- package/dist/dto/classFile.d.ts.map +1 -1
- package/dist/dto/classFile.js +3 -0
- package/dist/dto/classFile.js.map +1 -1
- package/dist/dto/componentProps.js +3 -3
- package/dist/dto/componentProps.js.map +1 -1
- package/dist/dto/context.d.ts +1 -1
- package/dist/dto/context.d.ts.map +1 -1
- package/dist/dto/context.js +2 -2
- package/dist/dto/context.js.map +1 -1
- package/dist/dto/decorator.d.ts.map +1 -1
- package/dist/dto/decorator.js +1 -0
- package/dist/dto/decorator.js.map +1 -1
- package/dist/dto/file.d.ts.map +1 -1
- package/dist/dto/file.js +7 -6
- package/dist/dto/file.js.map +1 -1
- package/dist/dto/functionalComponent.js +1 -0
- package/dist/dto/functionalComponent.js.map +1 -1
- package/dist/dto/generics.d.ts +1 -0
- package/dist/dto/generics.d.ts.map +1 -1
- package/dist/dto/generics.js +2 -0
- package/dist/dto/generics.js.map +1 -1
- package/dist/dto/identifier.js +1 -0
- package/dist/dto/identifier.js.map +1 -1
- package/dist/dto/import.js +2 -1
- package/dist/dto/import.js.map +1 -1
- package/dist/dto/method.d.ts +1 -1
- package/dist/dto/method.d.ts.map +1 -1
- package/dist/dto/method.js +5 -5
- package/dist/dto/method.js.map +1 -1
- package/dist/dto/parameter.js +1 -0
- package/dist/dto/parameter.js.map +1 -1
- package/dist/dto/property.d.ts.map +1 -1
- package/dist/dto/property.js +1 -0
- package/dist/dto/property.js.map +1 -1
- package/dist/dto/types/missingType.js +1 -1
- package/dist/dto/types/missingType.js.map +1 -1
- package/dist/dto/types/singleType.js +3 -3
- package/dist/dto/types/singleType.js.map +1 -1
- package/dist/dto/types/typeIntersection.js +3 -2
- package/dist/dto/types/typeIntersection.js.map +1 -1
- package/dist/dto/types/typeLiteral.d.ts +1 -1
- package/dist/dto/types/typeLiteral.d.ts.map +1 -1
- package/dist/dto/types/typeLiteral.js +2 -4
- package/dist/dto/types/typeLiteral.js.map +1 -1
- package/dist/dto/types/typeReference.js +3 -2
- package/dist/dto/types/typeReference.js.map +1 -1
- package/dist/dto/variable.d.ts +1 -1
- package/dist/dto/variable.d.ts.map +1 -1
- package/dist/dto/variable.js +3 -2
- package/dist/dto/variable.js.map +1 -1
- package/dist/framework/fileReader.js +1 -0
- package/dist/framework/fileReader.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/rules/noCircularDependency/circularDependenciesDetector.d.ts.map +1 -1
- package/dist/rules/noCircularDependency/circularDependenciesDetector.js.map +1 -1
- package/dist/rules/noCircularDependency/createRule.d.ts.map +1 -1
- package/dist/rules/noCircularDependency/createRule.js +1 -2
- package/dist/rules/noCircularDependency/createRule.js.map +1 -1
- package/dist/rules/noCircularDependency/errorReporter.js +1 -0
- package/dist/rules/noCircularDependency/errorReporter.js.map +1 -1
- package/dist/rules/noCircularDependency/graphHandler.js +3 -1
- package/dist/rules/noCircularDependency/graphHandler.js.map +1 -1
- package/dist/rules/noCircularDependency/index.d.ts +2 -2
- package/dist/rules/noCircularDependency/index.d.ts.map +1 -1
- package/dist/rules/noCircularDependency/index.js +1 -2
- package/dist/rules/noCircularDependency/index.js.map +1 -1
- package/dist/rules/stronglyTypedInjectComponent/createRule.d.ts +0 -1
- package/dist/rules/stronglyTypedInjectComponent/createRule.d.ts.map +1 -1
- package/dist/rules/stronglyTypedInjectComponent/createRule.js +1 -2
- package/dist/rules/stronglyTypedInjectComponent/createRule.js.map +1 -1
- package/dist/rules/stronglyTypedInjectComponent/index.d.ts +2 -2
- package/dist/rules/stronglyTypedInjectComponent/index.d.ts.map +1 -1
- package/dist/rules/stronglyTypedInjectComponent/index.js +1 -2
- package/dist/rules/stronglyTypedInjectComponent/index.js.map +1 -1
- package/dist/rules/stronglyTypedInjectComponent/injectComponentHandler.js +4 -2
- package/dist/rules/stronglyTypedInjectComponent/injectComponentHandler.js.map +1 -1
- package/dist/rules/stronglyTypedInjectComponent/result/errorReporter.js +1 -0
- package/dist/rules/stronglyTypedInjectComponent/result/errorReporter.js.map +1 -1
- package/dist/rules/stronglyTypedInjectComponent/result/missingTypeError.js +3 -1
- package/dist/rules/stronglyTypedInjectComponent/result/missingTypeError.js.map +1 -1
- package/dist/rules/stronglyTypedInjectComponent/result/redundantTypeError.js +2 -1
- package/dist/rules/stronglyTypedInjectComponent/result/redundantTypeError.js.map +1 -1
- package/dist/rules/stronglyTypedInjectComponent/result/success.js +1 -3
- package/dist/rules/stronglyTypedInjectComponent/result/success.js.map +1 -1
- package/dist/rules/stronglyTypedInjectComponent/typeValidator.js +12 -13
- package/dist/rules/stronglyTypedInjectComponent/typeValidator.js.map +1 -1
- package/dist/rules/unresolvedProviderDependencies/createRule.d.ts.map +1 -1
- package/dist/rules/unresolvedProviderDependencies/createRule.js +1 -2
- package/dist/rules/unresolvedProviderDependencies/createRule.js.map +1 -1
- package/dist/rules/unresolvedProviderDependencies/dependencyResolver.js +2 -1
- package/dist/rules/unresolvedProviderDependencies/dependencyResolver.js.map +1 -1
- package/dist/rules/unresolvedProviderDependencies/errorReporter.d.ts.map +1 -1
- package/dist/rules/unresolvedProviderDependencies/errorReporter.js +1 -2
- package/dist/rules/unresolvedProviderDependencies/errorReporter.js.map +1 -1
- package/dist/rules/unresolvedProviderDependencies/graphHandler.js +4 -1
- package/dist/rules/unresolvedProviderDependencies/graphHandler.js.map +1 -1
- package/dist/rules/unresolvedProviderDependencies/index.d.ts +2 -2
- package/dist/rules/unresolvedProviderDependencies/index.d.ts.map +1 -1
- package/dist/rules/unresolvedProviderDependencies/index.js +1 -2
- package/dist/rules/unresolvedProviderDependencies/index.js.map +1 -1
- package/dist/rules/unresolvedProviderDependencies/resolvedDependencyChecker.d.ts.map +1 -1
- package/dist/rules/unresolvedProviderDependencies/resolvedDependencyChecker.js +2 -2
- package/dist/rules/unresolvedProviderDependencies/resolvedDependencyChecker.js.map +1 -1
- package/dist/rules/unresolvedProviderDependencies/subgraphResolver.js +4 -3
- package/dist/rules/unresolvedProviderDependencies/subgraphResolver.js.map +1 -1
- package/dist/utils/array.d.ts +1 -1
- package/dist/utils/array.d.ts.map +1 -1
- package/dist/utils/array.js +3 -4
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/assertions.js +1 -2
- package/dist/utils/assertions.js.map +1 -1
- package/dist/utils/ast.d.ts +1 -1
- package/dist/utils/ast.d.ts.map +1 -1
- package/dist/utils/ast.js +31 -31
- package/dist/utils/ast.js.map +1 -1
- package/dist/utils/regex.js +1 -2
- package/dist/utils/regex.js.map +1 -1
- package/package.json +25 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphHandler.js","sourceRoot":"","sources":["../../../src/rules/unresolvedProviderDependencies/graphHandler.ts"],"names":[],"mappings":";;;AAEA,mDAAsE;AAGtE,2EAAwE;AAExE,MAAa,YAAY;
|
|
1
|
+
{"version":3,"file":"graphHandler.js","sourceRoot":"","sources":["../../../src/rules/unresolvedProviderDependencies/graphHandler.ts"],"names":[],"mappings":";;;AAEA,mDAAsE;AAGtE,2EAAwE;AAExE,MAAa,YAAY;IAEb;IACA;IACA;IAHV,YACU,OAAgB,EAChB,kBAAsC,EACtC,4BAAuD,IAAI,qDAAyB,EAAE;QAFtF,YAAO,GAAP,OAAO,CAAS;QAChB,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,8BAAyB,GAAzB,yBAAyB,CAA6D;IAC5F,CAAC;IAEE,MAAM,CAAC,KAAY,EAAE,OAAiB;QAC3C,IAAI,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;YAClC,MAAM,YAAY,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;YACnF,MAAM,yBAAyB,GAAG,IAAI,CAAC,yBAAyB,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;YAC5F,IAAA,mDAAmC,EAAC,IAAI,CAAC,OAAO,EAAE,yBAAyB,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;IAEO,iBAAiB,CAAC,KAAY;QACpC,OAAO,KAAK,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;CACF;AAlBD,oCAkBC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
import { PathResolver } from '../../framework/pathResolver';
|
|
3
|
-
export declare const unresolvedProviderDependenciesGenerator: (pathResolver?: PathResolver) =>
|
|
3
|
+
export declare const unresolvedProviderDependenciesGenerator: (pathResolver?: PathResolver) => ESLintUtils.RuleModule<"unresolved-provider-dependencies", [], unknown, ESLintUtils.RuleListener>;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/unresolvedProviderDependencies/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/unresolvedProviderDependencies/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,0BAA0B,CAAC;AAGtE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAU5D,eAAO,MAAM,uCAAuC,kBACpC,YAAY,sGAmB3B,CAAC"}
|
|
@@ -6,7 +6,7 @@ const createRule_1 = require("./createRule");
|
|
|
6
6
|
const pathResolver_1 = require("../../framework/pathResolver");
|
|
7
7
|
const fileReader_1 = require("../../framework/fileReader");
|
|
8
8
|
const context_1 = require("../../dto/context");
|
|
9
|
-
const createRule = utils_1.ESLintUtils.RuleCreator(
|
|
9
|
+
const createRule = utils_1.ESLintUtils.RuleCreator(name => `https://wix-incubator.github.io/obsidian/docs/documentation/meta/eslint#${name}`);
|
|
10
10
|
const unresolvedProviderDependenciesGenerator = (pathResolver = new pathResolver_1.PathResolver()) => {
|
|
11
11
|
return createRule({
|
|
12
12
|
create: (context) => {
|
|
@@ -16,7 +16,6 @@ const unresolvedProviderDependenciesGenerator = (pathResolver = new pathResolver
|
|
|
16
16
|
meta: {
|
|
17
17
|
docs: {
|
|
18
18
|
description: 'Dependencies must be defined in the graph or its subgraphs.',
|
|
19
|
-
recommended: 'strict',
|
|
20
19
|
},
|
|
21
20
|
messages: {
|
|
22
21
|
'unresolved-provider-dependencies': 'Dependency {{ dependencyName }} is unresolved.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/unresolvedProviderDependencies/index.ts"],"names":[],"mappings":";;;AAAA,oDAAsE;AAEtE,6CAAsC;AACtC,+DAA4D;AAC5D,2DAAwD;AACxD,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/unresolvedProviderDependencies/index.ts"],"names":[],"mappings":";;;AAAA,oDAAsE;AAEtE,6CAAsC;AACtC,+DAA4D;AAC5D,2DAAwD;AACxD,+CAA4C;AAI5C,MAAM,UAAU,GAAG,mBAAW,CAAC,WAAW,CACxC,IAAI,CAAC,EAAE,CAAC,2EAA2E,IAAI,EAAE,CAC1F,CAAC;AAEK,MAAM,uCAAuC,GAAG,CACrD,eAA6B,IAAI,2BAAY,EAAE,EAC/C,EAAE;IACF,OAAO,UAAU,CAAC;QAChB,MAAM,EAAE,CAAC,OAA4D,EAAE,EAAE;YACvE,OAAO,IAAA,mBAAM,EAAC,IAAI,iBAAO,CAAC,OAAO,CAAC,EAAE,IAAI,uBAAU,CAAC,YAAY,CAAC,CAAC,CAAC;QACpE,CAAC;QACD,IAAI,EAAE,kCAAkC;QACxC,IAAI,EAAE;YACJ,IAAI,EAAE;gBACJ,WAAW,EAAE,6DAA6D;aAC3E;YACD,QAAQ,EAAE;gBACR,kCAAkC,EAAE,gDAAgD;aACrF;YACD,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,SAAS;SAChB;QACD,cAAc,EAAE,EAAE;KACnB,CAAgB,CAAC;AACpB,CAAC,CAAC;AApBW,QAAA,uCAAuC,2CAoBlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolvedDependencyChecker.d.ts","sourceRoot":"","sources":["../../../src/rules/unresolvedProviderDependencies/resolvedDependencyChecker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG7C,KAAK,qBAAqB,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC;AAE5E,qBAAa,yBAAyB;
|
|
1
|
+
{"version":3,"file":"resolvedDependencyChecker.d.ts","sourceRoot":"","sources":["../../../src/rules/unresolvedProviderDependencies/resolvedDependencyChecker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG7C,KAAK,qBAAqB,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC;AAE5E,qBAAa,yBAAyB;IAC7B,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,qBAAqB;IAQzE,OAAO,CAAC,SAAS;CAMlB"}
|
|
@@ -5,8 +5,8 @@ class ResolvedDependencyChecker {
|
|
|
5
5
|
check(clazz, dependencies) {
|
|
6
6
|
const unresolvedDependency = clazz
|
|
7
7
|
.getDecoratedMethods('Provides')
|
|
8
|
-
.flatMap(
|
|
9
|
-
.find(
|
|
8
|
+
.flatMap(method => method.parameters)
|
|
9
|
+
.find(provider => !dependencies.includes(provider.name));
|
|
10
10
|
return this.getResult(unresolvedDependency);
|
|
11
11
|
}
|
|
12
12
|
getResult(unresolvedDependency) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolvedDependencyChecker.js","sourceRoot":"","sources":["../../../src/rules/unresolvedProviderDependencies/resolvedDependencyChecker.ts"],"names":[],"mappings":";;;AAKA,MAAa,yBAAyB;
|
|
1
|
+
{"version":3,"file":"resolvedDependencyChecker.js","sourceRoot":"","sources":["../../../src/rules/unresolvedProviderDependencies/resolvedDependencyChecker.ts"],"names":[],"mappings":";;;AAKA,MAAa,yBAAyB;IAC7B,KAAK,CAAC,KAAY,EAAE,YAAsB;QAC/C,MAAM,oBAAoB,GAAG,KAAK;aAC/B,mBAAmB,CAAC,UAAU,CAAC;aAC/B,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC;aACpC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IAC9C,CAAC;IAEO,SAAS,CAAC,oBAA2C;QAC3D,IAAI,oBAAoB,EAAE,CAAC;YACzB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,oBAAoB,CAAC,IAAI,EAAE,CAAC;QAC5F,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC1B,CAAC;CACF;AAfD,8DAeC"}
|
|
@@ -5,6 +5,7 @@ const ast_1 = require("../../utils/ast");
|
|
|
5
5
|
const classFile_1 = require("../../dto/classFile");
|
|
6
6
|
const file_1 = require("../../dto/file");
|
|
7
7
|
class SubgraphResolver {
|
|
8
|
+
fileReader;
|
|
8
9
|
constructor(fileReader) {
|
|
9
10
|
this.fileReader = fileReader;
|
|
10
11
|
}
|
|
@@ -12,7 +13,7 @@ class SubgraphResolver {
|
|
|
12
13
|
return [
|
|
13
14
|
...this.getImportedGraphs(clazz),
|
|
14
15
|
...this.getLocalGraphs(clazz),
|
|
15
|
-
].flatMap(
|
|
16
|
+
].flatMap(g => [g, ...this.resolve(g)]);
|
|
16
17
|
}
|
|
17
18
|
getImportedGraphs(clazz) {
|
|
18
19
|
const subgraphs = this.getSubgraphsPropertyFromGraphDecorator(clazz);
|
|
@@ -37,7 +38,7 @@ class SubgraphResolver {
|
|
|
37
38
|
return this.getLocalSubgraphClasses(subgraphs, clazz);
|
|
38
39
|
}
|
|
39
40
|
getSubgraphsPropertyFromGraphDecorator({ clazz }) {
|
|
40
|
-
const graphDecorator = clazz.
|
|
41
|
+
const graphDecorator = clazz.requireDecoratorIgnoreCase('Graph');
|
|
41
42
|
return graphDecorator.getProperty('subgraphs');
|
|
42
43
|
}
|
|
43
44
|
getLocalSubgraphClasses(subgraphs, clazz) {
|
|
@@ -56,7 +57,7 @@ class SubgraphResolver {
|
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
getSubgraphNamesFromDecoratorProperty(subgraphs) {
|
|
59
|
-
return (0, ast_1.mapArrayExpression)(subgraphs.getValue(),
|
|
60
|
+
return (0, ast_1.mapArrayExpression)(subgraphs.getValue(), el => el.name);
|
|
60
61
|
}
|
|
61
62
|
getLocalGraphNames(subgraphs, { imports }) {
|
|
62
63
|
return subgraphs.filter((subgraph) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subgraphResolver.js","sourceRoot":"","sources":["../../../src/rules/unresolvedProviderDependencies/subgraphResolver.ts"],"names":[],"mappings":";;;AACA,yC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CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,qCAAqC,CAAC,SAAmB;QAC/D,OAAO,IAAA,wBAAkB,EACvB,SAAS,CAAC,QAAQ,EAA4B,EAC9C,EAAE,CAAC,EAAE,CAAE,EAA0B,CAAC,IAAI,CACvC,CAAC;IACJ,CAAC;IAEO,kBAAkB,CAAC,SAAmB,EAAE,EAAE,OAAO,EAAa;QACpE,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE;YACnC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC9B,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACpC,CAAC,CAAC,KAAK,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AApED,4CAoEC"}
|
package/dist/utils/array.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/utils/array.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,WAEpC;AAED,wBAAgB,QAAQ,CAAC,KAAK,GAAE,
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/utils/array.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,WAEpC;AAED,wBAAgB,QAAQ,CAAC,KAAK,GAAE,MAAM,EAAO,UAE5C"}
|
package/dist/utils/array.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isEmpty = isEmpty;
|
|
4
|
+
exports.toString = toString;
|
|
4
5
|
function isEmpty(array) {
|
|
5
6
|
return array === undefined || array.length === 0;
|
|
6
7
|
}
|
|
7
|
-
exports.isEmpty = isEmpty;
|
|
8
8
|
function toString(array = []) {
|
|
9
|
-
return `[${array.map(
|
|
9
|
+
return `[${array.map(a => a.toString()).join(', ')}]`;
|
|
10
10
|
}
|
|
11
|
-
exports.toString = toString;
|
|
12
11
|
//# sourceMappingURL=array.js.map
|
package/dist/utils/array.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.js","sourceRoot":"","sources":["../../src/utils/array.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"array.js","sourceRoot":"","sources":["../../src/utils/array.ts"],"names":[],"mappings":";;AAAA,0BAEC;AAED,4BAEC;AAND,SAAgB,OAAO,CAAC,KAAa;IACnC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,QAAQ,CAAC,QAAkB,EAAE;IAC3C,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AACxD,CAAC"}
|
package/dist/utils/assertions.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertDefined =
|
|
3
|
+
exports.assertDefined = assertDefined;
|
|
4
4
|
function assertDefined(obj, message) {
|
|
5
5
|
if (!obj)
|
|
6
6
|
throw new Error(message || 'Expected object to exist');
|
|
7
7
|
}
|
|
8
|
-
exports.assertDefined = assertDefined;
|
|
9
8
|
//# sourceMappingURL=assertions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertions.js","sourceRoot":"","sources":["../../src/utils/assertions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assertions.js","sourceRoot":"","sources":["../../src/utils/assertions.ts"],"names":[],"mappings":";;AAAA,sCAEC;AAFD,SAAgB,aAAa,CAAI,GAAM,EAAE,OAAgB;IACvD,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,OAAO,IAAI,0BAA0B,CAAC,CAAC;AACnE,CAAC"}
|
package/dist/utils/ast.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type TSESTree } from '@typescript-eslint/types';
|
|
2
2
|
import type { ArrayExpressionElement } from '../types';
|
|
3
3
|
export declare function isClassLike(node: TSESTree.Node): node is TSESTree.ClassDeclaration;
|
|
4
4
|
export declare function isTypeReference(node?: TSESTree.Node): node is TSESTree.TSTypeReference;
|
package/dist/utils/ast.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/utils/ast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/utils/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGvD,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,gBAAgB,CAWlF;AAED,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,eAAe,CAEtF;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,aAAa,CAEjF;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,iBAAiB,CAE3F;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,gBAAgB,CAEzF;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,gBAAgB,GAAG,SAAS,CAW9F;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,GAAG,QAAQ,CAAC,OAAO,CAQhF;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,YAAY,EAAE,MAAM,iCAMvF;AAUD,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,sBAAsB,KAAK,CAAC,OAE5G;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,QAAQ,CAAC,kBAAkB,CAEvG;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,QAAQ,CAAC,gBAAgB,CAEnG;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,QAAQ,CAAC,YAAY,CAExF;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,mBAAmB,CAE/F"}
|
package/dist/utils/ast.js
CHANGED
|
@@ -1,59 +1,65 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isClassLike = isClassLike;
|
|
4
|
+
exports.isTypeReference = isTypeReference;
|
|
5
|
+
exports.isTypeLiteral = isTypeLiteral;
|
|
6
|
+
exports.isImportDeclaration = isImportDeclaration;
|
|
7
|
+
exports.isMethodDefinition = isMethodDefinition;
|
|
8
|
+
exports.getClassDeclaration = getClassDeclaration;
|
|
9
|
+
exports.requireProgram = requireProgram;
|
|
10
|
+
exports.getDecoratorProperty = getDecoratorProperty;
|
|
11
|
+
exports.mapArrayExpression = mapArrayExpression;
|
|
12
|
+
exports.isTypeIntersection = isTypeIntersection;
|
|
13
|
+
exports.isTypeAnnotation = isTypeAnnotation;
|
|
14
|
+
exports.isAnyType = isAnyType;
|
|
15
|
+
exports.isVariableDeclaration = isVariableDeclaration;
|
|
16
|
+
const types_1 = require("@typescript-eslint/types");
|
|
4
17
|
const assertions_1 = require("./assertions");
|
|
5
18
|
function isClassLike(node) {
|
|
6
19
|
switch (node.type) {
|
|
7
|
-
case
|
|
20
|
+
case types_1.AST_NODE_TYPES.ClassDeclaration:
|
|
8
21
|
return true;
|
|
9
|
-
case
|
|
22
|
+
case types_1.AST_NODE_TYPES.ExportDefaultDeclaration:
|
|
10
23
|
return isClassLike(node.declaration);
|
|
11
|
-
case
|
|
24
|
+
case types_1.AST_NODE_TYPES.ExportNamedDeclaration:
|
|
12
25
|
return isClassLike(node.declaration);
|
|
13
26
|
default:
|
|
14
27
|
return false;
|
|
15
28
|
}
|
|
16
29
|
}
|
|
17
|
-
exports.isClassLike = isClassLike;
|
|
18
30
|
function isTypeReference(node) {
|
|
19
|
-
return
|
|
31
|
+
return node?.type === types_1.AST_NODE_TYPES.TSTypeReference;
|
|
20
32
|
}
|
|
21
|
-
exports.isTypeReference = isTypeReference;
|
|
22
33
|
function isTypeLiteral(node) {
|
|
23
|
-
return node.type ===
|
|
34
|
+
return node.type === types_1.AST_NODE_TYPES.TSTypeLiteral;
|
|
24
35
|
}
|
|
25
|
-
exports.isTypeLiteral = isTypeLiteral;
|
|
26
36
|
function isImportDeclaration(node) {
|
|
27
|
-
return node.type ===
|
|
37
|
+
return node.type === types_1.AST_NODE_TYPES.ImportDeclaration;
|
|
28
38
|
}
|
|
29
|
-
exports.isImportDeclaration = isImportDeclaration;
|
|
30
39
|
function isMethodDefinition(node) {
|
|
31
|
-
return node.type ===
|
|
40
|
+
return node.type === types_1.AST_NODE_TYPES.MethodDefinition;
|
|
32
41
|
}
|
|
33
|
-
exports.isMethodDefinition = isMethodDefinition;
|
|
34
42
|
function getClassDeclaration(node) {
|
|
35
43
|
switch (node.type) {
|
|
36
|
-
case
|
|
44
|
+
case types_1.AST_NODE_TYPES.ClassDeclaration:
|
|
37
45
|
return node;
|
|
38
|
-
case
|
|
46
|
+
case types_1.AST_NODE_TYPES.ExportDefaultDeclaration:
|
|
39
47
|
return getClassDeclaration(node.declaration);
|
|
40
|
-
case
|
|
48
|
+
case types_1.AST_NODE_TYPES.ExportNamedDeclaration:
|
|
41
49
|
return getClassDeclaration(node.declaration);
|
|
42
50
|
default:
|
|
43
51
|
return undefined;
|
|
44
52
|
}
|
|
45
53
|
}
|
|
46
|
-
exports.getClassDeclaration = getClassDeclaration;
|
|
47
54
|
function requireProgram(node) {
|
|
48
55
|
(0, assertions_1.assertDefined)(node);
|
|
49
56
|
switch (node.type) {
|
|
50
|
-
case
|
|
57
|
+
case types_1.AST_NODE_TYPES.Program:
|
|
51
58
|
return node;
|
|
52
59
|
default:
|
|
53
60
|
return requireProgram(node.parent);
|
|
54
61
|
}
|
|
55
62
|
}
|
|
56
|
-
exports.requireProgram = requireProgram;
|
|
57
63
|
function getDecoratorProperty(decorator, propertyName) {
|
|
58
64
|
const expression = decorator.expression;
|
|
59
65
|
const property = expression.arguments.map((argument) => {
|
|
@@ -61,32 +67,26 @@ function getDecoratorProperty(decorator, propertyName) {
|
|
|
61
67
|
})[0];
|
|
62
68
|
return property;
|
|
63
69
|
}
|
|
64
|
-
exports.getDecoratorProperty = getDecoratorProperty;
|
|
65
70
|
function getObjectProperty(obj, propertyName) {
|
|
66
71
|
return obj.properties.find((property) => {
|
|
67
|
-
return property.type ===
|
|
68
|
-
&& property.key.type ===
|
|
72
|
+
return property.type === types_1.AST_NODE_TYPES.Property
|
|
73
|
+
&& property.key.type === types_1.AST_NODE_TYPES.Identifier
|
|
69
74
|
&& property.key.name === propertyName;
|
|
70
75
|
});
|
|
71
76
|
}
|
|
72
77
|
function mapArrayExpression(array, map) {
|
|
73
78
|
return array.elements.map(map);
|
|
74
79
|
}
|
|
75
|
-
exports.mapArrayExpression = mapArrayExpression;
|
|
76
80
|
function isTypeIntersection(node) {
|
|
77
|
-
return
|
|
81
|
+
return node?.type === types_1.AST_NODE_TYPES.TSIntersectionType;
|
|
78
82
|
}
|
|
79
|
-
exports.isTypeIntersection = isTypeIntersection;
|
|
80
83
|
function isTypeAnnotation(node) {
|
|
81
|
-
return
|
|
84
|
+
return node?.type === types_1.AST_NODE_TYPES.TSTypeAnnotation;
|
|
82
85
|
}
|
|
83
|
-
exports.isTypeAnnotation = isTypeAnnotation;
|
|
84
86
|
function isAnyType(node) {
|
|
85
|
-
return
|
|
87
|
+
return node?.type === types_1.AST_NODE_TYPES.TSAnyKeyword;
|
|
86
88
|
}
|
|
87
|
-
exports.isAnyType = isAnyType;
|
|
88
89
|
function isVariableDeclaration(node) {
|
|
89
|
-
return node.type ===
|
|
90
|
+
return node.type === types_1.AST_NODE_TYPES.VariableDeclaration;
|
|
90
91
|
}
|
|
91
|
-
exports.isVariableDeclaration = isVariableDeclaration;
|
|
92
92
|
//# sourceMappingURL=ast.js.map
|
package/dist/utils/ast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/utils/ast.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/utils/ast.ts"],"names":[],"mappings":";;AAIA,kCAWC;AAED,0CAEC;AAED,sCAEC;AAED,kDAEC;AAED,gDAEC;AAED,kDAWC;AAED,wCAQC;AAED,oDAMC;AAUD,gDAEC;AAED,gDAEC;AAED,4CAEC;AAED,8BAEC;AAED,sDAEC;AA1FD,oDAAyE;AAEzE,6CAA6C;AAE7C,SAAgB,WAAW,CAAC,IAAm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CAAC,YAAY,CAAC;AACpD,CAAC;AAED,SAAgB,qBAAqB,CAAC,IAAmB;IACvD,OAAO,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,mBAAmB,CAAC;AAC1D,CAAC"}
|
package/dist/utils/regex.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stringToRegex =
|
|
3
|
+
exports.stringToRegex = stringToRegex;
|
|
4
4
|
function stringToRegex(str) {
|
|
5
5
|
const main = str.match(/\/(.+)\/.*/)[1];
|
|
6
6
|
const options = str.match(/\/.+\/(.*)/)[1];
|
|
7
7
|
return new RegExp(main, options);
|
|
8
8
|
}
|
|
9
|
-
exports.stringToRegex = stringToRegex;
|
|
10
9
|
//# sourceMappingURL=regex.js.map
|
package/dist/utils/regex.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regex.js","sourceRoot":"","sources":["../../src/utils/regex.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"regex.js","sourceRoot":"","sources":["../../src/utils/regex.ts"],"names":[],"mappings":";;AAAA,sCAIC;AAJD,SAAgB,aAAa,CAAC,GAAW;IACvC,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,YAAY,CAAE,CAAC,CAAC,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,YAAY,CAAE,CAAC,CAAC,CAAC,CAAC;IAC5C,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACnC,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"name": "eslint-plugin-obsidian",
|
|
3
3
|
"description": "ESLint rules for Obsidian",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "3.0.0-alpha.2",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "npx tsc --project tsconfig.prod.json",
|
|
8
8
|
"test": "npx jest",
|
|
9
|
-
"lint": "eslint
|
|
9
|
+
"lint": "eslint"
|
|
10
10
|
},
|
|
11
11
|
"author": "Orly Dadashev",
|
|
12
12
|
"files": [
|
|
@@ -15,13 +15,11 @@
|
|
|
15
15
|
"LICENSE"
|
|
16
16
|
],
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"eslint": "8.
|
|
19
|
-
"eslint
|
|
20
|
-
"react-obsidian": "
|
|
18
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
19
|
+
"eslint": "^8.0.0 || ^9.9.0",
|
|
20
|
+
"react-obsidian": "3.x.x"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@typescript-eslint/parser": "6.6.x",
|
|
24
|
-
"@typescript-eslint/utils": "6.6.x",
|
|
25
23
|
"lodash": "^4.17.21"
|
|
26
24
|
},
|
|
27
25
|
"devDependencies": {
|
|
@@ -33,24 +31,27 @@
|
|
|
33
31
|
"@babel/preset-react": "7.22.x",
|
|
34
32
|
"@babel/preset-typescript": "7.22.x",
|
|
35
33
|
"@babel/types": "7.24.x",
|
|
36
|
-
"@eslint/
|
|
37
|
-
"@eslint/
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@types/
|
|
41
|
-
"@
|
|
42
|
-
"@typescript-eslint/
|
|
43
|
-
"@typescript-eslint/
|
|
44
|
-
"@typescript-eslint/
|
|
34
|
+
"@eslint/compat": "^1.1.1",
|
|
35
|
+
"@eslint/eslintrc": "^3.1.0",
|
|
36
|
+
"@eslint/js": "^9.9.0",
|
|
37
|
+
"@stylistic/eslint-plugin": "^2.7.2",
|
|
38
|
+
"@types/eslint": "^9.6.1",
|
|
39
|
+
"@types/node": "20.16.x",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^8.4.0",
|
|
41
|
+
"@typescript-eslint/parser": "8.4.0",
|
|
42
|
+
"@typescript-eslint/rule-tester": "^8.4.0",
|
|
43
|
+
"@typescript-eslint/types": "^8.4.0",
|
|
44
|
+
"@typescript-eslint/typescript-estree": "^8.4.0",
|
|
45
|
+
"@typescript-eslint/utils": "8.4.0",
|
|
45
46
|
"cross-env": "^7.0.3",
|
|
46
|
-
"eslint": "
|
|
47
|
-
"eslint-plugin-
|
|
48
|
-
"eslint-plugin-
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"jest": "29.
|
|
52
|
-
"jest-extended": "^4.0.
|
|
53
|
-
"typescript": "^
|
|
47
|
+
"eslint": "^9.9.1",
|
|
48
|
+
"eslint-plugin-jest": "^28.8.3",
|
|
49
|
+
"eslint-plugin-unused-imports": "^4.1.3",
|
|
50
|
+
"globals": "^15.9.0",
|
|
51
|
+
"jest": "^29.7.0",
|
|
52
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
53
|
+
"jest-extended": "^4.0.2",
|
|
54
|
+
"typescript": "^5.5.4"
|
|
54
55
|
},
|
|
55
56
|
"keywords": [
|
|
56
57
|
"react-obsidian",
|