@component-hook/eslint-plugin 1.4.0 → 1.4.2

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 CHANGED
@@ -86,21 +86,21 @@ export default vuePreset;
86
86
 
87
87
  ## Configs
88
88
 
89
- | Name | Type | Reference |
90
- | ----------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
91
- | basic | `Linter.Config[]` | `eslint-recommended`, `typescript-eslint`, `eslint-plugin-eslint-comments`, `eslint-plugin-import`, `eslint-plugin-unicorn`, `eslint-plugin-jsdoc`, `eslint-plugin-regexp`, `eslint-plugin-de-morgan`, `eslint-plugin-perfectionist` |
92
- | vue | `Linter.Config[]` | `eslint-plugin-vue`, `typescript-eslint` |
93
- | react | `Linter.Config[]` | `eslint-plugin-react/recommended`, `eslint-plugin-react-hooks/recommended`, `eslint-plugin-jsx-a11y/recommended` |
94
- | markdown | `Linter.Config[]` | `@eslint/markdown` |
95
- | prettier | `Linter.Config` | `eslint-plugin-prettier/recommended` |
96
- | sonarjs | `Linter.Config[]` | `eslint-plugin-sonarjs/recommended` |
97
- | security | `Linter.Config` | `eslint-plugin-security/recommended` |
98
- | playwright | `Linter.Config` | `eslint-plugin-playwright/flat/recommended` |
99
- | testing-library/dom | `Linter.Config` | `eslint-plugin-testing-library/dom` |
100
- | testing-library/vue | `Linter.Config` | `eslint-plugin-testing-library/vue` |
101
- | testing-library/react | `Linter.Config` | `eslint-plugin-testing-library/react` |
102
- | testing-library/angular | `Linter.Config` | `eslint-plugin-testing-library/angular` |
103
- | testing-library/marko | `Linter.Config` | `eslint-plugin-testing-library/marko` |
89
+ | Name | Type | Reference |
90
+ | ----------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
91
+ | basic | `Linter.Config[]` | `eslint-recommended`, `typescript-eslint`, `eslint-plugin-eslint-comments`, `eslint-plugin-import`, `eslint-plugin-unicorn`, `eslint-plugin-jsdoc`, `eslint-plugin-regexp`, `eslint-plugin-de-morgan`, `eslint-plugin-perfectionist`, `eslint-plugin-jsonc`, `eslint-plugin-yml` |
92
+ | vue | `Linter.Config[]` | `eslint-plugin-vue`, `typescript-eslint` |
93
+ | react | `Linter.Config[]` | `eslint-plugin-react/recommended`, `eslint-plugin-react-hooks/recommended`, `eslint-plugin-jsx-a11y/recommended` |
94
+ | markdown | `Linter.Config[]` | `@eslint/markdown` |
95
+ | prettier | `Linter.Config` | `eslint-plugin-prettier/recommended` |
96
+ | sonarjs | `Linter.Config[]` | `eslint-plugin-sonarjs/recommended` |
97
+ | security | `Linter.Config` | `eslint-plugin-security/recommended` |
98
+ | playwright | `Linter.Config` | `eslint-plugin-playwright/flat/recommended` |
99
+ | testing-library/dom | `Linter.Config` | `eslint-plugin-testing-library/dom` |
100
+ | testing-library/vue | `Linter.Config` | `eslint-plugin-testing-library/vue` |
101
+ | testing-library/react | `Linter.Config` | `eslint-plugin-testing-library/react` |
102
+ | testing-library/angular | `Linter.Config` | `eslint-plugin-testing-library/angular` |
103
+ | testing-library/marko | `Linter.Config` | `eslint-plugin-testing-library/marko` |
104
104
 
105
105
  ## Reference eslint plugin
106
106
 
@@ -112,7 +112,9 @@ export default vuePreset;
112
112
  - [eslint-plugin-regexp/flat/recommended](https://github.com/ota-meshi/eslint-plugin-regexp/blob/master/lib/configs/flat/recommended.ts)
113
113
  - [eslint-plugin-de-morgan](https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/index.ts)
114
114
  - [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc)
115
+ - [eslint-plugin-jsonc](https://github.com/ota-meshi/eslint-plugin-jsonc/blob/master/lib/configs/recommended-with-jsonc.ts)
115
116
  - [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist)
117
+ - [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml)
116
118
  - [eslint-plugin-prettier/recommended](https://github.com/prettier/eslint-plugin-prettier/blob/master/recommended.js)
117
119
  - [eslint-plugin-react/recommended](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/configs/recommended.js)
118
120
  - [eslint-plugin-react-hooks/recommended](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/src/index.js)
package/dist/index.d.cts CHANGED
@@ -7001,254 +7001,264 @@ interface SecurityRules {
7001
7001
  //#endregion
7002
7002
  //#region typegen/playwright.d.ts
7003
7003
  interface PlaywrightRules {
7004
+ /**
7005
+ * Enforces a blank line between Playwright test blocks (e.g., test, test.step, test.beforeEach, etc.).
7006
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/consistent-spacing-between-blocks.md
7007
+ */
7008
+ 'playwright/consistent-spacing-between-blocks'?: Linter.RuleEntry<[]>;
7004
7009
  /**
7005
7010
  * Enforce assertion to be made in a test body
7006
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/expect-expect.md
7011
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/expect-expect.md
7007
7012
  */
7008
7013
  'playwright/expect-expect'?: Linter.RuleEntry<PlaywrightExpectExpect>;
7009
7014
  /**
7010
7015
  * Enforces a maximum number assertion calls in a test body
7011
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/max-expects.md
7016
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/max-expects.md
7012
7017
  */
7013
7018
  'playwright/max-expects'?: Linter.RuleEntry<PlaywrightMaxExpects>;
7014
7019
  /**
7015
7020
  * Enforces a maximum depth to nested describe calls
7016
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/max-nested-describe.md
7021
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/max-nested-describe.md
7017
7022
  */
7018
7023
  'playwright/max-nested-describe'?: Linter.RuleEntry<PlaywrightMaxNestedDescribe>;
7019
7024
  /**
7020
7025
  * Identify false positives when async Playwright APIs are not properly awaited.
7021
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/missing-playwright-await.md
7026
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/missing-playwright-await.md
7022
7027
  */
7023
7028
  'playwright/missing-playwright-await'?: Linter.RuleEntry<PlaywrightMissingPlaywrightAwait>;
7024
7029
  /**
7025
7030
  * Disallow commented out tests
7026
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-commented-out-tests.md
7031
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-commented-out-tests.md
7027
7032
  */
7028
7033
  'playwright/no-commented-out-tests'?: Linter.RuleEntry<[]>;
7029
7034
  /**
7030
7035
  * Disallow calling `expect` conditionally
7031
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-expect.md
7036
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-expect.md
7032
7037
  */
7033
7038
  'playwright/no-conditional-expect'?: Linter.RuleEntry<[]>;
7034
7039
  /**
7035
7040
  * Disallow conditional logic in tests
7036
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-in-test.md
7041
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-in-test.md
7037
7042
  */
7038
7043
  'playwright/no-conditional-in-test'?: Linter.RuleEntry<[]>;
7039
7044
  /**
7040
7045
  * Disallow duplicate setup and teardown hooks
7041
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-duplicate-hooks.md
7046
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-duplicate-hooks.md
7042
7047
  */
7043
7048
  'playwright/no-duplicate-hooks'?: Linter.RuleEntry<[]>;
7044
7049
  /**
7045
7050
  * The use of ElementHandle is discouraged, use Locator instead
7046
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-element-handle.md
7051
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-element-handle.md
7047
7052
  */
7048
7053
  'playwright/no-element-handle'?: Linter.RuleEntry<[]>;
7049
7054
  /**
7050
7055
  * The use of `page.$eval` and `page.$$eval` are discouraged, use `locator.evaluate` or `locator.evaluateAll` instead
7051
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-eval.md
7056
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-eval.md
7052
7057
  */
7053
7058
  'playwright/no-eval'?: Linter.RuleEntry<[]>;
7054
7059
  /**
7055
7060
  * Prevent usage of `.only()` focus test annotation
7056
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-focused-test.md
7061
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-focused-test.md
7057
7062
  */
7058
7063
  'playwright/no-focused-test'?: Linter.RuleEntry<[]>;
7059
7064
  /**
7060
7065
  * Prevent usage of `{ force: true }` option.
7061
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-force-option.md
7066
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-force-option.md
7062
7067
  */
7063
7068
  'playwright/no-force-option'?: Linter.RuleEntry<[]>;
7064
7069
  /**
7065
7070
  * Disallows the usage of getByTitle()
7066
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-get-by-title.md
7071
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-get-by-title.md
7067
7072
  */
7068
7073
  'playwright/no-get-by-title'?: Linter.RuleEntry<[]>;
7069
7074
  /**
7070
7075
  * Disallow setup and teardown hooks
7071
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-hooks.md
7076
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-hooks.md
7072
7077
  */
7073
7078
  'playwright/no-hooks'?: Linter.RuleEntry<PlaywrightNoHooks>;
7074
7079
  /**
7075
7080
  * Disallow nested `test.step()` methods
7076
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-nested-step.md
7081
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-nested-step.md
7077
7082
  */
7078
7083
  'playwright/no-nested-step'?: Linter.RuleEntry<[]>;
7079
7084
  /**
7080
7085
  * Prevent usage of the networkidle option
7081
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-networkidle.md
7086
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-networkidle.md
7082
7087
  */
7083
7088
  'playwright/no-networkidle'?: Linter.RuleEntry<[]>;
7084
7089
  /**
7085
7090
  * Disallow usage of nth methods
7086
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-nth-methods.md
7091
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-nth-methods.md
7087
7092
  */
7088
7093
  'playwright/no-nth-methods'?: Linter.RuleEntry<[]>;
7089
7094
  /**
7090
7095
  * Prevent usage of page.pause()
7091
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-page-pause.md
7096
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-page-pause.md
7092
7097
  */
7093
7098
  'playwright/no-page-pause'?: Linter.RuleEntry<[]>;
7094
7099
  /**
7095
7100
  * Disallows the usage of raw locators
7096
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-raw-locators.md
7101
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-raw-locators.md
7097
7102
  */
7098
7103
  'playwright/no-raw-locators'?: Linter.RuleEntry<PlaywrightNoRawLocators>;
7104
+ /**
7105
+ * Disallows the usage of specific locator methods
7106
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-locators.md
7107
+ */
7108
+ 'playwright/no-restricted-locators'?: Linter.RuleEntry<PlaywrightNoRestrictedLocators>;
7099
7109
  /**
7100
7110
  * Disallow specific matchers & modifiers
7101
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-matchers.md
7111
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-matchers.md
7102
7112
  */
7103
7113
  'playwright/no-restricted-matchers'?: Linter.RuleEntry<PlaywrightNoRestrictedMatchers>;
7104
7114
  /**
7105
7115
  * Prevent usage of the `.skip()` skip test annotation.
7106
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-skipped-test.md
7116
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-skipped-test.md
7107
7117
  */
7108
7118
  'playwright/no-skipped-test'?: Linter.RuleEntry<PlaywrightNoSkippedTest>;
7109
7119
  /**
7110
7120
  * Prevent usage of the `.slow()` slow test annotation.
7111
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-slowed-test.md
7121
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-slowed-test.md
7112
7122
  */
7113
7123
  'playwright/no-slowed-test'?: Linter.RuleEntry<PlaywrightNoSlowedTest>;
7114
7124
  /**
7115
7125
  * Disallow using `expect` outside of `test` blocks
7116
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-standalone-expect.md
7126
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-standalone-expect.md
7117
7127
  */
7118
7128
  'playwright/no-standalone-expect'?: Linter.RuleEntry<[]>;
7119
7129
  /**
7120
7130
  * Prevent unsafe variable references in page.evaluate() and page.addInitScript()
7121
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-unsafe-references.md
7131
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-unsafe-references.md
7122
7132
  */
7123
7133
  'playwright/no-unsafe-references'?: Linter.RuleEntry<[]>;
7124
7134
  /**
7125
7135
  * Disallow usage of page locators that are not used
7126
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-unused-locators.md
7136
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-unused-locators.md
7127
7137
  */
7128
7138
  'playwright/no-unused-locators'?: Linter.RuleEntry<[]>;
7129
7139
  /**
7130
7140
  * Disallow unnecessary awaits for Playwright methods
7131
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-useless-await.md
7141
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-useless-await.md
7132
7142
  */
7133
7143
  'playwright/no-useless-await'?: Linter.RuleEntry<[]>;
7134
7144
  /**
7135
7145
  * Disallow usage of 'not' matchers when a more specific matcher exists
7136
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-useless-not.md
7146
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-useless-not.md
7137
7147
  */
7138
7148
  'playwright/no-useless-not'?: Linter.RuleEntry<[]>;
7139
7149
  /**
7140
7150
  * Prevent usage of page.waitForNavigation()
7141
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-navigation.md
7151
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-navigation.md
7142
7152
  */
7143
7153
  'playwright/no-wait-for-navigation'?: Linter.RuleEntry<[]>;
7144
7154
  /**
7145
7155
  * Prevent usage of page.waitForSelector()
7146
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-selector.md
7156
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-selector.md
7147
7157
  */
7148
7158
  'playwright/no-wait-for-selector'?: Linter.RuleEntry<[]>;
7149
7159
  /**
7150
7160
  * Prevent usage of page.waitForTimeout()
7151
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-timeout.md
7161
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-timeout.md
7152
7162
  */
7153
7163
  'playwright/no-wait-for-timeout'?: Linter.RuleEntry<[]>;
7154
7164
  /**
7155
7165
  * Suggest using the built-in comparison matchers
7156
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-comparison-matcher.md
7166
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-comparison-matcher.md
7157
7167
  */
7158
7168
  'playwright/prefer-comparison-matcher'?: Linter.RuleEntry<[]>;
7159
7169
  /**
7160
7170
  * Suggest using the built-in equality matchers
7161
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-equality-matcher.md
7171
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-equality-matcher.md
7162
7172
  */
7163
7173
  'playwright/prefer-equality-matcher'?: Linter.RuleEntry<[]>;
7164
7174
  /**
7165
7175
  * Prefer having hooks in a consistent order
7166
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-in-order.md
7176
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-in-order.md
7167
7177
  */
7168
7178
  'playwright/prefer-hooks-in-order'?: Linter.RuleEntry<[]>;
7169
7179
  /**
7170
7180
  * Suggest having hooks before any test cases
7171
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-on-top.md
7181
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-on-top.md
7172
7182
  */
7173
7183
  'playwright/prefer-hooks-on-top'?: Linter.RuleEntry<[]>;
7174
7184
  /**
7175
7185
  * Suggest locators over page methods
7176
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-locator.md
7186
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-locator.md
7177
7187
  */
7178
7188
  'playwright/prefer-locator'?: Linter.RuleEntry<[]>;
7179
7189
  /**
7180
7190
  * Enforce lowercase test names
7181
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-lowercase-title.md
7191
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-lowercase-title.md
7182
7192
  */
7183
7193
  'playwright/prefer-lowercase-title'?: Linter.RuleEntry<PlaywrightPreferLowercaseTitle>;
7184
7194
  /**
7185
7195
  * Prefer native locator functions
7186
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-native-locators.md
7196
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-native-locators.md
7187
7197
  */
7188
7198
  'playwright/prefer-native-locators'?: Linter.RuleEntry<PlaywrightPreferNativeLocators>;
7189
7199
  /**
7190
7200
  * Suggest using `toStrictEqual()`
7191
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-strict-equal.md
7201
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-strict-equal.md
7192
7202
  */
7193
7203
  'playwright/prefer-strict-equal'?: Linter.RuleEntry<[]>;
7194
7204
  /**
7195
7205
  * Suggest using `toBe()` for primitive literals
7196
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-be.md
7206
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-be.md
7197
7207
  */
7198
7208
  'playwright/prefer-to-be'?: Linter.RuleEntry<[]>;
7199
7209
  /**
7200
7210
  * Suggest using toContain()
7201
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-contain.md
7211
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-contain.md
7202
7212
  */
7203
7213
  'playwright/prefer-to-contain'?: Linter.RuleEntry<[]>;
7204
7214
  /**
7205
7215
  * Suggest using `toHaveCount()`
7206
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-have-count.md
7216
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-have-count.md
7207
7217
  */
7208
7218
  'playwright/prefer-to-have-count'?: Linter.RuleEntry<[]>;
7209
7219
  /**
7210
7220
  * Suggest using `toHaveLength()`
7211
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-have-length.md
7221
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-have-length.md
7212
7222
  */
7213
7223
  'playwright/prefer-to-have-length'?: Linter.RuleEntry<[]>;
7214
7224
  /**
7215
7225
  * Prefer web first assertions
7216
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-web-first-assertions.md
7226
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-web-first-assertions.md
7217
7227
  */
7218
7228
  'playwright/prefer-web-first-assertions'?: Linter.RuleEntry<[]>;
7219
7229
  /**
7220
7230
  * Require setup and teardown code to be within a hook
7221
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-hook.md
7231
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-hook.md
7222
7232
  */
7223
7233
  'playwright/require-hook'?: Linter.RuleEntry<PlaywrightRequireHook>;
7224
7234
  /**
7225
7235
  * Require all assertions to use `expect.soft`
7226
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-soft-assertions.md
7236
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-soft-assertions.md
7227
7237
  */
7228
7238
  'playwright/require-soft-assertions'?: Linter.RuleEntry<[]>;
7229
7239
  /**
7230
7240
  * Require a message for `toThrow()`
7231
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-to-throw-message.md
7241
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-to-throw-message.md
7232
7242
  */
7233
7243
  'playwright/require-to-throw-message'?: Linter.RuleEntry<[]>;
7234
7244
  /**
7235
7245
  * Require test cases and hooks to be inside a `test.describe` block
7236
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-top-level-describe.md
7246
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-top-level-describe.md
7237
7247
  */
7238
7248
  'playwright/require-top-level-describe'?: Linter.RuleEntry<PlaywrightRequireTopLevelDescribe>;
7239
7249
  /**
7240
7250
  * Enforce valid `describe()` callback
7241
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-describe-callback.md
7251
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-describe-callback.md
7242
7252
  */
7243
7253
  'playwright/valid-describe-callback'?: Linter.RuleEntry<[]>;
7244
7254
  /**
7245
7255
  * Enforce valid `expect()` usage
7246
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-expect.md
7256
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-expect.md
7247
7257
  */
7248
7258
  'playwright/valid-expect'?: Linter.RuleEntry<PlaywrightValidExpect>;
7249
7259
  /**
7250
7260
  * Require promises that have expectations in their chain to be valid
7251
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-expect-in-promise.md
7261
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-expect-in-promise.md
7252
7262
  */
7253
7263
  'playwright/valid-expect-in-promise'?: Linter.RuleEntry<[]>;
7254
7264
  /**
@@ -7257,7 +7267,7 @@ interface PlaywrightRules {
7257
7267
  'playwright/valid-test-tags'?: Linter.RuleEntry<PlaywrightValidTestTags>;
7258
7268
  /**
7259
7269
  * Enforce valid titles
7260
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-title.md
7270
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-title.md
7261
7271
  */
7262
7272
  'playwright/valid-title'?: Linter.RuleEntry<PlaywrightValidTitle>;
7263
7273
  }
@@ -7280,6 +7290,10 @@ type PlaywrightNoHooks = [] | [{
7280
7290
  type PlaywrightNoRawLocators = [] | [{
7281
7291
  allowed?: string[];
7282
7292
  }];
7293
+ type PlaywrightNoRestrictedLocators = [] | [(string | {
7294
+ message?: string;
7295
+ type: string;
7296
+ })[]];
7283
7297
  type PlaywrightNoRestrictedMatchers = [] | [{
7284
7298
  [k: string]: (string | null) | undefined;
7285
7299
  }];
package/dist/index.d.mts CHANGED
@@ -7001,254 +7001,264 @@ interface SecurityRules {
7001
7001
  //#endregion
7002
7002
  //#region typegen/playwright.d.ts
7003
7003
  interface PlaywrightRules {
7004
+ /**
7005
+ * Enforces a blank line between Playwright test blocks (e.g., test, test.step, test.beforeEach, etc.).
7006
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/consistent-spacing-between-blocks.md
7007
+ */
7008
+ 'playwright/consistent-spacing-between-blocks'?: Linter.RuleEntry<[]>;
7004
7009
  /**
7005
7010
  * Enforce assertion to be made in a test body
7006
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/expect-expect.md
7011
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/expect-expect.md
7007
7012
  */
7008
7013
  'playwright/expect-expect'?: Linter.RuleEntry<PlaywrightExpectExpect>;
7009
7014
  /**
7010
7015
  * Enforces a maximum number assertion calls in a test body
7011
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/max-expects.md
7016
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/max-expects.md
7012
7017
  */
7013
7018
  'playwright/max-expects'?: Linter.RuleEntry<PlaywrightMaxExpects>;
7014
7019
  /**
7015
7020
  * Enforces a maximum depth to nested describe calls
7016
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/max-nested-describe.md
7021
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/max-nested-describe.md
7017
7022
  */
7018
7023
  'playwright/max-nested-describe'?: Linter.RuleEntry<PlaywrightMaxNestedDescribe>;
7019
7024
  /**
7020
7025
  * Identify false positives when async Playwright APIs are not properly awaited.
7021
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/missing-playwright-await.md
7026
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/missing-playwright-await.md
7022
7027
  */
7023
7028
  'playwright/missing-playwright-await'?: Linter.RuleEntry<PlaywrightMissingPlaywrightAwait>;
7024
7029
  /**
7025
7030
  * Disallow commented out tests
7026
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-commented-out-tests.md
7031
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-commented-out-tests.md
7027
7032
  */
7028
7033
  'playwright/no-commented-out-tests'?: Linter.RuleEntry<[]>;
7029
7034
  /**
7030
7035
  * Disallow calling `expect` conditionally
7031
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-expect.md
7036
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-expect.md
7032
7037
  */
7033
7038
  'playwright/no-conditional-expect'?: Linter.RuleEntry<[]>;
7034
7039
  /**
7035
7040
  * Disallow conditional logic in tests
7036
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-in-test.md
7041
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-in-test.md
7037
7042
  */
7038
7043
  'playwright/no-conditional-in-test'?: Linter.RuleEntry<[]>;
7039
7044
  /**
7040
7045
  * Disallow duplicate setup and teardown hooks
7041
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-duplicate-hooks.md
7046
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-duplicate-hooks.md
7042
7047
  */
7043
7048
  'playwright/no-duplicate-hooks'?: Linter.RuleEntry<[]>;
7044
7049
  /**
7045
7050
  * The use of ElementHandle is discouraged, use Locator instead
7046
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-element-handle.md
7051
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-element-handle.md
7047
7052
  */
7048
7053
  'playwright/no-element-handle'?: Linter.RuleEntry<[]>;
7049
7054
  /**
7050
7055
  * The use of `page.$eval` and `page.$$eval` are discouraged, use `locator.evaluate` or `locator.evaluateAll` instead
7051
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-eval.md
7056
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-eval.md
7052
7057
  */
7053
7058
  'playwright/no-eval'?: Linter.RuleEntry<[]>;
7054
7059
  /**
7055
7060
  * Prevent usage of `.only()` focus test annotation
7056
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-focused-test.md
7061
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-focused-test.md
7057
7062
  */
7058
7063
  'playwright/no-focused-test'?: Linter.RuleEntry<[]>;
7059
7064
  /**
7060
7065
  * Prevent usage of `{ force: true }` option.
7061
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-force-option.md
7066
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-force-option.md
7062
7067
  */
7063
7068
  'playwright/no-force-option'?: Linter.RuleEntry<[]>;
7064
7069
  /**
7065
7070
  * Disallows the usage of getByTitle()
7066
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-get-by-title.md
7071
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-get-by-title.md
7067
7072
  */
7068
7073
  'playwright/no-get-by-title'?: Linter.RuleEntry<[]>;
7069
7074
  /**
7070
7075
  * Disallow setup and teardown hooks
7071
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-hooks.md
7076
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-hooks.md
7072
7077
  */
7073
7078
  'playwright/no-hooks'?: Linter.RuleEntry<PlaywrightNoHooks>;
7074
7079
  /**
7075
7080
  * Disallow nested `test.step()` methods
7076
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-nested-step.md
7081
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-nested-step.md
7077
7082
  */
7078
7083
  'playwright/no-nested-step'?: Linter.RuleEntry<[]>;
7079
7084
  /**
7080
7085
  * Prevent usage of the networkidle option
7081
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-networkidle.md
7086
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-networkidle.md
7082
7087
  */
7083
7088
  'playwright/no-networkidle'?: Linter.RuleEntry<[]>;
7084
7089
  /**
7085
7090
  * Disallow usage of nth methods
7086
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-nth-methods.md
7091
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-nth-methods.md
7087
7092
  */
7088
7093
  'playwright/no-nth-methods'?: Linter.RuleEntry<[]>;
7089
7094
  /**
7090
7095
  * Prevent usage of page.pause()
7091
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-page-pause.md
7096
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-page-pause.md
7092
7097
  */
7093
7098
  'playwright/no-page-pause'?: Linter.RuleEntry<[]>;
7094
7099
  /**
7095
7100
  * Disallows the usage of raw locators
7096
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-raw-locators.md
7101
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-raw-locators.md
7097
7102
  */
7098
7103
  'playwright/no-raw-locators'?: Linter.RuleEntry<PlaywrightNoRawLocators>;
7104
+ /**
7105
+ * Disallows the usage of specific locator methods
7106
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-locators.md
7107
+ */
7108
+ 'playwright/no-restricted-locators'?: Linter.RuleEntry<PlaywrightNoRestrictedLocators>;
7099
7109
  /**
7100
7110
  * Disallow specific matchers & modifiers
7101
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-matchers.md
7111
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-matchers.md
7102
7112
  */
7103
7113
  'playwright/no-restricted-matchers'?: Linter.RuleEntry<PlaywrightNoRestrictedMatchers>;
7104
7114
  /**
7105
7115
  * Prevent usage of the `.skip()` skip test annotation.
7106
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-skipped-test.md
7116
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-skipped-test.md
7107
7117
  */
7108
7118
  'playwright/no-skipped-test'?: Linter.RuleEntry<PlaywrightNoSkippedTest>;
7109
7119
  /**
7110
7120
  * Prevent usage of the `.slow()` slow test annotation.
7111
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-slowed-test.md
7121
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-slowed-test.md
7112
7122
  */
7113
7123
  'playwright/no-slowed-test'?: Linter.RuleEntry<PlaywrightNoSlowedTest>;
7114
7124
  /**
7115
7125
  * Disallow using `expect` outside of `test` blocks
7116
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-standalone-expect.md
7126
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-standalone-expect.md
7117
7127
  */
7118
7128
  'playwright/no-standalone-expect'?: Linter.RuleEntry<[]>;
7119
7129
  /**
7120
7130
  * Prevent unsafe variable references in page.evaluate() and page.addInitScript()
7121
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-unsafe-references.md
7131
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-unsafe-references.md
7122
7132
  */
7123
7133
  'playwright/no-unsafe-references'?: Linter.RuleEntry<[]>;
7124
7134
  /**
7125
7135
  * Disallow usage of page locators that are not used
7126
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-unused-locators.md
7136
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-unused-locators.md
7127
7137
  */
7128
7138
  'playwright/no-unused-locators'?: Linter.RuleEntry<[]>;
7129
7139
  /**
7130
7140
  * Disallow unnecessary awaits for Playwright methods
7131
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-useless-await.md
7141
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-useless-await.md
7132
7142
  */
7133
7143
  'playwright/no-useless-await'?: Linter.RuleEntry<[]>;
7134
7144
  /**
7135
7145
  * Disallow usage of 'not' matchers when a more specific matcher exists
7136
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-useless-not.md
7146
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-useless-not.md
7137
7147
  */
7138
7148
  'playwright/no-useless-not'?: Linter.RuleEntry<[]>;
7139
7149
  /**
7140
7150
  * Prevent usage of page.waitForNavigation()
7141
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-navigation.md
7151
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-navigation.md
7142
7152
  */
7143
7153
  'playwright/no-wait-for-navigation'?: Linter.RuleEntry<[]>;
7144
7154
  /**
7145
7155
  * Prevent usage of page.waitForSelector()
7146
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-selector.md
7156
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-selector.md
7147
7157
  */
7148
7158
  'playwright/no-wait-for-selector'?: Linter.RuleEntry<[]>;
7149
7159
  /**
7150
7160
  * Prevent usage of page.waitForTimeout()
7151
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-timeout.md
7161
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-timeout.md
7152
7162
  */
7153
7163
  'playwright/no-wait-for-timeout'?: Linter.RuleEntry<[]>;
7154
7164
  /**
7155
7165
  * Suggest using the built-in comparison matchers
7156
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-comparison-matcher.md
7166
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-comparison-matcher.md
7157
7167
  */
7158
7168
  'playwright/prefer-comparison-matcher'?: Linter.RuleEntry<[]>;
7159
7169
  /**
7160
7170
  * Suggest using the built-in equality matchers
7161
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-equality-matcher.md
7171
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-equality-matcher.md
7162
7172
  */
7163
7173
  'playwright/prefer-equality-matcher'?: Linter.RuleEntry<[]>;
7164
7174
  /**
7165
7175
  * Prefer having hooks in a consistent order
7166
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-in-order.md
7176
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-in-order.md
7167
7177
  */
7168
7178
  'playwright/prefer-hooks-in-order'?: Linter.RuleEntry<[]>;
7169
7179
  /**
7170
7180
  * Suggest having hooks before any test cases
7171
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-on-top.md
7181
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-on-top.md
7172
7182
  */
7173
7183
  'playwright/prefer-hooks-on-top'?: Linter.RuleEntry<[]>;
7174
7184
  /**
7175
7185
  * Suggest locators over page methods
7176
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-locator.md
7186
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-locator.md
7177
7187
  */
7178
7188
  'playwright/prefer-locator'?: Linter.RuleEntry<[]>;
7179
7189
  /**
7180
7190
  * Enforce lowercase test names
7181
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-lowercase-title.md
7191
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-lowercase-title.md
7182
7192
  */
7183
7193
  'playwright/prefer-lowercase-title'?: Linter.RuleEntry<PlaywrightPreferLowercaseTitle>;
7184
7194
  /**
7185
7195
  * Prefer native locator functions
7186
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-native-locators.md
7196
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-native-locators.md
7187
7197
  */
7188
7198
  'playwright/prefer-native-locators'?: Linter.RuleEntry<PlaywrightPreferNativeLocators>;
7189
7199
  /**
7190
7200
  * Suggest using `toStrictEqual()`
7191
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-strict-equal.md
7201
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-strict-equal.md
7192
7202
  */
7193
7203
  'playwright/prefer-strict-equal'?: Linter.RuleEntry<[]>;
7194
7204
  /**
7195
7205
  * Suggest using `toBe()` for primitive literals
7196
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-be.md
7206
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-be.md
7197
7207
  */
7198
7208
  'playwright/prefer-to-be'?: Linter.RuleEntry<[]>;
7199
7209
  /**
7200
7210
  * Suggest using toContain()
7201
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-contain.md
7211
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-contain.md
7202
7212
  */
7203
7213
  'playwright/prefer-to-contain'?: Linter.RuleEntry<[]>;
7204
7214
  /**
7205
7215
  * Suggest using `toHaveCount()`
7206
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-have-count.md
7216
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-have-count.md
7207
7217
  */
7208
7218
  'playwright/prefer-to-have-count'?: Linter.RuleEntry<[]>;
7209
7219
  /**
7210
7220
  * Suggest using `toHaveLength()`
7211
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-have-length.md
7221
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-have-length.md
7212
7222
  */
7213
7223
  'playwright/prefer-to-have-length'?: Linter.RuleEntry<[]>;
7214
7224
  /**
7215
7225
  * Prefer web first assertions
7216
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-web-first-assertions.md
7226
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-web-first-assertions.md
7217
7227
  */
7218
7228
  'playwright/prefer-web-first-assertions'?: Linter.RuleEntry<[]>;
7219
7229
  /**
7220
7230
  * Require setup and teardown code to be within a hook
7221
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-hook.md
7231
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-hook.md
7222
7232
  */
7223
7233
  'playwright/require-hook'?: Linter.RuleEntry<PlaywrightRequireHook>;
7224
7234
  /**
7225
7235
  * Require all assertions to use `expect.soft`
7226
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-soft-assertions.md
7236
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-soft-assertions.md
7227
7237
  */
7228
7238
  'playwright/require-soft-assertions'?: Linter.RuleEntry<[]>;
7229
7239
  /**
7230
7240
  * Require a message for `toThrow()`
7231
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-to-throw-message.md
7241
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-to-throw-message.md
7232
7242
  */
7233
7243
  'playwright/require-to-throw-message'?: Linter.RuleEntry<[]>;
7234
7244
  /**
7235
7245
  * Require test cases and hooks to be inside a `test.describe` block
7236
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-top-level-describe.md
7246
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-top-level-describe.md
7237
7247
  */
7238
7248
  'playwright/require-top-level-describe'?: Linter.RuleEntry<PlaywrightRequireTopLevelDescribe>;
7239
7249
  /**
7240
7250
  * Enforce valid `describe()` callback
7241
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-describe-callback.md
7251
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-describe-callback.md
7242
7252
  */
7243
7253
  'playwright/valid-describe-callback'?: Linter.RuleEntry<[]>;
7244
7254
  /**
7245
7255
  * Enforce valid `expect()` usage
7246
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-expect.md
7256
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-expect.md
7247
7257
  */
7248
7258
  'playwright/valid-expect'?: Linter.RuleEntry<PlaywrightValidExpect>;
7249
7259
  /**
7250
7260
  * Require promises that have expectations in their chain to be valid
7251
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-expect-in-promise.md
7261
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-expect-in-promise.md
7252
7262
  */
7253
7263
  'playwright/valid-expect-in-promise'?: Linter.RuleEntry<[]>;
7254
7264
  /**
@@ -7257,7 +7267,7 @@ interface PlaywrightRules {
7257
7267
  'playwright/valid-test-tags'?: Linter.RuleEntry<PlaywrightValidTestTags>;
7258
7268
  /**
7259
7269
  * Enforce valid titles
7260
- * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-title.md
7270
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-title.md
7261
7271
  */
7262
7272
  'playwright/valid-title'?: Linter.RuleEntry<PlaywrightValidTitle>;
7263
7273
  }
@@ -7280,6 +7290,10 @@ type PlaywrightNoHooks = [] | [{
7280
7290
  type PlaywrightNoRawLocators = [] | [{
7281
7291
  allowed?: string[];
7282
7292
  }];
7293
+ type PlaywrightNoRestrictedLocators = [] | [(string | {
7294
+ message?: string;
7295
+ type: string;
7296
+ })[]];
7283
7297
  type PlaywrightNoRestrictedMatchers = [] | [{
7284
7298
  [k: string]: (string | null) | undefined;
7285
7299
  }];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@component-hook/eslint-plugin",
3
3
  "type": "module",
4
- "version": "1.4.0",
4
+ "version": "1.4.2",
5
5
  "description": "ESLint config for component hook",
6
6
  "author": "Tzuyi",
7
7
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  "eslint-config-prettier": "^10.1.8",
48
48
  "eslint-plugin-de-morgan": "^2.0.0",
49
49
  "eslint-plugin-import": "^2.32.0",
50
- "eslint-plugin-jsdoc": "^61.7.1",
50
+ "eslint-plugin-jsdoc": "^62.0.0",
51
51
  "eslint-plugin-jsonc": "^2.21.0",
52
52
  "eslint-plugin-jsx-a11y": "^6.10.2",
53
53
  "eslint-plugin-perfectionist": "^5.3.1",