@blumintinc/eslint-plugin-blumint 1.21.18 → 1.23.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/README.md +1 -0
- package/lib/index.js +4 -1
- package/lib/rules/no-compositing-layer-props.d.ts +8 -1
- package/lib/rules/no-compositing-layer-props.js +577 -34
- package/lib/rules/no-margin-properties.d.ts +9 -1
- package/lib/rules/no-margin-properties.js +157 -6
- package/lib/rules/require-sx-props-theme.d.ts +2 -0
- package/lib/rules/require-sx-props-theme.js +361 -0
- package/lib/utils/fixtureTypeProgram.js +46 -0
- package/package.json +1 -1
- package/release-manifest.json +36 -0
package/README.md
CHANGED
|
@@ -267,6 +267,7 @@ full closed loop is documented in agora's `.claude/skills/eslint-autonomy/SKILL.
|
|
|
267
267
|
| [require-migration-script-metadata](docs/rules/require-migration-script-metadata.md) | Enforce JSDoc migration metadata in callable scripts | ✅ | | | | |
|
|
268
268
|
| [require-props-composition](docs/rules/require-props-composition.md) | Require React component Props types to compose (via Pick/Omit) with the props types of non-leaf child components rendered in JSX | ✅ | | | | |
|
|
269
269
|
| [require-server-timestamp-for-firestore-dates](docs/rules/require-server-timestamp-for-firestore-dates.md) | Enforce serverTimestamp() instead of new Date() for Firestore timestamp fields | ✅ | | | | |
|
|
270
|
+
| [require-sx-props-theme](docs/rules/require-sx-props-theme.md) | Require MUI `SxProps` to carry the app theme as `SxProps<Theme>`, because the bare type defaults to `SxProps<{}>`: `sx` callbacks lose the theme's typing and TypeScript pays for a structural comparison against MUI's own `SxProps<Theme>` | ✅ | | 🔧 | | |
|
|
270
271
|
| [semantic-function-prefixes](docs/rules/semantic-function-prefixes.md) | Require semantic function prefixes instead of generic verbs so callers know whether a function fetches data, transforms input, or mutates state | ✅ | | | | |
|
|
271
272
|
| [sync-onwrite-name-func](docs/rules/sync-onwrite-name-func.md) | Ensure that the name field matches the func field in onWrite handlers | ✅ | | 🔧 | | |
|
|
272
273
|
| [test-file-location-enforcement](docs/rules/test-file-location-enforcement.md) | Enforce colocating *.test.ts or *.test.tsx files with the code they cover. | ✅ | | | | |
|
package/lib/index.js
CHANGED
|
@@ -198,6 +198,7 @@ const no_satisfies_in_frontend_bundle_1 = require("./rules/no-satisfies-in-front
|
|
|
198
198
|
const prefer_utility_function_own_file_1 = require("./rules/prefer-utility-function-own-file");
|
|
199
199
|
const no_render_function_components_1 = require("./rules/no-render-function-components");
|
|
200
200
|
const enforce_use_flex_gap_on_wrap_1 = require("./rules/enforce-use-flex-gap-on-wrap");
|
|
201
|
+
const require_sx_props_theme_1 = require("./rules/require-sx-props-theme");
|
|
201
202
|
const NO_FRONTEND_IMPORTS_FROM_FUNCTIONS_MESSAGE = 'Backend Cloud Functions (.f.ts under functions/) must not import frontend modules from the repo root src/**. Frontend code can depend on browser-only APIs and bundling it into Cloud Functions breaks server execution; move shared logic into functions/src or a shared package.';
|
|
202
203
|
function noFrontendImportsFromFunctionsPatterns(pattern) {
|
|
203
204
|
return [
|
|
@@ -224,7 +225,7 @@ function noFrontendImportsFromFunctionsPatterns(pattern) {
|
|
|
224
225
|
module.exports = {
|
|
225
226
|
meta: {
|
|
226
227
|
name: '@blumintinc/eslint-plugin-blumint',
|
|
227
|
-
version: '1.
|
|
228
|
+
version: '1.23.0',
|
|
228
229
|
},
|
|
229
230
|
parseOptions: {
|
|
230
231
|
ecmaVersion: 2020,
|
|
@@ -433,6 +434,7 @@ module.exports = {
|
|
|
433
434
|
'@blumintinc/blumint/prefer-utility-function-own-file': 'error',
|
|
434
435
|
'@blumintinc/blumint/no-render-function-components': 'error',
|
|
435
436
|
'@blumintinc/blumint/enforce-use-flex-gap-on-wrap': 'error',
|
|
437
|
+
'@blumintinc/blumint/require-sx-props-theme': 'error',
|
|
436
438
|
},
|
|
437
439
|
/**
|
|
438
440
|
* Depth-specific overrides block only import strings that traverse to the
|
|
@@ -711,6 +713,7 @@ module.exports = {
|
|
|
711
713
|
'prefer-utility-function-own-file': prefer_utility_function_own_file_1.preferUtilityFunctionOwnFile,
|
|
712
714
|
'no-render-function-components': no_render_function_components_1.noRenderFunctionComponents,
|
|
713
715
|
'enforce-use-flex-gap-on-wrap': enforce_use_flex_gap_on_wrap_1.enforceUseFlexGapOnWrap,
|
|
716
|
+
'require-sx-props-theme': require_sx_props_theme_1.requireSxPropsTheme,
|
|
714
717
|
},
|
|
715
718
|
};
|
|
716
719
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
type Options = [
|
|
2
|
+
{
|
|
3
|
+
exemptInteractionStates?: boolean;
|
|
4
|
+
exemptStateTransitions?: boolean;
|
|
5
|
+
}
|
|
6
|
+
];
|
|
7
|
+
export declare const noCompositingLayerProps: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"compositingLayer", Options, import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
|
|
8
|
+
export {};
|