react-obsidian 2.11.0-alpha.1 → 2.11.0
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/src/GraphProperties.js +3 -1
- package/dist/src/GraphProperties.js.map +1 -1
- package/dist/src/ProvidedPropertiesStore.js +9 -4
- package/dist/src/ProvidedPropertiesStore.js.map +1 -1
- package/dist/src/ReferenceCounter.js +5 -2
- package/dist/src/ReferenceCounter.js.map +1 -1
- package/dist/src/decorators/Graph.js +2 -1
- package/dist/src/decorators/Graph.js.map +1 -1
- package/dist/src/decorators/LifecycleBound.js +4 -2
- package/dist/src/decorators/LifecycleBound.js.map +1 -1
- package/dist/src/decorators/Memoize.d.ts.map +1 -1
- package/dist/src/decorators/Memoize.js +2 -1
- package/dist/src/decorators/Memoize.js.map +1 -1
- package/dist/src/decorators/Singleton.d.ts.map +1 -1
- package/dist/src/decorators/Singleton.js +2 -1
- package/dist/src/decorators/Singleton.js.map +1 -1
- package/dist/src/decorators/inject/Inject.d.ts +1 -1
- package/dist/src/decorators/inject/Inject.d.ts.map +1 -1
- package/dist/src/decorators/inject/Inject.js +2 -1
- package/dist/src/decorators/inject/Inject.js.map +1 -1
- package/dist/src/decorators/inject/Injectable.js +2 -1
- package/dist/src/decorators/inject/Injectable.js.map +1 -1
- package/dist/src/decorators/inject/LateInject.js +2 -1
- package/dist/src/decorators/inject/LateInject.js.map +1 -1
- package/dist/src/decorators/provides/MemoizeDescriptor.d.ts.map +1 -1
- package/dist/src/decorators/provides/MemoizeDescriptor.js +3 -1
- package/dist/src/decorators/provides/MemoizeDescriptor.js.map +1 -1
- package/dist/src/decorators/provides/Provides.js +2 -1
- package/dist/src/decorators/provides/Provides.js.map +1 -1
- package/dist/src/graph/CircularDependenciesDetector.js +1 -2
- package/dist/src/graph/CircularDependenciesDetector.js.map +1 -1
- package/dist/src/graph/ObjectGraph.d.ts +1 -1
- package/dist/src/graph/ObjectGraph.d.ts.map +1 -1
- package/dist/src/graph/ObjectGraph.js +6 -6
- package/dist/src/graph/ObjectGraph.js.map +1 -1
- package/dist/src/graph/PropertyRetriever.d.ts +1 -1
- package/dist/src/graph/PropertyRetriever.d.ts.map +1 -1
- package/dist/src/graph/PropertyRetriever.js +2 -3
- package/dist/src/graph/PropertyRetriever.js.map +1 -1
- package/dist/src/graph/PropertyRetrieverDelegate.d.ts +1 -1
- package/dist/src/graph/PropertyRetrieverDelegate.d.ts.map +1 -1
- package/dist/src/graph/ProviderBinder.d.ts.map +1 -1
- package/dist/src/graph/ProviderBinder.js +4 -2
- package/dist/src/graph/ProviderBinder.js.map +1 -1
- package/dist/src/graph/ServiceLocatorFactory.d.ts.map +1 -1
- package/dist/src/graph/VisitedNodes.js +4 -2
- package/dist/src/graph/VisitedNodes.js.map +1 -1
- package/dist/src/graph/registry/GraphMiddlewareChain.js +0 -1
- package/dist/src/graph/registry/GraphMiddlewareChain.js.map +1 -1
- package/dist/src/graph/registry/GraphRegistry.d.ts.map +1 -1
- package/dist/src/graph/registry/GraphRegistry.js +26 -19
- package/dist/src/graph/registry/GraphRegistry.js.map +1 -1
- package/dist/src/graph/registry/Middleware.js +0 -1
- package/dist/src/graph/registry/Middleware.js.map +1 -1
- package/dist/src/graph/registry/ObtainLifecycleBoundGraphException.js.map +1 -1
- package/dist/src/injectors/class/ClassInjector.d.ts.map +1 -1
- package/dist/src/injectors/class/ClassInjector.js +5 -6
- package/dist/src/injectors/class/ClassInjector.js.map +1 -1
- package/dist/src/injectors/class/ConstructorArgs.js +3 -1
- package/dist/src/injectors/class/ConstructorArgs.js.map +1 -1
- package/dist/src/injectors/class/InjectionMetadata.js +9 -5
- package/dist/src/injectors/class/InjectionMetadata.js.map +1 -1
- package/dist/src/injectors/class/LateInjector.js +1 -1
- package/dist/src/injectors/class/LateInjector.js.map +1 -1
- package/dist/src/injectors/components/ComponentInjector.js.map +1 -1
- package/dist/src/injectors/components/InjectComponent.d.ts +1 -1
- package/dist/src/injectors/components/InjectComponent.d.ts.map +1 -1
- package/dist/src/injectors/components/InjectComponent.js.map +1 -1
- package/dist/src/injectors/components/PropsInjector.d.ts.map +1 -1
- package/dist/src/injectors/components/PropsInjector.js +1 -1
- package/dist/src/injectors/components/PropsInjector.js.map +1 -1
- package/dist/src/injectors/components/useGraph.d.ts +1 -1
- package/dist/src/injectors/components/useGraph.d.ts.map +1 -1
- package/dist/src/injectors/components/useGraph.js +1 -1
- package/dist/src/injectors/components/useGraph.js.map +1 -1
- package/dist/src/injectors/components/useInjectionToken.d.ts.map +1 -1
- package/dist/src/injectors/components/useInjectionToken.js +1 -1
- package/dist/src/injectors/components/useInjectionToken.js.map +1 -1
- package/dist/src/injectors/hooks/HookInjector.js +1 -2
- package/dist/src/injectors/hooks/HookInjector.js.map +1 -1
- package/dist/src/injectors/hooks/InjectHook.d.ts.map +1 -1
- package/dist/src/injectors/hooks/InjectHook.js +3 -2
- package/dist/src/injectors/hooks/InjectHook.js.map +1 -1
- package/dist/src/model/Model.js.map +1 -1
- package/dist/src/observable/Observable.d.ts.map +1 -1
- package/dist/src/observable/Observable.js +2 -3
- package/dist/src/observable/Observable.js.map +1 -1
- package/dist/src/observable/cold/ColdMediatorObservable.d.ts.map +1 -1
- package/dist/src/observable/cold/ColdMediatorObservable.js +4 -3
- package/dist/src/observable/cold/ColdMediatorObservable.js.map +1 -1
- package/dist/src/observable/cold/useColdObservers.js +2 -1
- package/dist/src/observable/cold/useColdObservers.js.map +1 -1
- package/dist/src/observable/mapObservablesToValues.js +2 -1
- package/dist/src/observable/mapObservablesToValues.js.map +1 -1
- package/dist/src/observable/mediator/MediatorObservable.js.map +1 -1
- package/dist/src/observable/useObserver.d.ts.map +1 -1
- package/dist/src/observable/useObserver.js +3 -1
- package/dist/src/observable/useObserver.js.map +1 -1
- package/dist/src/observable/useObservers.d.ts +1 -2
- package/dist/src/observable/useObservers.d.ts.map +1 -1
- package/dist/src/observable/useObservers.js +3 -2
- package/dist/src/observable/useObservers.js.map +1 -1
- package/dist/src/utils/React.d.ts.map +1 -1
- package/dist/src/utils/React.js +3 -2
- package/dist/src/utils/React.js.map +1 -1
- package/dist/src/utils/isDev.js +8 -4
- package/dist/src/utils/isDev.js.map +1 -1
- package/dist/src/utils/isNumber.js +2 -1
- package/dist/src/utils/isNumber.js.map +1 -1
- package/dist/src/utils/uniqueId.js +3 -2
- package/dist/src/utils/uniqueId.js.map +1 -1
- package/dist/test/fixtures/CircularDependencyFromSubgraph.d.ts +1 -1
- package/dist/test/fixtures/CircularDependencyFromSubgraph.d.ts.map +1 -1
- package/dist/test/fixtures/CircularDependencyFromSubgraph.js +2 -2
- package/dist/test/fixtures/CircularDependencyFromSubgraph.js.map +1 -1
- package/dist/test/fixtures/CircularDependencyGraph.d.ts.map +1 -1
- package/dist/test/fixtures/CircularDependencyGraph.js +2 -3
- package/dist/test/fixtures/CircularDependencyGraph.js.map +1 -1
- package/dist/test/fixtures/CircularDependencyGraph2.d.ts.map +1 -1
- package/dist/test/fixtures/CircularDependencyGraph2.js +2 -3
- package/dist/test/fixtures/CircularDependencyGraph2.js.map +1 -1
- package/dist/test/fixtures/GraphWithMultipleDependencies.js +2 -2
- package/dist/test/fixtures/GraphWithMultipleDependencies.js.map +1 -1
- package/dist/test/fixtures/GraphWithOnBind.d.ts +1 -1
- package/dist/test/fixtures/GraphWithOnBind.d.ts.map +1 -1
- package/dist/test/fixtures/GraphWithOnBind.js +2 -3
- package/dist/test/fixtures/GraphWithOnBind.js.map +1 -1
- package/dist/test/fixtures/LifecycleBoundGraph.js +4 -6
- package/dist/test/fixtures/LifecycleBoundGraph.js.map +1 -1
- package/dist/test/fixtures/LifecycleBoundWithLifecycleBoundSubgraph.d.ts.map +1 -1
- package/dist/test/fixtures/LifecycleBoundWithLifecycleBoundSubgraph.js +2 -2
- package/dist/test/fixtures/LifecycleBoundWithLifecycleBoundSubgraph.js.map +1 -1
- package/dist/test/fixtures/MainGraph.js.map +1 -1
- package/dist/test/fixtures/ScopedLifecycleBoundGraph.js +2 -2
- package/dist/test/fixtures/ScopedLifecycleBoundGraph.js.map +1 -1
- package/dist/test/fixtures/SingletonGraph.js +4 -1
- package/dist/test/fixtures/SingletonGraph.js.map +1 -1
- package/dist/test/fixtures/StringProvider.js +0 -1
- package/dist/test/fixtures/StringProvider.js.map +1 -1
- package/dist/test/fixtures/Subgraph.js.map +1 -1
- package/dist/test/fixtures/SubgraphWithCircularDependency.d.ts.map +1 -1
- package/dist/test/fixtures/SubgraphWithCircularDependency.js +2 -3
- package/dist/test/fixtures/SubgraphWithCircularDependency.js.map +1 -1
- package/dist/test/fixtures/ThrowingMainGraph.js.map +1 -1
- package/dist/test/fixtures/UniqueNumberGraph.d.ts.map +1 -1
- package/dist/test/fixtures/UniqueNumberGraph.js +3 -3
- package/dist/test/fixtures/UniqueNumberGraph.js.map +1 -1
- package/dist/testkit/index.d.ts.map +1 -1
- package/dist/testkit/index.js +1 -0
- package/dist/testkit/index.js.map +1 -1
- package/dist/testkit/mockGraphs.js +2 -1
- package/dist/testkit/mockGraphs.js.map +1 -1
- package/dist/testkit/mockModel.js +2 -1
- package/dist/testkit/mockModel.js.map +1 -1
- package/dist/transformers/babel-plugin-obsidian/helpers/index.d.ts +2 -2
- package/dist/transformers/babel-plugin-obsidian/helpers/index.d.ts.map +1 -1
- package/dist/transformers/babel-plugin-obsidian/helpers/index.js +16 -13
- package/dist/transformers/babel-plugin-obsidian/helpers/index.js.map +1 -1
- package/dist/transformers/babel-plugin-obsidian/index.d.ts.map +1 -1
- package/dist/transformers/babel-plugin-obsidian/index.js +1 -1
- package/dist/transformers/babel-plugin-obsidian/index.js.map +1 -1
- package/dist/transformers/babel-plugin-obsidian/unmagler/method.d.ts.map +1 -1
- package/dist/transformers/babel-plugin-obsidian/unmagler/method.js +3 -1
- package/dist/transformers/babel-plugin-obsidian/unmagler/method.js.map +1 -1
- package/dist/transformers/babel-plugin-obsidian/unmagler/property.js.map +1 -1
- package/package.json +25 -27
- package/src/decorators/Memoize.ts +1 -0
- package/src/decorators/inject/Inject.ts +1 -1
- package/src/decorators/provides/MemoizeDescriptor.ts +1 -0
- package/src/graph/ObjectGraph.ts +4 -2
- package/src/graph/PropertyRetriever.ts +4 -4
- package/src/graph/PropertyRetrieverDelegate.ts +1 -1
- package/src/graph/ProviderBinder.ts +2 -1
- package/src/graph/registry/GraphRegistry.ts +7 -7
- package/src/graph/registry/ObtainLifecycleBoundGraphException.ts +1 -1
- package/src/injectors/class/ClassInjector.ts +2 -2
- package/src/injectors/components/ComponentInjector.tsx +1 -1
- package/src/injectors/components/InjectComponent.ts +3 -3
- package/src/injectors/components/PropsInjector.ts +1 -0
- package/src/injectors/components/useGraph.ts +2 -1
- package/src/injectors/hooks/InjectHook.ts +1 -0
- package/src/observable/Observable.ts +2 -2
- package/src/observable/cold/ColdMediatorObservable.ts +1 -0
- package/src/observable/cold/useColdObservers.ts +1 -1
- package/src/observable/mediator/MediatorObservable.ts +1 -1
- package/src/observable/useObserver.ts +2 -1
- package/src/observable/useObservers.ts +3 -4
- package/src/utils/isDev.ts +2 -1
- package/testkit/index.ts +1 -0
- package/transformers/babel-plugin-obsidian/helpers/index.ts +8 -8
- package/transformers/babel-plugin-obsidian/index.ts +1 -0
- package/transformers/babel-plugin-obsidian/unmagler/method.ts +2 -1
- package/eslint.config.mjs +0 -140
|
@@ -2,16 +2,15 @@ import { useEffect, useState } from 'react';
|
|
|
2
2
|
import { MediatorObservable } from './mediator/MediatorObservable';
|
|
3
3
|
import { ObservedValues, Unsubscribe } from './types';
|
|
4
4
|
import { mapObservablesToValues } from './mapObservablesToValues';
|
|
5
|
-
import type { Observable } from './Observable';
|
|
6
5
|
|
|
7
|
-
export function useObservers<T extends Record<string,
|
|
6
|
+
export function useObservers<T extends Record<string, any>>(observables: T): ObservedValues<T> {
|
|
8
7
|
const [values, setValues] = useState(() => mapObservablesToValues(observables));
|
|
9
8
|
|
|
10
9
|
useEffect(() => {
|
|
11
10
|
const mediator = new MediatorObservable();
|
|
12
11
|
const unsubscribers: Unsubscribe[] = [];
|
|
13
12
|
|
|
14
|
-
Object.keys(observables).forEach((key) => {
|
|
13
|
+
Object.keys(observables as {}).forEach((key) => {
|
|
15
14
|
const onNext = (value: any) => setValues({ ...values, [key]: value });
|
|
16
15
|
mediator.addSource(observables[key], onNext);
|
|
17
16
|
|
|
@@ -20,7 +19,7 @@ export function useObservers<T extends Record<string, Observable<any>>>(observab
|
|
|
20
19
|
});
|
|
21
20
|
});
|
|
22
21
|
|
|
23
|
-
return () => unsubscribers.forEach(unsubscribe => unsubscribe());
|
|
22
|
+
return () => unsubscribers.forEach((unsubscribe) => unsubscribe());
|
|
24
23
|
}, []);
|
|
25
24
|
|
|
26
25
|
return values;
|
package/src/utils/isDev.ts
CHANGED
|
@@ -3,10 +3,11 @@ export function isDev(): boolean {
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
function isNodeDev(): boolean {
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
6
7
|
return ['test', 'development'].includes(process.env['NODE_ENV'] ?? '');
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
function isReactNativeDev(): boolean {
|
|
10
|
-
// @ts-
|
|
11
|
+
// @ts-ignore
|
|
11
12
|
return __DEV__ as boolean ?? false;
|
|
12
13
|
}
|
package/testkit/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ class TestKit {
|
|
|
7
7
|
* @deprecated testKit.mockGraphs is deprecated, use mockGraphs instead
|
|
8
8
|
*/
|
|
9
9
|
public mockGraphs(graphNameToGraph: Record<string, Constructable<ObjectGraph> | ((props: any) => ObjectGraph)>) {
|
|
10
|
+
// eslint-disable-next-line no-console
|
|
10
11
|
console.warn('testKit.mockGraphs is deprecated, use mockGraphs instead');
|
|
11
12
|
return mockGraphs(graphNameToGraph);
|
|
12
13
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-param-reassign */
|
|
1
2
|
import { types as t } from '@babel/core';
|
|
2
3
|
import {
|
|
3
4
|
CallExpression,
|
|
@@ -8,7 +9,6 @@ import {
|
|
|
8
9
|
ObjectExpression,
|
|
9
10
|
ObjectPattern,
|
|
10
11
|
TSParameterProperty,
|
|
11
|
-
Node,
|
|
12
12
|
} from '@babel/types';
|
|
13
13
|
|
|
14
14
|
const never = '';
|
|
@@ -39,7 +39,7 @@ export function addNameToProviderArguments(node: ClassMethod, decorator: Decorat
|
|
|
39
39
|
|
|
40
40
|
export function getDecoratorArgument(decorator: Decorator): ObjectExpression | undefined {
|
|
41
41
|
if (t.isCallExpression(decorator.expression)) {
|
|
42
|
-
return decorator.expression.arguments.find(a => t.isObjectExpression(a)) as ObjectExpression;
|
|
42
|
+
return decorator.expression.arguments.find((a) => t.isObjectExpression(a)) as ObjectExpression;
|
|
43
43
|
}
|
|
44
44
|
return undefined;
|
|
45
45
|
}
|
|
@@ -53,17 +53,17 @@ export function getDecoratorByName(
|
|
|
53
53
|
decorators: Array<Decorator> | undefined | null,
|
|
54
54
|
decoratorName: string,
|
|
55
55
|
): Decorator | undefined {
|
|
56
|
-
return decorators?.find(decorator => get(decorator, 'expression.callee.name') === decoratorName);
|
|
56
|
+
return decorators?.find((decorator) => get(decorator, 'expression.callee.name') === decoratorName);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
export function getDecoratorName(decorator?: Decorator): string | undefined {
|
|
60
60
|
return get(decorator, 'expression.callee.name');
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
export function paramsToDestructuringAssignment(params:
|
|
63
|
+
export function paramsToDestructuringAssignment(params: (Identifier | any)[]): ObjectPattern {
|
|
64
64
|
return t.objectPattern(params
|
|
65
|
-
.filter(p => t.isIdentifier(p))
|
|
66
|
-
.map(p => t.objectProperty(t.identifier(p.name), t.identifier(p.name))));
|
|
65
|
+
.filter((p) => t.isIdentifier(p))
|
|
66
|
+
.map((p) => t.objectProperty(t.identifier(p.name), t.identifier(p.name))));
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
export function passParamNameAsInjectArgument(
|
|
@@ -93,9 +93,9 @@ function getNodeName(node: AcceptedNodeType): string {
|
|
|
93
93
|
return node.name;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
function get
|
|
96
|
+
function get(node: any, path: string): any {
|
|
97
97
|
if (node === undefined || node === null) return undefined;
|
|
98
98
|
const [key, ...rest] = path.split('.');
|
|
99
|
-
if (rest.length === 0) return node[key]
|
|
99
|
+
if (rest.length === 0) return node[key];
|
|
100
100
|
return get(node[key], rest.join('.'));
|
|
101
101
|
}
|
|
@@ -16,8 +16,9 @@ function saveMethod(name: string, node: ClassMethod) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function convertProviderParamsToDestructuringAssignment(node: ClassMethod) {
|
|
19
|
-
if (node.params.length === 0) return;
|
|
19
|
+
if (node.params.length === 0) { return; }
|
|
20
20
|
const destructuredParams = paramsToDestructuringAssignment(node.params);
|
|
21
|
+
// eslint-disable-next-line no-param-reassign
|
|
21
22
|
node.params.length = 0;
|
|
22
23
|
node.params.push(destructuredParams);
|
|
23
24
|
}
|
package/eslint.config.mjs
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import stylistic from "@stylistic/eslint-plugin";
|
|
2
|
-
import eslintJest from "eslint-plugin-jest";
|
|
3
|
-
import obsidian from "eslint-plugin-obsidian";
|
|
4
|
-
import globals from "globals";
|
|
5
|
-
import tsParser from "@typescript-eslint/parser";
|
|
6
|
-
import eslintTs from "typescript-eslint";
|
|
7
|
-
import eslintJs from "@eslint/js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export default eslintTs.config(
|
|
11
|
-
{
|
|
12
|
-
ignores: ["**/*.d.ts", "**/*.js"],
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
files: ["**/*.ts", "**/*.tsx"],
|
|
16
|
-
name: "ReactObsidian",
|
|
17
|
-
languageOptions: {
|
|
18
|
-
globals: {
|
|
19
|
-
...globals.jest,
|
|
20
|
-
},
|
|
21
|
-
sourceType: "module",
|
|
22
|
-
parser: tsParser,
|
|
23
|
-
parserOptions: {
|
|
24
|
-
project: "tsconfig.json",
|
|
25
|
-
tsconfigRootDir: import.meta.dirname,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
settings: {
|
|
29
|
-
"import/resolver": {
|
|
30
|
-
node: {
|
|
31
|
-
extensions: [".js", ".jsx", ".ts", ".tsx"],
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
react: {
|
|
35
|
-
version: "detect",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
extends: [
|
|
39
|
-
eslintJs.configs.recommended,
|
|
40
|
-
...eslintTs.configs.recommendedTypeChecked,
|
|
41
|
-
eslintJest.configs['flat/recommended'],
|
|
42
|
-
stylistic.configs["recommended-flat"],
|
|
43
|
-
],
|
|
44
|
-
plugins: {
|
|
45
|
-
obsidian,
|
|
46
|
-
},
|
|
47
|
-
rules: {
|
|
48
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
49
|
-
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
50
|
-
"@typescript-eslint/no-empty-object-type": "off",
|
|
51
|
-
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
52
|
-
"@typescript-eslint/no-unsafe-argument": "off",
|
|
53
|
-
"@typescript-eslint/no-unsafe-return": "off",
|
|
54
|
-
"@typescript-eslint/no-unsafe-function-type": "off",
|
|
55
|
-
"@typescript-eslint/no-unsafe-call": "off",
|
|
56
|
-
"@typescript-eslint/unbound-method": "off",
|
|
57
|
-
"@typescript-eslint/no-unused-vars": [
|
|
58
|
-
"error",
|
|
59
|
-
{
|
|
60
|
-
"args": "all",
|
|
61
|
-
"argsIgnorePattern": "^_",
|
|
62
|
-
"caughtErrors": "all",
|
|
63
|
-
"caughtErrorsIgnorePattern": "^_",
|
|
64
|
-
"destructuredArrayIgnorePattern": "^_",
|
|
65
|
-
"varsIgnorePattern": "^_",
|
|
66
|
-
"ignoreRestSiblings": true
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"no-empty-function": ["error", {
|
|
70
|
-
allow: ["constructors"],
|
|
71
|
-
}],
|
|
72
|
-
"no-multiple-empty-lines": ["error", {
|
|
73
|
-
max: 1,
|
|
74
|
-
}],
|
|
75
|
-
"no-multi-spaces": "error",
|
|
76
|
-
"@stylistic/brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
77
|
-
"@stylistic/jsx-one-expression-per-line": ["error", {
|
|
78
|
-
"allow": "non-jsx"
|
|
79
|
-
}],
|
|
80
|
-
"@stylistic/max-len": ["error", {
|
|
81
|
-
code: 115,
|
|
82
|
-
comments: 200,
|
|
83
|
-
ignoreRegExpLiterals: true,
|
|
84
|
-
ignoreStrings: true,
|
|
85
|
-
ignoreTemplateLiterals: true,
|
|
86
|
-
}],
|
|
87
|
-
"@stylistic/max-statements-per-line": ["error", { "max": 2 }],
|
|
88
|
-
"@stylistic/no-extra-semi": "error",
|
|
89
|
-
|
|
90
|
-
"@stylistic/lines-between-class-members": ["error", "always", {
|
|
91
|
-
exceptAfterSingleLine: true,
|
|
92
|
-
}],
|
|
93
|
-
"lines-between-class-members": ["error", {
|
|
94
|
-
enforce: [
|
|
95
|
-
{ blankLine: "always", prev: "method", next: "method" },
|
|
96
|
-
{ blankLine: "never", prev: "field", next: "field" },
|
|
97
|
-
]
|
|
98
|
-
}],
|
|
99
|
-
curly: ["error", "multi-line"],
|
|
100
|
-
"@stylistic/semi": ["error", "always"],
|
|
101
|
-
"@stylistic/comma-dangle": ["error", "always-multiline"],
|
|
102
|
-
"@stylistic/function-call-argument-newline": ["error", "consistent"],
|
|
103
|
-
"@stylistic/function-paren-newline": ["error", "multiline-arguments"],
|
|
104
|
-
|
|
105
|
-
"@stylistic/object-curly-newline": ["error", {
|
|
106
|
-
ObjectExpression: {
|
|
107
|
-
multiline: true,
|
|
108
|
-
consistent: true,
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
ObjectPattern: {
|
|
112
|
-
multiline: true,
|
|
113
|
-
consistent: true,
|
|
114
|
-
},
|
|
115
|
-
}],
|
|
116
|
-
|
|
117
|
-
"@stylistic/no-whitespace-before-property": "error",
|
|
118
|
-
"@stylistic/no-trailing-spaces": "error",
|
|
119
|
-
"@stylistic/member-delimiter-style": ["error", {
|
|
120
|
-
"multiline": {
|
|
121
|
-
"delimiter": "semi",
|
|
122
|
-
"requireLast": true
|
|
123
|
-
},
|
|
124
|
-
"singleline": {
|
|
125
|
-
"delimiter": "semi",
|
|
126
|
-
"requireLast": false
|
|
127
|
-
},
|
|
128
|
-
"multilineDetection": "brackets"
|
|
129
|
-
}],
|
|
130
|
-
"@stylistic/quotes": ["error", "single", {
|
|
131
|
-
avoidEscape: true,
|
|
132
|
-
allowTemplateLiterals: true,
|
|
133
|
-
}],
|
|
134
|
-
"@typescript-eslint/no-base-to-string": "off",
|
|
135
|
-
"obsidian/unresolved-provider-dependencies": "error",
|
|
136
|
-
"obsidian/no-circular-dependencies": "error",
|
|
137
|
-
"obsidian/strongly-typed-inject-component": "error",
|
|
138
|
-
},
|
|
139
|
-
}
|
|
140
|
-
);
|