@jimmy.codes/eslint-config 7.3.0 → 7.4.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/index.d.mts CHANGED
@@ -4546,6 +4546,11 @@ interface RuleOptions {
4546
4546
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-duplicate-hooks.md
4547
4547
  */
4548
4548
  'playwright/no-duplicate-hooks'?: Linter.RuleEntry<[]>;
4549
+ /**
4550
+ * Disallow multiple `test.slow()` calls in the same test
4551
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-duplicate-slow.md
4552
+ */
4553
+ 'playwright/no-duplicate-slow'?: Linter.RuleEntry<[]>;
4549
4554
  /**
4550
4555
  * The use of ElementHandle is discouraged, use Locator instead
4551
4556
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-element-handle.md
@@ -4611,6 +4616,11 @@ interface RuleOptions {
4611
4616
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-matchers.md
4612
4617
  */
4613
4618
  'playwright/no-restricted-matchers'?: Linter.RuleEntry<PlaywrightNoRestrictedMatchers>;
4619
+ /**
4620
+ * Disallows the usage of specific roles in getByRole()
4621
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-roles.md
4622
+ */
4623
+ 'playwright/no-restricted-roles'?: Linter.RuleEntry<PlaywrightNoRestrictedRoles>;
4614
4624
  /**
4615
4625
  * Prevent usage of the `.skip()` skip test annotation.
4616
4626
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-skipped-test.md
@@ -4736,6 +4746,16 @@ interface RuleOptions {
4736
4746
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-soft-assertions.md
4737
4747
  */
4738
4748
  'playwright/require-soft-assertions'?: Linter.RuleEntry<[]>;
4749
+ /**
4750
+ * Require test blocks to have tags
4751
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-tags.md
4752
+ */
4753
+ 'playwright/require-tags'?: Linter.RuleEntry<[]>;
4754
+ /**
4755
+ * Require a timeout option for `toPass()`
4756
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-to-pass-timeout.md
4757
+ */
4758
+ 'playwright/require-to-pass-timeout'?: Linter.RuleEntry<[]>;
4739
4759
  /**
4740
4760
  * Require a message for `toThrow()`
4741
4761
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-to-throw-message.md
@@ -10605,6 +10625,7 @@ type JsdocTagLines = [] | [("always" | "any" | "never")] | [("always" | "any" |
10605
10625
  endLines?: (number | null);
10606
10626
  maxBlockLines?: (number | null);
10607
10627
  startLines?: (number | null);
10628
+ startLinesWithNoTags?: number;
10608
10629
  tags?: {
10609
10630
  [k: string]: {
10610
10631
  count?: number;
@@ -14385,7 +14406,11 @@ type PlaywrightNoRestrictedLocators = [] | [(string | {
14385
14406
  })[]]; // ----- playwright/no-restricted-matchers -----
14386
14407
  type PlaywrightNoRestrictedMatchers = [] | [{
14387
14408
  [k: string]: (string | null) | undefined;
14388
- }]; // ----- playwright/no-skipped-test -----
14409
+ }]; // ----- playwright/no-restricted-roles -----
14410
+ type PlaywrightNoRestrictedRoles = [] | [(string | {
14411
+ message?: string;
14412
+ role: string;
14413
+ })[]]; // ----- playwright/no-skipped-test -----
14389
14414
  type PlaywrightNoSkippedTest = [] | [{
14390
14415
  allowConditional?: boolean;
14391
14416
  }]; // ----- playwright/no-slowed-test -----
package/dist/index.mjs CHANGED
@@ -586,7 +586,7 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
586
586
  isJestEnabled && unwrap(import("./jest-BYBtWryE.mjs"), jest),
587
587
  isVitestEnabled && unwrap(import("./vitest-CHcEa7vN.mjs"), vitest),
588
588
  isTestingLibraryEnabled && unwrap(import("./testing-library-DAOq7Q2E.mjs"), testingLibrary),
589
- isPlaywrightEnabled && unwrap(import("./playwright-C7C5OcaE.mjs"), playwright),
589
+ isPlaywrightEnabled && unwrap(import("./playwright-CiUISnDl.mjs"), playwright),
590
590
  isStorybookEnabled && unwrap(import("./storybook-vSHixqw5.mjs"), storybook),
591
591
  isNextjsEnabled && unwrap(import("./nextjs-Q8LOBFAI.mjs"), nextjs)
592
592
  ]);
@@ -11,6 +11,7 @@ const playwrightRules = async (options) => {
11
11
  "playwright/no-commented-out-tests": "error",
12
12
  "playwright/no-conditional-expect": "error",
13
13
  "playwright/no-conditional-in-test": "error",
14
+ "playwright/no-duplicate-slow": "error",
14
15
  "playwright/no-element-handle": "error",
15
16
  "playwright/no-eval": "error",
16
17
  "playwright/no-force-option": "error",
@@ -27,6 +28,7 @@ const playwrightRules = async (options) => {
27
28
  "playwright/prefer-to-contain": "error",
28
29
  "playwright/prefer-to-have-count": "error",
29
30
  "playwright/prefer-to-have-length": "error",
31
+ "playwright/require-to-pass-timeout": "error",
30
32
  "playwright/require-to-throw-message": "error",
31
33
  "playwright/valid-title": "off",
32
34
  ...options?.overrides
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "7.3.0",
3
+ "version": "7.4.0",
4
4
  "description": "A simple, modern ESLint config that covers most use cases.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -59,11 +59,11 @@
59
59
  "eslint-plugin-import-x": "^4.16.1",
60
60
  "eslint-plugin-jest": "^29.15.0",
61
61
  "eslint-plugin-jest-dom": "^5.5.0",
62
- "eslint-plugin-jsdoc": "^62.5.5",
62
+ "eslint-plugin-jsdoc": "^62.6.0",
63
63
  "eslint-plugin-jsx-a11y": "^6.10.2",
64
64
  "eslint-plugin-n": "^17.24.0",
65
- "eslint-plugin-perfectionist": "^5.5.0",
66
- "eslint-plugin-playwright": "^2.5.1",
65
+ "eslint-plugin-perfectionist": "^5.6.0",
66
+ "eslint-plugin-playwright": "^2.6.0",
67
67
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
68
68
  "eslint-plugin-react-dom": "^2.13.0",
69
69
  "eslint-plugin-react-hooks": "^7.0.1",
@@ -75,7 +75,7 @@
75
75
  "eslint-plugin-react-x": "^2.13.0",
76
76
  "eslint-plugin-regexp": "^3.0.0",
77
77
  "eslint-plugin-storybook": "0.12.0",
78
- "eslint-plugin-testing-library": "^7.15.4",
78
+ "eslint-plugin-testing-library": "^7.16.0",
79
79
  "eslint-plugin-unicorn": "^63.0.0",
80
80
  "globals": "^17.3.0",
81
81
  "local-pkg": "^1.1.2",