eslint-plugin-zappie 0.1.1 → 0.2.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/CHANGELOG.md +17 -0
- package/README.md +14 -11
- package/dist/index.d.ts +10 -1
- package/dist/index.js +2 -956
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# eslint-plugin-zappie
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 79deec3: Hold every template to the same accessibility, semantics, performance and CSS bar.
|
|
8
|
+
|
|
9
|
+
- `eslint-plugin-zappie`: `zappie/no-lazy-overlay` reports `React.lazy` and `Suspense` and points at `deferred()` from `@zappie/foundations`. It is an error in `recommended`.
|
|
10
|
+
- `@zappie/check`: `lint` fails when a project turns down a `jsx-a11y` rule from `recommended`. A new `css` step reports `css/important` and `css/class-patch` as errors, and `css/duplicate-keyframes`, `css/duplicate-selector`, `css/arbitrary-token`, `css/literal-token`, `css/unused-custom-property`, `css/reduced-motion` and `css/unreadable` as warnings.
|
|
11
|
+
- `@zappie/verify`: V13 fails on a missing main landmark, a page without exactly one h1, a dialog without a name, a positive tabindex, a phone control under 44×44 px and focus that doesn't return after the item or cart closes. V16 times each marked overlay from tap to first paint on a phone profile. V17 checks each marked overlay's focus, Escape and scroll lock. Both are skipped while a menu has no overlay markers. V14 records `menuCssKbGz`. `findRegressions` compares two reports' metrics.
|
|
12
|
+
- `@zappie/starter`: menu controls are at least 44×44 px on a phone.
|
|
13
|
+
|
|
14
|
+
## 0.1.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 45295a2: Make product cards ready to tap with route discovery, prefetch lint rules and measured storefront checks.
|
|
19
|
+
|
|
3
20
|
## 0.1.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -21,17 +21,20 @@ export default [...zappie.configs.recommended];
|
|
|
21
21
|
|
|
22
22
|
## Rules
|
|
23
23
|
|
|
24
|
-
| Rule | What it asks for
|
|
25
|
-
| ---------------------------- |
|
|
26
|
-
| `zappie/no-direct-api` | Call Zappie through the SDK.
|
|
27
|
-
| `zappie/no-money-literals` | Use SDK prices and totals in your storefront.
|
|
28
|
-
| `zappie/use-format-money` | Format SDK Money with `format.money()` or `<Money>`. Fixable.
|
|
29
|
-
| `zappie/cart-via-sdk` | Keep your cart state in the SDK.
|
|
30
|
-
| `zappie/checkout-via-sdk` | Open checkout through the Zappie SDK.
|
|
31
|
-
| `zappie/no-custom-auth` | Sign customers in through the Zappie SDK.
|
|
32
|
-
| `zappie/no-tracking-scripts` | Forward analytics through Zappie.
|
|
33
|
-
| `zappie/overlay-primitive` | Use Overlay to keep dialogs and sheets in the URL.
|
|
34
|
-
| `zappie/verify-markers` | Mark shopping actions so verify can find them. Fixable.
|
|
24
|
+
| Rule | What it asks for |
|
|
25
|
+
| ---------------------------- | ---------------------------------------------------------------- |
|
|
26
|
+
| `zappie/no-direct-api` | Call Zappie through the SDK. |
|
|
27
|
+
| `zappie/no-money-literals` | Use SDK prices and totals in your storefront. |
|
|
28
|
+
| `zappie/use-format-money` | Format SDK Money with `format.money()` or `<Money>`. Fixable. |
|
|
29
|
+
| `zappie/cart-via-sdk` | Keep your cart state in the SDK. |
|
|
30
|
+
| `zappie/checkout-via-sdk` | Open checkout through the Zappie SDK. |
|
|
31
|
+
| `zappie/no-custom-auth` | Sign customers in through the Zappie SDK. |
|
|
32
|
+
| `zappie/no-tracking-scripts` | Forward analytics through Zappie. |
|
|
33
|
+
| `zappie/overlay-primitive` | Use Overlay to keep dialogs and sheets in the URL. |
|
|
34
|
+
| `zappie/verify-markers` | Mark shopping actions so verify can find them. Fixable. |
|
|
35
|
+
| `zappie/no-lazy-overlay` | Load overlays with `deferred()`, not `React.lazy` or `Suspense`. |
|
|
36
|
+
|
|
37
|
+
`recommended` also turns on the recommended `jsx-a11y` rules as the accessibility baseline. `zappie check` fails a project that turns any of them down.
|
|
35
38
|
|
|
36
39
|
Typed rules use TypeScript's project service when it's available, and fall back to syntax checks when it isn't.
|
|
37
40
|
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ declare const cartViaSdk: _typescript_eslint_utils_ts_eslint.RuleModule<"cart",
|
|
|
5
5
|
|
|
6
6
|
declare const checkoutViaSdk: _typescript_eslint_utils_ts_eslint.RuleModule<"checkout", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
7
7
|
|
|
8
|
+
declare const imagePriority: TSESLint.RuleModule<"mapped" | "routeLimit", [], unknown, TSESLint.RuleListener>;
|
|
9
|
+
|
|
10
|
+
declare const itemLinkPrefetch: _typescript_eslint_utils_ts_eslint.RuleModule<"prefetch", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
11
|
+
|
|
8
12
|
type Options = [{
|
|
9
13
|
serverFiles?: string[];
|
|
10
14
|
}];
|
|
@@ -13,6 +17,8 @@ declare const noCustomAuth: _typescript_eslint_utils_ts_eslint.RuleModule<"auth"
|
|
|
13
17
|
type Message$1 = "direct" | "internal" | "storefront" | "checkout" | "customer";
|
|
14
18
|
declare const noDirectApi: _typescript_eslint_utils_ts_eslint.RuleModule<Message$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
15
19
|
|
|
20
|
+
declare const noLazyOverlay: _typescript_eslint_utils_ts_eslint.RuleModule<"lazy" | "suspense", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
21
|
+
|
|
16
22
|
declare const noMoneyLiterals: _typescript_eslint_utils_ts_eslint.RuleModule<"arithmetic" | "literal" | "scale", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
17
23
|
|
|
18
24
|
declare const noTrackingScripts: _typescript_eslint_utils_ts_eslint.RuleModule<"tracking", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
@@ -46,8 +52,11 @@ declare const plugin: {
|
|
|
46
52
|
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
47
53
|
"cart-via-sdk": _typescript_eslint_utils_ts_eslint.RuleModule<"cart", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
48
54
|
"verify-markers": _typescript_eslint_utils_ts_eslint.RuleModule<"marker", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
55
|
+
"item-link-prefetch": _typescript_eslint_utils_ts_eslint.RuleModule<"prefetch", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
56
|
+
"image-priority": _typescript_eslint_utils_ts_eslint.RuleModule<"mapped" | "routeLimit", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
57
|
+
"no-lazy-overlay": _typescript_eslint_utils_ts_eslint.RuleModule<"lazy" | "suspense", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
49
58
|
};
|
|
50
59
|
configs: Record<string, ZappieFlatConfig[]>;
|
|
51
60
|
};
|
|
52
61
|
|
|
53
|
-
export { type ZappieFlatConfig, cartViaSdk, checkoutViaSdk, plugin as default, noCustomAuth, noDirectApi, noMoneyLiterals, noTrackingScripts, overlayPrimitive, useFormatMoney, verifyMarkers };
|
|
62
|
+
export { type ZappieFlatConfig, cartViaSdk, checkoutViaSdk, plugin as default, imagePriority, itemLinkPrefetch, noCustomAuth, noDirectApi, noLazyOverlay, noMoneyLiterals, noTrackingScripts, overlayPrimitive, useFormatMoney, verifyMarkers };
|