oxlint-plugin-arch 0.11.0 → 0.12.1
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 +241 -0
- package/README.md +52 -218
- package/dist/index.js +5205 -4073
- package/dist/preset/groups/backend.d.ts +2 -0
- package/dist/preset/groups/basics.d.ts +2 -0
- package/dist/preset/groups/comments.d.ts +2 -0
- package/dist/preset/groups/console.d.ts +2 -0
- package/dist/preset/groups/deny.d.ts +2 -0
- package/dist/preset/groups/expo.d.ts +2 -0
- package/dist/preset/groups/externals.d.ts +2 -0
- package/dist/preset/groups/forms.d.ts +2 -0
- package/dist/preset/groups/imports.d.ts +2 -0
- package/dist/preset/groups/layout.d.ts +2 -0
- package/dist/preset/groups/limits.d.ts +2 -0
- package/dist/preset/groups/naming.d.ts +2 -0
- package/dist/preset/groups/next.d.ts +2 -0
- package/dist/preset/groups/orpc.d.ts +2 -0
- package/dist/preset/groups/react.d.ts +2 -0
- package/dist/preset/groups/schemas.d.ts +2 -0
- package/dist/preset/groups/shadcn.d.ts +2 -0
- package/dist/preset/groups/sql.d.ts +2 -0
- package/dist/preset/groups/style.d.ts +2 -0
- package/dist/preset/groups/tailwind.d.ts +2 -0
- package/dist/preset/groups/tanstack.d.ts +2 -0
- package/dist/preset/groups/tests.d.ts +2 -0
- package/dist/preset/groups/types.d.ts +2 -0
- package/dist/preset/preset-detect.d.ts +3 -0
- package/dist/preset/preset-folders.d.ts +2 -0
- package/dist/preset/preset-recipes.d.ts +82 -0
- package/dist/preset/preset-stylesheet.d.ts +1 -0
- package/dist/preset/preset-units.d.ts +2 -0
- package/dist/preset/preset.constants.d.ts +79 -0
- package/dist/preset/preset.d.ts +89 -0
- package/dist/preset/preset.js +2299 -0
- package/dist/preset/preset.utils.d.ts +14 -0
- package/dist/rules/backend/backend-orpc-output.d.ts +1 -0
- package/dist/rules/backend/backend-registry.d.ts +1 -0
- package/dist/rules/backend/backend-service-functions.d.ts +1 -0
- package/dist/rules/backend/backend-sql-like.d.ts +1 -0
- package/dist/rules/boundaries/boundaries-deny.d.ts +1 -0
- package/dist/rules/boundaries/boundaries-imports.d.ts +1 -0
- package/dist/rules/boundaries/boundaries-next.d.ts +1 -0
- package/dist/rules/boundaries/boundaries-rpc-database.d.ts +1 -0
- package/dist/rules/boundaries/boundaries-tanstack.d.ts +1 -0
- package/dist/rules/boundaries/boundaries-token-owner.d.ts +1 -0
- package/dist/rules/code/code-constructor.d.ts +1 -0
- package/dist/rules/code/code-double-negation.d.ts +1 -0
- package/dist/rules/code/code-literal-in.d.ts +1 -0
- package/dist/rules/code/code-mutable-state.d.ts +1 -0
- package/dist/rules/code/code-object-params.d.ts +1 -0
- package/dist/rules/code/code-paired-call.d.ts +1 -0
- package/dist/rules/code/code-promise-mutation.d.ts +1 -0
- package/dist/rules/code/code-switch.d.ts +1 -0
- package/dist/rules/code/code-trivial-functions.d.ts +1 -0
- package/dist/rules/comments/comments-code.d.ts +1 -0
- package/dist/rules/comments/comments-directives.d.ts +1 -0
- package/dist/rules/copy/copy-dashes.d.ts +1 -0
- package/dist/rules/files/files-components-only.d.ts +1 -0
- package/dist/rules/files/files-constants-only.d.ts +1 -0
- package/dist/rules/files/files-domain-constants.d.ts +1 -0
- package/dist/rules/files/files-exports.d.ts +1 -0
- package/dist/rules/files/files-externals.d.ts +1 -0
- package/dist/rules/files/files-factory-keys.d.ts +1 -0
- package/dist/rules/files/files-helpers.d.ts +1 -0
- package/dist/rules/files/files-no-functions.d.ts +1 -0
- package/dist/rules/files/files-restricted.d.ts +1 -0
- package/dist/rules/files/files-route.d.ts +1 -0
- package/dist/rules/files/files-types-only.d.ts +1 -0
- package/dist/rules/layout/layout-call-arguments.d.ts +1 -0
- package/dist/rules/layout/layout-call-array.d.ts +1 -0
- package/dist/rules/layout/layout-chain.d.ts +1 -0
- package/dist/rules/layout/layout-jsx-attributes.d.ts +1 -0
- package/dist/rules/layout/layout-key-value.d.ts +1 -0
- package/dist/rules/layout/layout-object.d.ts +1 -0
- package/dist/rules/layout/layout-padding.d.ts +1 -0
- package/dist/rules/layout/layout-ternary.d.ts +1 -0
- package/dist/rules/naming/naming-declarations.d.ts +1 -0
- package/dist/rules/naming/naming-exports.d.ts +1 -0
- package/dist/rules/naming/naming-file.d.ts +1 -0
- package/dist/rules/naming/naming-folder.d.ts +1 -0
- package/dist/rules/naming/naming-types.d.ts +1 -0
- package/dist/rules/react/react-dynamic-classes.d.ts +1 -0
- package/dist/rules/react/react-empty-effect.d.ts +1 -0
- package/dist/rules/react/react-memo.d.ts +1 -0
- package/dist/rules/react/react-props.d.ts +1 -0
- package/dist/rules/schemas/schemas-inline.d.ts +1 -0
- package/dist/rules/schemas/schemas-local.d.ts +1 -0
- package/dist/rules/schemas/schemas-rederive.d.ts +1 -0
- package/dist/rules/schemas/schemas-single-use.d.ts +1 -0
- package/dist/rules/tests/tests-assertions.d.ts +1 -0
- package/dist/rules/tests/tests-concurrent-db.d.ts +1 -0
- package/dist/rules/tests/tests-modifiers.d.ts +1 -0
- package/dist/rules/tests/tests-titles.d.ts +1 -0
- package/dist/rules/types/types-declarations.d.ts +1 -0
- package/dist/rules/types/types-imported-alias.d.ts +1 -0
- package/dist/rules/types/types-inline.d.ts +1 -0
- package/dist/rules/types/types-local-alias.d.ts +1 -0
- package/dist/rules/types/types-namespace-import.d.ts +1 -0
- package/dist/rules/types/types-service.d.ts +1 -0
- package/dist/rules/types/types-unknown.d.ts +1 -0
- package/dist/types/ast.types.d.ts +2 -0
- package/dist/types/backend.types.d.ts +24 -0
- package/dist/types/boundaries.types.d.ts +72 -0
- package/dist/types/code.types.d.ts +59 -0
- package/dist/types/comments.types.d.ts +12 -0
- package/dist/types/copy.types.d.ts +4 -0
- package/dist/types/declarations.types.d.ts +20 -0
- package/dist/types/dillon-anti-slop.types.d.ts +55 -0
- package/dist/types/exports.types.d.ts +11 -0
- package/dist/types/files.types.d.ts +85 -0
- package/dist/types/layout.types.d.ts +55 -0
- package/dist/types/naming.types.d.ts +52 -0
- package/dist/types/options.types.d.ts +4 -0
- package/dist/types/preset.types.d.ts +248 -129
- package/dist/types/react.types.d.ts +14 -0
- package/dist/types/schemas.types.d.ts +20 -0
- package/dist/types/source.types.d.ts +1 -0
- package/dist/types/tests.types.d.ts +39 -0
- package/dist/types/types.types.d.ts +20 -0
- package/dist/utils/ast.utils.d.ts +19 -0
- package/dist/utils/boundaries.utils.d.ts +85 -0
- package/dist/utils/declarations.utils.d.ts +21 -0
- package/dist/utils/exports.utils.d.ts +6 -0
- package/dist/utils/naming.utils.d.ts +11 -0
- package/dist/utils/options.utils.d.ts +11 -0
- package/dist/utils/react.utils.d.ts +3 -0
- package/dist/utils/schemas.utils.d.ts +36 -0
- package/dist/utils/source.utils.d.ts +18 -0
- package/dist/vendor/dillon-anti-slop/index.js +1770 -0
- package/dist/vendor/dillon-anti-slop/rules/no-known-value-widening.d.ts +2 -0
- package/dist/vendor/dillon-anti-slop/rules/no-module-mocking.d.ts +2 -0
- package/dist/vendor/dillon-anti-slop/shared/dictionary-types.d.ts +5 -0
- package/dist/vendor/dillon-anti-slop/shared/expressions.d.ts +5 -0
- package/dist/vendor/dillon-anti-slop/shared/lexical-type-parameters.d.ts +2 -0
- package/dist/vendor/dillon-anti-slop/shared/reflect-method.d.ts +1 -0
- package/dist/vendor/dillon-anti-slop/shared/resolve-variable.d.ts +2 -0
- package/dist/vendor/dillon-anti-slop/shared/signatures.d.ts +15 -0
- package/dist/vendor/dillon-anti-slop/shared/type-aliases.d.ts +4 -0
- package/dist/vendor/dillon-anti-slop/shared/type-environment.d.ts +9 -0
- package/dist/vendor/dillon-anti-slop/shared/type-reference-name.d.ts +2 -0
- package/dist/vendor/dillon-anti-slop/shared/widening-targets.d.ts +3 -0
- package/package.json +51 -43
- package/src/{rules → vendor}/dillon-anti-slop/UPSTREAM.md +9 -6
- package/dist/configs/boundaries.d.ts +0 -2
- package/dist/configs/modules.d.ts +0 -2
- package/dist/configs/plugins.d.ts +0 -3
- package/dist/configs/react.d.ts +0 -2
- package/dist/configs/source.d.ts +0 -2
- package/dist/configs/tests.d.ts +0 -2
- package/dist/configs/types.d.ts +0 -2
- package/dist/constants/preset.constants.d.ts +0 -38
- package/dist/constants/test.constants.d.ts +0 -1
- package/dist/presets/index.d.ts +0 -4
- package/dist/presets/index.js +0 -1736
- package/dist/presets/next-react-modules-preset.d.ts +0 -4
- package/dist/presets/next-react-modules-preset.js +0 -1729
- package/dist/presets/react-modules-preset.d.ts +0 -4
- package/dist/presets/react-modules-preset.js +0 -1724
- package/dist/presets/tanstack-start-react-modules-preset.d.ts +0 -4
- package/dist/presets/tanstack-start-react-modules-preset.js +0 -1729
- package/dist/rules/dillon-anti-slop/index.js +0 -2719
- package/dist/rules/dillon-anti-slop/rules/no-known-value-widening.d.ts +0 -1
- package/dist/rules/dillon-anti-slop/rules/no-module-mocking.d.ts +0 -8
- package/dist/rules/dillon-anti-slop/shared/dictionary-types.d.ts +0 -19
- package/dist/rules/dillon-anti-slop/shared/lexical-type-parameters.d.ts +0 -4
- package/dist/rules/dillon-anti-slop/shared/reflect-method.d.ts +0 -2
- package/dist/rules/module-policy/domain-constants.d.ts +0 -2
- package/dist/rules/module-policy/import-boundaries.d.ts +0 -2
- package/dist/rules/module-policy/index.js +0 -2266
- package/dist/rules/module-policy/memoization.d.ts +0 -2
- package/dist/rules/module-policy/next-runtime.d.ts +0 -7
- package/dist/rules/module-policy/no-unknown.d.ts +0 -6
- package/dist/rules/module-policy/reasoned-directives.d.ts +0 -2
- package/dist/rules/module-policy/service-functions.d.ts +0 -2
- package/dist/rules/module-policy/service-types.d.ts +0 -2
- package/dist/rules/module-policy/tanstack-runtime.d.ts +0 -2
- package/dist/rules/module-policy/test-assertions.d.ts +0 -2
- package/dist/rules/module-policy/test-modifiers.d.ts +0 -2
- package/dist/services/preset-compose.d.ts +0 -3
- package/dist/services/preset-context.d.ts +0 -2
- package/dist/types/module-policy.types.d.ts +0 -39
- package/dist/types/test-analysis.types.d.ts +0 -11
- package/dist/utils/helpers/ast.d.ts +0 -12
- package/dist/utils/helpers/boundaries.d.ts +0 -3
- package/dist/utils/helpers/comments.d.ts +0 -6
- package/dist/utils/helpers/declarations.d.ts +0 -35
- package/dist/utils/helpers/exports.d.ts +0 -18
- package/dist/utils/helpers/factories.d.ts +0 -9
- package/dist/utils/helpers/guards.d.ts +0 -11
- package/dist/utils/helpers/index.d.ts +0 -18
- package/dist/utils/helpers/layout.d.ts +0 -15
- package/dist/utils/helpers/mocking.d.ts +0 -2
- package/dist/utils/helpers/naming.d.ts +0 -13
- package/dist/utils/helpers/options.d.ts +0 -22
- package/dist/utils/helpers/orpc.d.ts +0 -3
- package/dist/utils/helpers/preset.d.ts +0 -9
- package/dist/utils/helpers/react-components.d.ts +0 -13
- package/dist/utils/helpers/routes.d.ts +0 -5
- package/dist/utils/helpers/runtime.d.ts +0 -14
- package/dist/utils/helpers/sanitizers.d.ts +0 -3
- package/dist/utils/helpers/schemas.d.ts +0 -10
- package/dist/utils/helpers/syntax.d.ts +0 -1
- package/dist/utils/helpers/test-tables.d.ts +0 -8
- package/dist/utils/helpers/trivial.d.ts +0 -6
- package/dist/utils/index.d.ts +0 -1
- /package/dist/{rules/module-policy/index.d.ts → index.d.ts} +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/index.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-chained-type-assertions.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-conditional-empty-object-spread.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-object-parameters.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-reflect-apply.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-reflect-get.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-runtime-typeof.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-shape-in-symbol-names.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-unknown-parameters.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-unknown-returns.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-unknown-type-aliases.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-unsafe-dictionary-type.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/no-widen-then-assert.d.ts +0 -0
- /package/dist/{rules → vendor}/dillon-anti-slop/rules/require-safety-comment-for-type-assertion.d.ts +0 -0
- /package/src/{rules → vendor}/dillon-anti-slop/LICENSE +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type * as DillonAntiSlopTypes from '../../../types/dillon-anti-slop.types.ts';
|
|
2
|
+
import type { ESTree } from '@oxlint/plugins';
|
|
3
|
+
export declare function dictionaryTypesUnsafeValue(type: ESTree.TSType, environment: DillonAntiSlopTypes.DillonAntiSlopTypeEnvironment, substitutions: DillonAntiSlopTypes.DillonAntiSlopSubstitutions, resolvingAliases: ReadonlySet<string>): DillonAntiSlopTypes.DillonAntiSlopUnsafeValue | null;
|
|
4
|
+
export declare function dictionaryTypesValueTypes(type: ESTree.TSType, environment: DillonAntiSlopTypes.DillonAntiSlopTypeEnvironment, substitutions: DillonAntiSlopTypes.DillonAntiSlopSubstitutions, resolvingAliases: ReadonlySet<string>): readonly DillonAntiSlopTypes.DillonAntiSlopResolvedType[];
|
|
5
|
+
export declare function dictionaryTypesClassify(type: ESTree.TSType, environment: DillonAntiSlopTypes.DillonAntiSlopTypeEnvironment): DillonAntiSlopTypes.DillonAntiSlopUnsafeValue | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DillonAntiSlopTypeAssertion } from '../../../types/dillon-anti-slop.types.ts';
|
|
2
|
+
import type { ESTree } from '@oxlint/plugins';
|
|
3
|
+
export declare function expressionsUnwrapParentheses(expression: ESTree.Expression): ESTree.Expression;
|
|
4
|
+
export declare function expressionsIsAssertion(node: ESTree.Node): node is DillonAntiSlopTypeAssertion;
|
|
5
|
+
export declare function expressionsIsConstAssertion(node: DillonAntiSlopTypeAssertion): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function reflectMethodRule(methodName: string, messageId: string, description: string, message: string): import("@oxlint/plugins").Rule;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DillonAntiSlopSignature } from '../../../types/dillon-anti-slop.types.ts';
|
|
2
|
+
import type { ESTree } from '@oxlint/plugins';
|
|
3
|
+
export declare function signaturesParameterAnnotation(parameter: ESTree.ParamPattern): ESTree.TSTypeAnnotation | null | undefined;
|
|
4
|
+
export declare function signaturesListeners(listener: (node: DillonAntiSlopSignature) => void): {
|
|
5
|
+
ArrowFunctionExpression: (node: DillonAntiSlopSignature) => void;
|
|
6
|
+
FunctionDeclaration: (node: DillonAntiSlopSignature) => void;
|
|
7
|
+
FunctionExpression: (node: DillonAntiSlopSignature) => void;
|
|
8
|
+
TSCallSignatureDeclaration: (node: DillonAntiSlopSignature) => void;
|
|
9
|
+
TSConstructSignatureDeclaration: (node: DillonAntiSlopSignature) => void;
|
|
10
|
+
TSConstructorType: (node: DillonAntiSlopSignature) => void;
|
|
11
|
+
TSDeclareFunction: (node: DillonAntiSlopSignature) => void;
|
|
12
|
+
TSEmptyBodyFunctionExpression: (node: DillonAntiSlopSignature) => void;
|
|
13
|
+
TSFunctionType: (node: DillonAntiSlopSignature) => void;
|
|
14
|
+
TSMethodSignature: (node: DillonAntiSlopSignature) => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DillonAntiSlopAliasResolution } from '../../../types/dillon-anti-slop.types.ts';
|
|
2
|
+
import type { ESTree } from '@oxlint/plugins';
|
|
3
|
+
export declare function typeAliasesCollect(program: ESTree.Program, includeGeneric: boolean): Map<string, ESTree.TSTypeAliasDeclaration>;
|
|
4
|
+
export declare function typeAliasesResolvesTo(type: ESTree.TSType, resolution: DillonAntiSlopAliasResolution, visited?: ReadonlySet<string>): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as DillonAntiSlopTypes from '../../../types/dillon-anti-slop.types.ts';
|
|
2
|
+
import type { ESTree } from '@oxlint/plugins';
|
|
3
|
+
export declare function typeEnvironmentCreate(program: ESTree.Program): DillonAntiSlopTypes.DillonAntiSlopTypeEnvironment;
|
|
4
|
+
export declare function typeEnvironmentIsBuiltIn(name: string, environment: DillonAntiSlopTypes.DillonAntiSlopTypeEnvironment): boolean;
|
|
5
|
+
export declare function typeEnvironmentUnwrap(type: ESTree.TSType): ESTree.TSType;
|
|
6
|
+
export declare function typeEnvironmentReference(type: ESTree.TSType, environment: DillonAntiSlopTypes.DillonAntiSlopTypeEnvironment): DillonAntiSlopTypes.DillonAntiSlopNamedReference | null;
|
|
7
|
+
export declare function typeEnvironmentIsUnappliedReference(type: ESTree.TSType, name: string): boolean;
|
|
8
|
+
export declare function typeEnvironmentSubstitution(alias: ESTree.TSTypeAliasDeclaration, type: ESTree.TSTypeReference, base: DillonAntiSlopTypes.DillonAntiSlopSubstitutions): DillonAntiSlopTypes.DillonAntiSlopSubstitutions | null;
|
|
9
|
+
export declare function typeEnvironmentResolveAlias(name: string, reference: ESTree.TSTypeReference, environment: DillonAntiSlopTypes.DillonAntiSlopTypeEnvironment, substitutions: DillonAntiSlopTypes.DillonAntiSlopSubstitutions, resolving: ReadonlySet<string>): DillonAntiSlopTypes.DillonAntiSlopAliasStep | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type * as DillonAntiSlopTypes from '../../../types/dillon-anti-slop.types.ts';
|
|
2
|
+
import type { ESTree } from '@oxlint/plugins';
|
|
3
|
+
export declare function wideningTargetsClassify(type: ESTree.TSType, environment: DillonAntiSlopTypes.DillonAntiSlopTypeEnvironment): DillonAntiSlopTypes.DillonAntiSlopWideningTarget | null;
|
package/package.json
CHANGED
|
@@ -1,49 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint-plugin-arch",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Configurable architecture rules for Oxlint JavaScript plugins.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"exports": {
|
|
8
|
-
".":
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"default": "./dist/presets/index.js"
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
12
11
|
},
|
|
13
|
-
"./
|
|
14
|
-
"types": "./dist/
|
|
15
|
-
"default": "./dist/
|
|
12
|
+
"./preset": {
|
|
13
|
+
"types": "./dist/preset/preset.d.ts",
|
|
14
|
+
"default": "./dist/preset/preset.js"
|
|
16
15
|
},
|
|
17
|
-
"./
|
|
18
|
-
"types": "./dist/
|
|
19
|
-
"default": "./dist/
|
|
20
|
-
},
|
|
21
|
-
"./presets/tanstack-start-react-modules-preset": {
|
|
22
|
-
"types": "./dist/presets/tanstack-start-react-modules-preset.d.ts",
|
|
23
|
-
"default": "./dist/presets/tanstack-start-react-modules-preset.js"
|
|
24
|
-
},
|
|
25
|
-
"./rules/dillon-anti-slop": {
|
|
26
|
-
"types": "./dist/rules/dillon-anti-slop/index.d.ts",
|
|
27
|
-
"default": "./dist/rules/dillon-anti-slop/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./rules/module-policy": {
|
|
30
|
-
"types": "./dist/rules/module-policy/index.d.ts",
|
|
31
|
-
"default": "./dist/rules/module-policy/index.js"
|
|
16
|
+
"./dillon-anti-slop": {
|
|
17
|
+
"types": "./dist/vendor/dillon-anti-slop/index.d.ts",
|
|
18
|
+
"default": "./dist/vendor/dillon-anti-slop/index.js"
|
|
32
19
|
}
|
|
33
20
|
},
|
|
34
21
|
"files": [
|
|
35
22
|
"CHANGELOG.md",
|
|
36
|
-
"src/
|
|
37
|
-
"src/
|
|
23
|
+
"src/vendor/dillon-anti-slop/LICENSE",
|
|
24
|
+
"src/vendor/dillon-anti-slop/UPSTREAM.md",
|
|
38
25
|
"dist"
|
|
39
26
|
],
|
|
40
27
|
"scripts": {
|
|
41
|
-
"build": "bun build src/index.ts src/
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
28
|
+
"build": "rm -rf dist && bun build src/index.ts src/preset/preset.ts src/vendor/dillon-anti-slop/index.ts --root src --outdir dist --target node --format esm --packages external && tsc --project tsconfig.build.json",
|
|
29
|
+
"test": "vitest run tests",
|
|
30
|
+
"check": "bun run build && bun run lint && bun run typecheck && bun run test && bun run lint:dead && bun run lint:dupes && bun run docs:check",
|
|
31
|
+
"docs": "bun scripts/docs.ts",
|
|
32
|
+
"docs:check": "bun scripts/docs.ts --check",
|
|
33
|
+
"bench": "bun scripts/bench.ts",
|
|
34
|
+
"lint": "oxlint -c oxlint.config.ts --disable-nested-config src tests examples scripts",
|
|
35
|
+
"lint:dead": "fallow dead-code",
|
|
36
|
+
"lint:dupes": "fallow dupes",
|
|
37
|
+
"lint:slop": "scanr slop",
|
|
38
|
+
"agents:sync": "bun .agents/sync.ts",
|
|
45
39
|
"typecheck": "tsrs --noEmit",
|
|
46
|
-
"check:examples": "oxlint examples/minimal.oxlint.config.ts -c examples/minimal.oxlint.config.ts --disable-nested-config && oxlint examples/full.oxlint.config.ts -c examples/full.oxlint.config.ts --disable-nested-config && oxlint examples/dist.oxlint.config.ts -c examples/dist.oxlint.config.ts --disable-nested-config && oxlint examples/monorepo.oxlint.config.ts -c examples/monorepo.oxlint.config.ts --disable-nested-config && oxlint --print-config -c examples/preset.oxlint.config.ts > /dev/null && oxlint --print-config -c examples/mixed-frameworks.oxlint.config.ts > /dev/null",
|
|
47
40
|
"prepublishOnly": "bun run check",
|
|
48
41
|
"release": "bash scripts/release.sh",
|
|
49
42
|
"release:patch": "bash scripts/release.sh patch --yes",
|
|
@@ -54,35 +47,35 @@
|
|
|
54
47
|
"@eslint-community/eslint-plugin-eslint-comments": "4.8.1",
|
|
55
48
|
"@oxlint/plugins": "1.89.0",
|
|
56
49
|
"@regru/eslint-plugin-prefer-early-return": "1.0.0",
|
|
57
|
-
"@shadcn/lint": "0.2.3",
|
|
58
50
|
"eslint-plugin-import": "2.32.0",
|
|
59
51
|
"eslint-plugin-perfectionist": "5.13.0",
|
|
60
|
-
"eslint-plugin-react": "7.37.5",
|
|
61
|
-
"eslint-plugin-react-you-might-not-need-an-effect": "1.0.2",
|
|
62
|
-
"eslint-plugin-svg-jsx": "1.3.0",
|
|
63
52
|
"eslint-plugin-tsdoc": "0.5.4",
|
|
64
53
|
"eslint-plugin-unused-imports": "4.4.1",
|
|
65
|
-
"oxlint-plugin-eslint": "1.89.0"
|
|
66
|
-
"oxlint-tailwindcss": "1.16.0"
|
|
54
|
+
"oxlint-plugin-eslint": "1.89.0"
|
|
67
55
|
},
|
|
68
56
|
"peerDependencies": {
|
|
57
|
+
"@shadcn/lint": ">=0.2.3",
|
|
58
|
+
"eslint-plugin-react": ">=7.37.5",
|
|
59
|
+
"eslint-plugin-react-you-might-not-need-an-effect": ">=1.0.2",
|
|
60
|
+
"eslint-plugin-svg-jsx": ">=1.3.0",
|
|
69
61
|
"oxlint": ">=1.85.0",
|
|
62
|
+
"oxlint-tailwindcss": ">=1.16.0",
|
|
70
63
|
"oxlint-tsgolint": ">=7.0.2003"
|
|
71
64
|
},
|
|
72
65
|
"devDependencies": {
|
|
73
|
-
"@
|
|
74
|
-
"@tanstack/react-router": "1.170.45",
|
|
66
|
+
"@shadcn/lint": "0.2.3",
|
|
75
67
|
"@types/node": "26.6.5",
|
|
76
|
-
"@types/react": "19.3.0",
|
|
77
68
|
"bumpp": "12.3.0",
|
|
69
|
+
"eslint-plugin-react": "7.37.5",
|
|
70
|
+
"eslint-plugin-react-you-might-not-need-an-effect": "1.0.2",
|
|
71
|
+
"eslint-plugin-svg-jsx": "1.3.0",
|
|
72
|
+
"fallow": "3.36.0",
|
|
78
73
|
"oxlint": "1.89.0",
|
|
74
|
+
"oxlint-tailwindcss": "1.16.0",
|
|
79
75
|
"oxlint-tsgolint": "7.0.2004",
|
|
80
|
-
"react": "19.3.1",
|
|
81
|
-
"tailwindcss": "4.3.3",
|
|
82
76
|
"tsrs": "0.18.0-ts7.1.0-dev.20260929",
|
|
83
77
|
"typescript": "7.0.2",
|
|
84
|
-
"vitest": "5.0.5"
|
|
85
|
-
"zod": "4.6.7"
|
|
78
|
+
"vitest": "5.0.5"
|
|
86
79
|
},
|
|
87
80
|
"packageManager": "bun@1.3.14",
|
|
88
81
|
"license": "MIT",
|
|
@@ -105,6 +98,21 @@
|
|
|
105
98
|
"plugin"
|
|
106
99
|
],
|
|
107
100
|
"peerDependenciesMeta": {
|
|
101
|
+
"@shadcn/lint": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"eslint-plugin-react": {
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
"eslint-plugin-react-you-might-not-need-an-effect": {
|
|
108
|
+
"optional": true
|
|
109
|
+
},
|
|
110
|
+
"eslint-plugin-svg-jsx": {
|
|
111
|
+
"optional": true
|
|
112
|
+
},
|
|
113
|
+
"oxlint-tailwindcss": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
108
116
|
"oxlint-tsgolint": {
|
|
109
117
|
"optional": true
|
|
110
118
|
}
|
|
@@ -4,8 +4,8 @@ Upstream: https://github.com/dmmulroy/anti-slop
|
|
|
4
4
|
|
|
5
5
|
Author: Dillon Mulroy. Licensed under MIT; see LICENSE in this directory.
|
|
6
6
|
|
|
7
|
-
These files were copied from
|
|
8
|
-
|
|
7
|
+
These files were copied from an earlier vendored copy of these rules in
|
|
8
|
+
another project.
|
|
9
9
|
The original upstream revision of that copy has not been established. This is
|
|
10
10
|
not a fresh copy of upstream main and must not be described as one.
|
|
11
11
|
|
|
@@ -16,10 +16,13 @@ vendoring and does not publish an official npm package.
|
|
|
16
16
|
|
|
17
17
|
Local behavior fixes recognize `SAFETY:` comments on exported declarations and
|
|
18
18
|
export-default assertions, while retaining statement boundaries for other
|
|
19
|
-
assertions.
|
|
19
|
+
assertions.
|
|
20
|
+
|
|
21
|
+
`no-shape-in-symbol-names` skips names that belong to another API: the
|
|
22
|
+
property of a non-computed member access (`schema.shape`), a renamed
|
|
23
|
+
destructured property or import, the right side of a qualified type name, and
|
|
24
|
+
the key of a shorthand property (its variable is still reported).
|
|
20
25
|
|
|
21
26
|
Local option changes let `no-module-mocking` take `deny` and `allow` API
|
|
22
27
|
patterns and `checkDestructured`, so the preset can also ban stubs such as
|
|
23
|
-
`vi.spyOn`. With no options
|
|
24
|
-
it reports the same calls as before. Covered by
|
|
25
|
-
`src/tests/no-module-mocking.test.ts` and preset tests.
|
|
28
|
+
`vi.spyOn`. With no options it reports the same calls as before.
|
package/dist/configs/react.d.ts
DELETED
package/dist/configs/source.d.ts
DELETED
package/dist/configs/tests.d.ts
DELETED
package/dist/configs/types.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { PresetRules, PresetPolicyName, PresetTestMockingException, PresetTestMockingPreset } from '../types/preset.types.ts';
|
|
2
|
-
export declare const presetExtensions = "*.{ts,tsx,mts,cts}";
|
|
3
|
-
export declare const presetPolicyOrder: PresetPolicyName[];
|
|
4
|
-
export declare const presetCommonRules: PresetRules;
|
|
5
|
-
export declare const presetFormattingRules: PresetRules;
|
|
6
|
-
export declare const presetReactRules: PresetRules;
|
|
7
|
-
export declare const presetEffectsRules: PresetRules;
|
|
8
|
-
export declare const presetTailwindRules: {
|
|
9
|
-
'tailwindcss/enforce-canonical': "error";
|
|
10
|
-
'tailwindcss/enforce-sort-order': "error";
|
|
11
|
-
'tailwindcss/enforce-shorthand': "error";
|
|
12
|
-
'tailwindcss/no-conflicting-classes': "error";
|
|
13
|
-
'tailwindcss/no-duplicate-classes': "error";
|
|
14
|
-
'tailwindcss/no-unknown-classes': "off";
|
|
15
|
-
'tailwindcss/no-unnecessary-whitespace': "error";
|
|
16
|
-
'tailwindcss/no-deprecated-classes': "error";
|
|
17
|
-
};
|
|
18
|
-
export declare const presetImportRules: PresetRules;
|
|
19
|
-
export declare const presetNamingRules: PresetRules;
|
|
20
|
-
export declare const presetTestRules: PresetRules;
|
|
21
|
-
/** Test-double APIs each `tests.mocking` preset bans, for `vi` and `jest`. */
|
|
22
|
-
export declare const presetTestMockingApis: Record<PresetTestMockingPreset, string[]>;
|
|
23
|
-
export declare const presetTestMockingAllow: Record<PresetTestMockingPreset, PresetTestMockingException[]>;
|
|
24
|
-
export declare const presetStrictMockingMessage = "Inject a fake driver through the dependencies of the code under test instead of mocking or stubbing.";
|
|
25
|
-
/** HTTP methods a Next `route.ts` handler may export. */
|
|
26
|
-
export declare const presetNextHandlerMethods: string[];
|
|
27
|
-
/** Next route segment config exports, shared by pages, layouts and route handlers. */
|
|
28
|
-
export declare const presetNextSegmentConfig: string[];
|
|
29
|
-
/** Exports a Next page or layout may add next to its default component. */
|
|
30
|
-
export declare const presetNextSegmentExports: string[];
|
|
31
|
-
export declare const presetExportPrefix: {
|
|
32
|
-
stem: string;
|
|
33
|
-
trailingRoles: string[];
|
|
34
|
-
roleSeparators: string[];
|
|
35
|
-
normalize: string;
|
|
36
|
-
allowPattern: string;
|
|
37
|
-
};
|
|
38
|
-
export declare const presetGeneratedFiles: string[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const testAssertionFunctions: string[];
|
package/dist/presets/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { default as reactModulesPreset } from './react-modules-preset.ts';
|
|
2
|
-
export { default as nextReactModulesPreset } from './next-react-modules-preset.ts';
|
|
3
|
-
export { default as tanstackStartReactModulesPreset } from './tanstack-start-react-modules-preset.ts';
|
|
4
|
-
export type { PresetOptions, PresetArchitecture, PresetArchitectureEntry, PresetFolderLayout, PresetFormattingOptions, PresetFramework, PresetNextOptions, PresetTanstackStartOptions, PresetLimitsOptions, PresetModulesOptions, PresetImportsOptions, PresetOrpcOptions, PresetSqlOptions, PresetFormsOptions, PresetReactOptions, PresetTestsOptions, PresetTestMockingApi, PresetTestMockingException, PresetTestMockingOptions, PresetTestMockingPreset, PresetPolicyOptions, PresetPolicy, PresetPolicyName, PresetTailwindOptions, PresetShadcnOptions, } from '../types/preset.types.ts';
|