@component-hook/eslint-plugin 1.4.1 → 1.4.3
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.cjs +116 -110
- package/dist/index.d.cts +113 -55
- package/dist/index.d.mts +113 -55
- package/dist/index.mjs +114 -107
- package/package.json +21 -22
package/dist/index.d.mts
CHANGED
|
@@ -1956,7 +1956,7 @@ interface VueRules {
|
|
|
1956
1956
|
* Disallow default values that will never be used
|
|
1957
1957
|
* @see https://typescript-eslint.io/rules/no-useless-default-assignment
|
|
1958
1958
|
*/
|
|
1959
|
-
'@typescript-eslint/no-useless-default-assignment'?: Linter.RuleEntry<
|
|
1959
|
+
'@typescript-eslint/no-useless-default-assignment'?: Linter.RuleEntry<TypescriptEslintNoUselessDefaultAssignment>;
|
|
1960
1960
|
/**
|
|
1961
1961
|
* Disallow empty exports that don't change anything in a module file
|
|
1962
1962
|
* @see https://typescript-eslint.io/rules/no-useless-empty-export
|
|
@@ -2130,6 +2130,11 @@ interface VueRules {
|
|
|
2130
2130
|
* @see https://typescript-eslint.io/rules/strict-boolean-expressions
|
|
2131
2131
|
*/
|
|
2132
2132
|
'@typescript-eslint/strict-boolean-expressions'?: Linter.RuleEntry<TypescriptEslintStrictBooleanExpressions>;
|
|
2133
|
+
/**
|
|
2134
|
+
* Disallow passing a value-returning function in a position accepting a void function
|
|
2135
|
+
* @see https://typescript-eslint.io/rules/strict-void-return
|
|
2136
|
+
*/
|
|
2137
|
+
'@typescript-eslint/strict-void-return'?: Linter.RuleEntry<TypescriptEslintStrictVoidReturn>;
|
|
2133
2138
|
/**
|
|
2134
2139
|
* Require switch-case statements to be exhaustive
|
|
2135
2140
|
* @see https://typescript-eslint.io/rules/switch-exhaustiveness-check
|
|
@@ -2666,6 +2671,11 @@ interface VueRules {
|
|
|
2666
2671
|
* @see https://eslint.vuejs.org/rules/no-lifecycle-after-await.html
|
|
2667
2672
|
*/
|
|
2668
2673
|
'vue/no-lifecycle-after-await'?: Linter.RuleEntry<[]>;
|
|
2674
|
+
/**
|
|
2675
|
+
* disallow object, array, and function literals in template
|
|
2676
|
+
* @see https://eslint.vuejs.org/rules/no-literals-in-template.html
|
|
2677
|
+
*/
|
|
2678
|
+
'vue/no-literals-in-template'?: Linter.RuleEntry<[]>;
|
|
2669
2679
|
/**
|
|
2670
2680
|
* disallow unnecessary `<template>`
|
|
2671
2681
|
* @see https://eslint.vuejs.org/rules/no-lone-template.html
|
|
@@ -2876,6 +2886,11 @@ interface VueRules {
|
|
|
2876
2886
|
* @see https://eslint.vuejs.org/rules/no-undef-components.html
|
|
2877
2887
|
*/
|
|
2878
2888
|
'vue/no-undef-components'?: Linter.RuleEntry<VueNoUndefComponents>;
|
|
2889
|
+
/**
|
|
2890
|
+
* disallow use of undefined custom directives
|
|
2891
|
+
* @see https://eslint.vuejs.org/rules/no-undef-directives.html
|
|
2892
|
+
*/
|
|
2893
|
+
'vue/no-undef-directives'?: Linter.RuleEntry<VueNoUndefDirectives>;
|
|
2879
2894
|
/**
|
|
2880
2895
|
* disallow undefined properties
|
|
2881
2896
|
* @see https://eslint.vuejs.org/rules/no-undef-properties.html
|
|
@@ -4071,6 +4086,9 @@ type TypescriptEslintNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
4071
4086
|
caughtErrors?: ("all" | "none");
|
|
4072
4087
|
caughtErrorsIgnorePattern?: string;
|
|
4073
4088
|
destructuredArrayIgnorePattern?: string;
|
|
4089
|
+
enableAutofixRemoval?: {
|
|
4090
|
+
imports?: boolean;
|
|
4091
|
+
};
|
|
4074
4092
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
4075
4093
|
ignoreRestSiblings?: boolean;
|
|
4076
4094
|
ignoreUsingDeclarations?: boolean;
|
|
@@ -4087,6 +4105,9 @@ type TypescriptEslintNoUseBeforeDefine = [] | [("nofunc" | {
|
|
|
4087
4105
|
typedefs?: boolean;
|
|
4088
4106
|
variables?: boolean;
|
|
4089
4107
|
})];
|
|
4108
|
+
type TypescriptEslintNoUselessDefaultAssignment = [] | [{
|
|
4109
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
|
|
4110
|
+
}];
|
|
4090
4111
|
type TypescriptEslintNoVarRequires = [] | [{
|
|
4091
4112
|
allow?: string[];
|
|
4092
4113
|
}];
|
|
@@ -4252,6 +4273,9 @@ type TypescriptEslintStrictBooleanExpressions = [] | [{
|
|
|
4252
4273
|
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
|
|
4253
4274
|
allowString?: boolean;
|
|
4254
4275
|
}];
|
|
4276
|
+
type TypescriptEslintStrictVoidReturn = [] | [{
|
|
4277
|
+
allowReturnAny?: boolean;
|
|
4278
|
+
}];
|
|
4255
4279
|
type TypescriptEslintSwitchExhaustivenessCheck = [] | [{
|
|
4256
4280
|
allowDefaultCaseForExhaustiveSwitch?: boolean;
|
|
4257
4281
|
considerDefaultExhaustiveForUnions?: boolean;
|
|
@@ -4986,6 +5010,7 @@ type VueNoLoneTemplate = [] | [{
|
|
|
4986
5010
|
}];
|
|
4987
5011
|
type VueNoMultiSpaces = [] | [{
|
|
4988
5012
|
ignoreProperties?: boolean;
|
|
5013
|
+
ignoreEOLComments?: boolean;
|
|
4989
5014
|
}];
|
|
4990
5015
|
type VueNoMultipleTemplateRoot = [] | [{
|
|
4991
5016
|
disallowComments?: boolean;
|
|
@@ -5119,6 +5144,9 @@ type VueNoTemplateTargetBlank = [] | [{
|
|
|
5119
5144
|
type VueNoUndefComponents = [] | [{
|
|
5120
5145
|
ignorePatterns?: unknown[];
|
|
5121
5146
|
}];
|
|
5147
|
+
type VueNoUndefDirectives = [] | [{
|
|
5148
|
+
ignore?: string[];
|
|
5149
|
+
}];
|
|
5122
5150
|
type VueNoUndefProperties = [] | [{
|
|
5123
5151
|
ignores?: string[];
|
|
5124
5152
|
}];
|
|
@@ -5575,7 +5603,7 @@ interface SonarjsRules {
|
|
|
5575
5603
|
*/
|
|
5576
5604
|
'sonarjs/aws-iam-public-access'?: Linter.RuleEntry<[]>;
|
|
5577
5605
|
/**
|
|
5578
|
-
* Using unencrypted
|
|
5606
|
+
* Using unencrypted Opensearch domains is security-sensitive
|
|
5579
5607
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6308/javascript
|
|
5580
5608
|
*/
|
|
5581
5609
|
'sonarjs/aws-opensearchservice-domain'?: Linter.RuleEntry<[]>;
|
|
@@ -5794,6 +5822,11 @@ interface SonarjsRules {
|
|
|
5794
5822
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5869/javascript
|
|
5795
5823
|
*/
|
|
5796
5824
|
'sonarjs/duplicates-in-character-class'?: Linter.RuleEntry<[]>;
|
|
5825
|
+
/**
|
|
5826
|
+
* Templates should not be constructed dynamically
|
|
5827
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S7790/javascript
|
|
5828
|
+
*/
|
|
5829
|
+
'sonarjs/dynamically-constructed-templates'?: Linter.RuleEntry<[]>;
|
|
5797
5830
|
/**
|
|
5798
5831
|
* "if ... else if" constructs should end with "else" clauses
|
|
5799
5832
|
* @see https://sonarsource.github.io/rspec/#/rspec/S126/javascript
|
|
@@ -5896,6 +5929,11 @@ interface SonarjsRules {
|
|
|
5896
5929
|
* @see https://sonarsource.github.io/rspec/#/rspec/S3531/javascript
|
|
5897
5930
|
*/
|
|
5898
5931
|
'sonarjs/generator-without-yield'?: Linter.RuleEntry<[]>;
|
|
5932
|
+
/**
|
|
5933
|
+
* Credentials should not be hard-coded
|
|
5934
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S6437/javascript
|
|
5935
|
+
*/
|
|
5936
|
+
'sonarjs/hardcoded-secret-signatures'?: Linter.RuleEntry<[]>;
|
|
5899
5937
|
/**
|
|
5900
5938
|
* Using weak hashing algorithms is security-sensitive
|
|
5901
5939
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4790/javascript
|
|
@@ -6167,12 +6205,12 @@ interface SonarjsRules {
|
|
|
6167
6205
|
*/
|
|
6168
6206
|
'sonarjs/no-hardcoded-ip'?: Linter.RuleEntry<[]>;
|
|
6169
6207
|
/**
|
|
6170
|
-
*
|
|
6208
|
+
* Credentials should not be hard-coded
|
|
6171
6209
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2068/javascript
|
|
6172
6210
|
*/
|
|
6173
6211
|
'sonarjs/no-hardcoded-passwords'?: Linter.RuleEntry<SonarjsNoHardcodedPasswords>;
|
|
6174
6212
|
/**
|
|
6175
|
-
*
|
|
6213
|
+
* Secrets should not be hard-coded
|
|
6176
6214
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6418/javascript
|
|
6177
6215
|
*/
|
|
6178
6216
|
'sonarjs/no-hardcoded-secrets'?: Linter.RuleEntry<SonarjsNoHardcodedSecrets>;
|
|
@@ -6661,6 +6699,11 @@ interface SonarjsRules {
|
|
|
6661
6699
|
* @deprecated
|
|
6662
6700
|
*/
|
|
6663
6701
|
'sonarjs/regular-expr'?: Linter.RuleEntry<[]>;
|
|
6702
|
+
/**
|
|
6703
|
+
* Wallet phrases should not be hard-coded
|
|
6704
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S7639/javascript
|
|
6705
|
+
*/
|
|
6706
|
+
'sonarjs/review-blockchain-mnemonic'?: Linter.RuleEntry<[]>;
|
|
6664
6707
|
/**
|
|
6665
6708
|
* A new session should be created during user authentication
|
|
6666
6709
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5876/javascript
|
|
@@ -7001,263 +7044,274 @@ interface SecurityRules {
|
|
|
7001
7044
|
//#endregion
|
|
7002
7045
|
//#region typegen/playwright.d.ts
|
|
7003
7046
|
interface PlaywrightRules {
|
|
7047
|
+
/**
|
|
7048
|
+
* Enforces a blank line between Playwright test blocks (e.g., test, test.step, test.beforeEach, etc.).
|
|
7049
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/consistent-spacing-between-blocks.md
|
|
7050
|
+
*/
|
|
7051
|
+
'playwright/consistent-spacing-between-blocks'?: Linter.RuleEntry<[]>;
|
|
7004
7052
|
/**
|
|
7005
7053
|
* Enforce assertion to be made in a test body
|
|
7006
|
-
* @see https://github.com/
|
|
7054
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/expect-expect.md
|
|
7007
7055
|
*/
|
|
7008
7056
|
'playwright/expect-expect'?: Linter.RuleEntry<PlaywrightExpectExpect>;
|
|
7009
7057
|
/**
|
|
7010
7058
|
* Enforces a maximum number assertion calls in a test body
|
|
7011
|
-
* @see https://github.com/
|
|
7059
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/max-expects.md
|
|
7012
7060
|
*/
|
|
7013
7061
|
'playwright/max-expects'?: Linter.RuleEntry<PlaywrightMaxExpects>;
|
|
7014
7062
|
/**
|
|
7015
7063
|
* Enforces a maximum depth to nested describe calls
|
|
7016
|
-
* @see https://github.com/
|
|
7064
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/max-nested-describe.md
|
|
7017
7065
|
*/
|
|
7018
7066
|
'playwright/max-nested-describe'?: Linter.RuleEntry<PlaywrightMaxNestedDescribe>;
|
|
7019
7067
|
/**
|
|
7020
7068
|
* Identify false positives when async Playwright APIs are not properly awaited.
|
|
7021
|
-
* @see https://github.com/
|
|
7069
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/missing-playwright-await.md
|
|
7022
7070
|
*/
|
|
7023
7071
|
'playwright/missing-playwright-await'?: Linter.RuleEntry<PlaywrightMissingPlaywrightAwait>;
|
|
7024
7072
|
/**
|
|
7025
7073
|
* Disallow commented out tests
|
|
7026
|
-
* @see https://github.com/
|
|
7074
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-commented-out-tests.md
|
|
7027
7075
|
*/
|
|
7028
7076
|
'playwright/no-commented-out-tests'?: Linter.RuleEntry<[]>;
|
|
7029
7077
|
/**
|
|
7030
7078
|
* Disallow calling `expect` conditionally
|
|
7031
|
-
* @see https://github.com/
|
|
7079
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-expect.md
|
|
7032
7080
|
*/
|
|
7033
7081
|
'playwright/no-conditional-expect'?: Linter.RuleEntry<[]>;
|
|
7034
7082
|
/**
|
|
7035
7083
|
* Disallow conditional logic in tests
|
|
7036
|
-
* @see https://github.com/
|
|
7084
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-in-test.md
|
|
7037
7085
|
*/
|
|
7038
7086
|
'playwright/no-conditional-in-test'?: Linter.RuleEntry<[]>;
|
|
7039
7087
|
/**
|
|
7040
7088
|
* Disallow duplicate setup and teardown hooks
|
|
7041
|
-
* @see https://github.com/
|
|
7089
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-duplicate-hooks.md
|
|
7042
7090
|
*/
|
|
7043
7091
|
'playwright/no-duplicate-hooks'?: Linter.RuleEntry<[]>;
|
|
7044
7092
|
/**
|
|
7045
7093
|
* The use of ElementHandle is discouraged, use Locator instead
|
|
7046
|
-
* @see https://github.com/
|
|
7094
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-element-handle.md
|
|
7047
7095
|
*/
|
|
7048
7096
|
'playwright/no-element-handle'?: Linter.RuleEntry<[]>;
|
|
7049
7097
|
/**
|
|
7050
7098
|
* The use of `page.$eval` and `page.$$eval` are discouraged, use `locator.evaluate` or `locator.evaluateAll` instead
|
|
7051
|
-
* @see https://github.com/
|
|
7099
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-eval.md
|
|
7052
7100
|
*/
|
|
7053
7101
|
'playwright/no-eval'?: Linter.RuleEntry<[]>;
|
|
7054
7102
|
/**
|
|
7055
7103
|
* Prevent usage of `.only()` focus test annotation
|
|
7056
|
-
* @see https://github.com/
|
|
7104
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-focused-test.md
|
|
7057
7105
|
*/
|
|
7058
7106
|
'playwright/no-focused-test'?: Linter.RuleEntry<[]>;
|
|
7059
7107
|
/**
|
|
7060
7108
|
* Prevent usage of `{ force: true }` option.
|
|
7061
|
-
* @see https://github.com/
|
|
7109
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-force-option.md
|
|
7062
7110
|
*/
|
|
7063
7111
|
'playwright/no-force-option'?: Linter.RuleEntry<[]>;
|
|
7064
7112
|
/**
|
|
7065
7113
|
* Disallows the usage of getByTitle()
|
|
7066
|
-
* @see https://github.com/
|
|
7114
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-get-by-title.md
|
|
7067
7115
|
*/
|
|
7068
7116
|
'playwright/no-get-by-title'?: Linter.RuleEntry<[]>;
|
|
7069
7117
|
/**
|
|
7070
7118
|
* Disallow setup and teardown hooks
|
|
7071
|
-
* @see https://github.com/
|
|
7119
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-hooks.md
|
|
7072
7120
|
*/
|
|
7073
7121
|
'playwright/no-hooks'?: Linter.RuleEntry<PlaywrightNoHooks>;
|
|
7074
7122
|
/**
|
|
7075
7123
|
* Disallow nested `test.step()` methods
|
|
7076
|
-
* @see https://github.com/
|
|
7124
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-nested-step.md
|
|
7077
7125
|
*/
|
|
7078
7126
|
'playwright/no-nested-step'?: Linter.RuleEntry<[]>;
|
|
7079
7127
|
/**
|
|
7080
7128
|
* Prevent usage of the networkidle option
|
|
7081
|
-
* @see https://github.com/
|
|
7129
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-networkidle.md
|
|
7082
7130
|
*/
|
|
7083
7131
|
'playwright/no-networkidle'?: Linter.RuleEntry<[]>;
|
|
7084
7132
|
/**
|
|
7085
7133
|
* Disallow usage of nth methods
|
|
7086
|
-
* @see https://github.com/
|
|
7134
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-nth-methods.md
|
|
7087
7135
|
*/
|
|
7088
7136
|
'playwright/no-nth-methods'?: Linter.RuleEntry<[]>;
|
|
7089
7137
|
/**
|
|
7090
7138
|
* Prevent usage of page.pause()
|
|
7091
|
-
* @see https://github.com/
|
|
7139
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-page-pause.md
|
|
7092
7140
|
*/
|
|
7093
7141
|
'playwright/no-page-pause'?: Linter.RuleEntry<[]>;
|
|
7094
7142
|
/**
|
|
7095
7143
|
* Disallows the usage of raw locators
|
|
7096
|
-
* @see https://github.com/
|
|
7144
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-raw-locators.md
|
|
7097
7145
|
*/
|
|
7098
7146
|
'playwright/no-raw-locators'?: Linter.RuleEntry<PlaywrightNoRawLocators>;
|
|
7147
|
+
/**
|
|
7148
|
+
* Disallows the usage of specific locator methods
|
|
7149
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-locators.md
|
|
7150
|
+
*/
|
|
7151
|
+
'playwright/no-restricted-locators'?: Linter.RuleEntry<PlaywrightNoRestrictedLocators>;
|
|
7099
7152
|
/**
|
|
7100
7153
|
* Disallow specific matchers & modifiers
|
|
7101
|
-
* @see https://github.com/
|
|
7154
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-matchers.md
|
|
7102
7155
|
*/
|
|
7103
7156
|
'playwright/no-restricted-matchers'?: Linter.RuleEntry<PlaywrightNoRestrictedMatchers>;
|
|
7104
7157
|
/**
|
|
7105
7158
|
* Prevent usage of the `.skip()` skip test annotation.
|
|
7106
|
-
* @see https://github.com/
|
|
7159
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-skipped-test.md
|
|
7107
7160
|
*/
|
|
7108
7161
|
'playwright/no-skipped-test'?: Linter.RuleEntry<PlaywrightNoSkippedTest>;
|
|
7109
7162
|
/**
|
|
7110
7163
|
* Prevent usage of the `.slow()` slow test annotation.
|
|
7111
|
-
* @see https://github.com/
|
|
7164
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-slowed-test.md
|
|
7112
7165
|
*/
|
|
7113
7166
|
'playwright/no-slowed-test'?: Linter.RuleEntry<PlaywrightNoSlowedTest>;
|
|
7114
7167
|
/**
|
|
7115
7168
|
* Disallow using `expect` outside of `test` blocks
|
|
7116
|
-
* @see https://github.com/
|
|
7169
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-standalone-expect.md
|
|
7117
7170
|
*/
|
|
7118
7171
|
'playwright/no-standalone-expect'?: Linter.RuleEntry<[]>;
|
|
7119
7172
|
/**
|
|
7120
7173
|
* Prevent unsafe variable references in page.evaluate() and page.addInitScript()
|
|
7121
|
-
* @see https://github.com/
|
|
7174
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-unsafe-references.md
|
|
7122
7175
|
*/
|
|
7123
7176
|
'playwright/no-unsafe-references'?: Linter.RuleEntry<[]>;
|
|
7124
7177
|
/**
|
|
7125
7178
|
* Disallow usage of page locators that are not used
|
|
7126
|
-
* @see https://github.com/
|
|
7179
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-unused-locators.md
|
|
7127
7180
|
*/
|
|
7128
7181
|
'playwright/no-unused-locators'?: Linter.RuleEntry<[]>;
|
|
7129
7182
|
/**
|
|
7130
7183
|
* Disallow unnecessary awaits for Playwright methods
|
|
7131
|
-
* @see https://github.com/
|
|
7184
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-useless-await.md
|
|
7132
7185
|
*/
|
|
7133
7186
|
'playwright/no-useless-await'?: Linter.RuleEntry<[]>;
|
|
7134
7187
|
/**
|
|
7135
7188
|
* Disallow usage of 'not' matchers when a more specific matcher exists
|
|
7136
|
-
* @see https://github.com/
|
|
7189
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-useless-not.md
|
|
7137
7190
|
*/
|
|
7138
7191
|
'playwright/no-useless-not'?: Linter.RuleEntry<[]>;
|
|
7139
7192
|
/**
|
|
7140
7193
|
* Prevent usage of page.waitForNavigation()
|
|
7141
|
-
* @see https://github.com/
|
|
7194
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-navigation.md
|
|
7142
7195
|
*/
|
|
7143
7196
|
'playwright/no-wait-for-navigation'?: Linter.RuleEntry<[]>;
|
|
7144
7197
|
/**
|
|
7145
7198
|
* Prevent usage of page.waitForSelector()
|
|
7146
|
-
* @see https://github.com/
|
|
7199
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-selector.md
|
|
7147
7200
|
*/
|
|
7148
7201
|
'playwright/no-wait-for-selector'?: Linter.RuleEntry<[]>;
|
|
7149
7202
|
/**
|
|
7150
7203
|
* Prevent usage of page.waitForTimeout()
|
|
7151
|
-
* @see https://github.com/
|
|
7204
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-timeout.md
|
|
7152
7205
|
*/
|
|
7153
7206
|
'playwright/no-wait-for-timeout'?: Linter.RuleEntry<[]>;
|
|
7154
7207
|
/**
|
|
7155
7208
|
* Suggest using the built-in comparison matchers
|
|
7156
|
-
* @see https://github.com/
|
|
7209
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-comparison-matcher.md
|
|
7157
7210
|
*/
|
|
7158
7211
|
'playwright/prefer-comparison-matcher'?: Linter.RuleEntry<[]>;
|
|
7159
7212
|
/**
|
|
7160
7213
|
* Suggest using the built-in equality matchers
|
|
7161
|
-
* @see https://github.com/
|
|
7214
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-equality-matcher.md
|
|
7162
7215
|
*/
|
|
7163
7216
|
'playwright/prefer-equality-matcher'?: Linter.RuleEntry<[]>;
|
|
7164
7217
|
/**
|
|
7165
7218
|
* Prefer having hooks in a consistent order
|
|
7166
|
-
* @see https://github.com/
|
|
7219
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-in-order.md
|
|
7167
7220
|
*/
|
|
7168
7221
|
'playwright/prefer-hooks-in-order'?: Linter.RuleEntry<[]>;
|
|
7169
7222
|
/**
|
|
7170
7223
|
* Suggest having hooks before any test cases
|
|
7171
|
-
* @see https://github.com/
|
|
7224
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-on-top.md
|
|
7172
7225
|
*/
|
|
7173
7226
|
'playwright/prefer-hooks-on-top'?: Linter.RuleEntry<[]>;
|
|
7174
7227
|
/**
|
|
7175
7228
|
* Suggest locators over page methods
|
|
7176
|
-
* @see https://github.com/
|
|
7229
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-locator.md
|
|
7177
7230
|
*/
|
|
7178
7231
|
'playwright/prefer-locator'?: Linter.RuleEntry<[]>;
|
|
7179
7232
|
/**
|
|
7180
7233
|
* Enforce lowercase test names
|
|
7181
|
-
* @see https://github.com/
|
|
7234
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-lowercase-title.md
|
|
7182
7235
|
*/
|
|
7183
7236
|
'playwright/prefer-lowercase-title'?: Linter.RuleEntry<PlaywrightPreferLowercaseTitle>;
|
|
7184
7237
|
/**
|
|
7185
7238
|
* Prefer native locator functions
|
|
7186
|
-
* @see https://github.com/
|
|
7239
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-native-locators.md
|
|
7187
7240
|
*/
|
|
7188
7241
|
'playwright/prefer-native-locators'?: Linter.RuleEntry<PlaywrightPreferNativeLocators>;
|
|
7189
7242
|
/**
|
|
7190
7243
|
* Suggest using `toStrictEqual()`
|
|
7191
|
-
* @see https://github.com/
|
|
7244
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-strict-equal.md
|
|
7192
7245
|
*/
|
|
7193
7246
|
'playwright/prefer-strict-equal'?: Linter.RuleEntry<[]>;
|
|
7194
7247
|
/**
|
|
7195
7248
|
* Suggest using `toBe()` for primitive literals
|
|
7196
|
-
* @see https://github.com/
|
|
7249
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-be.md
|
|
7197
7250
|
*/
|
|
7198
7251
|
'playwright/prefer-to-be'?: Linter.RuleEntry<[]>;
|
|
7199
7252
|
/**
|
|
7200
7253
|
* Suggest using toContain()
|
|
7201
|
-
* @see https://github.com/
|
|
7254
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-contain.md
|
|
7202
7255
|
*/
|
|
7203
7256
|
'playwright/prefer-to-contain'?: Linter.RuleEntry<[]>;
|
|
7204
7257
|
/**
|
|
7205
7258
|
* Suggest using `toHaveCount()`
|
|
7206
|
-
* @see https://github.com/
|
|
7259
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-have-count.md
|
|
7207
7260
|
*/
|
|
7208
7261
|
'playwright/prefer-to-have-count'?: Linter.RuleEntry<[]>;
|
|
7209
7262
|
/**
|
|
7210
7263
|
* Suggest using `toHaveLength()`
|
|
7211
|
-
* @see https://github.com/
|
|
7264
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-to-have-length.md
|
|
7212
7265
|
*/
|
|
7213
7266
|
'playwright/prefer-to-have-length'?: Linter.RuleEntry<[]>;
|
|
7214
7267
|
/**
|
|
7215
7268
|
* Prefer web first assertions
|
|
7216
|
-
* @see https://github.com/
|
|
7269
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/prefer-web-first-assertions.md
|
|
7217
7270
|
*/
|
|
7218
7271
|
'playwright/prefer-web-first-assertions'?: Linter.RuleEntry<[]>;
|
|
7219
7272
|
/**
|
|
7220
7273
|
* Require setup and teardown code to be within a hook
|
|
7221
|
-
* @see https://github.com/
|
|
7274
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-hook.md
|
|
7222
7275
|
*/
|
|
7223
7276
|
'playwright/require-hook'?: Linter.RuleEntry<PlaywrightRequireHook>;
|
|
7224
7277
|
/**
|
|
7225
7278
|
* Require all assertions to use `expect.soft`
|
|
7226
|
-
* @see https://github.com/
|
|
7279
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-soft-assertions.md
|
|
7227
7280
|
*/
|
|
7228
7281
|
'playwright/require-soft-assertions'?: Linter.RuleEntry<[]>;
|
|
7229
7282
|
/**
|
|
7230
7283
|
* Require a message for `toThrow()`
|
|
7231
|
-
* @see https://github.com/
|
|
7284
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-to-throw-message.md
|
|
7232
7285
|
*/
|
|
7233
7286
|
'playwright/require-to-throw-message'?: Linter.RuleEntry<[]>;
|
|
7234
7287
|
/**
|
|
7235
7288
|
* Require test cases and hooks to be inside a `test.describe` block
|
|
7236
|
-
* @see https://github.com/
|
|
7289
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-top-level-describe.md
|
|
7237
7290
|
*/
|
|
7238
7291
|
'playwright/require-top-level-describe'?: Linter.RuleEntry<PlaywrightRequireTopLevelDescribe>;
|
|
7239
7292
|
/**
|
|
7240
7293
|
* Enforce valid `describe()` callback
|
|
7241
|
-
* @see https://github.com/
|
|
7294
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-describe-callback.md
|
|
7242
7295
|
*/
|
|
7243
7296
|
'playwright/valid-describe-callback'?: Linter.RuleEntry<[]>;
|
|
7244
7297
|
/**
|
|
7245
7298
|
* Enforce valid `expect()` usage
|
|
7246
|
-
* @see https://github.com/
|
|
7299
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-expect.md
|
|
7247
7300
|
*/
|
|
7248
7301
|
'playwright/valid-expect'?: Linter.RuleEntry<PlaywrightValidExpect>;
|
|
7249
7302
|
/**
|
|
7250
7303
|
* Require promises that have expectations in their chain to be valid
|
|
7251
|
-
* @see https://github.com/
|
|
7304
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-expect-in-promise.md
|
|
7252
7305
|
*/
|
|
7253
7306
|
'playwright/valid-expect-in-promise'?: Linter.RuleEntry<[]>;
|
|
7254
7307
|
/**
|
|
7255
7308
|
* Enforce valid tag format in Playwright test blocks and titles
|
|
7309
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-test-tags.md
|
|
7256
7310
|
*/
|
|
7257
7311
|
'playwright/valid-test-tags'?: Linter.RuleEntry<PlaywrightValidTestTags>;
|
|
7258
7312
|
/**
|
|
7259
7313
|
* Enforce valid titles
|
|
7260
|
-
* @see https://github.com/
|
|
7314
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-title.md
|
|
7261
7315
|
*/
|
|
7262
7316
|
'playwright/valid-title'?: Linter.RuleEntry<PlaywrightValidTitle>;
|
|
7263
7317
|
}
|
|
@@ -7280,6 +7334,10 @@ type PlaywrightNoHooks = [] | [{
|
|
|
7280
7334
|
type PlaywrightNoRawLocators = [] | [{
|
|
7281
7335
|
allowed?: string[];
|
|
7282
7336
|
}];
|
|
7337
|
+
type PlaywrightNoRestrictedLocators = [] | [(string | {
|
|
7338
|
+
message?: string;
|
|
7339
|
+
type: string;
|
|
7340
|
+
})[]];
|
|
7283
7341
|
type PlaywrightNoRestrictedMatchers = [] | [{
|
|
7284
7342
|
[k: string]: (string | null) | undefined;
|
|
7285
7343
|
}];
|