@anolilab/eslint-config 16.2.24 → 16.2.25

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.ts CHANGED
@@ -2935,6 +2935,11 @@ interface RuleOptions {
2935
2935
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/expect-expect.md
2936
2936
  */
2937
2937
  'playwright/expect-expect'?: Linter.RuleEntry<PlaywrightExpectExpect>
2938
+ /**
2939
+ * Enforces a maximum number assertion calls in a test body
2940
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/max-expects.md
2941
+ */
2942
+ 'playwright/max-expects'?: Linter.RuleEntry<PlaywrightMaxExpects>
2938
2943
  /**
2939
2944
  * Enforces a maximum depth to nested describe calls
2940
2945
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/max-nested-describe.md
@@ -2942,13 +2947,29 @@ interface RuleOptions {
2942
2947
  'playwright/max-nested-describe'?: Linter.RuleEntry<PlaywrightMaxNestedDescribe>
2943
2948
  /**
2944
2949
  * Identify false positives when async Playwright APIs are not properly awaited.
2950
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/missing-playwright-await.md
2945
2951
  */
2946
2952
  'playwright/missing-playwright-await'?: Linter.RuleEntry<PlaywrightMissingPlaywrightAwait>
2953
+ /**
2954
+ * Disallow commented out tests
2955
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-commented-out-tests.md
2956
+ */
2957
+ 'playwright/no-commented-out-tests'?: Linter.RuleEntry<[]>
2958
+ /**
2959
+ * Disallow calling `expect` conditionally
2960
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-expect.md
2961
+ */
2962
+ 'playwright/no-conditional-expect'?: Linter.RuleEntry<[]>
2947
2963
  /**
2948
2964
  * Disallow conditional logic in tests
2949
2965
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-conditional-in-test.md
2950
2966
  */
2951
2967
  'playwright/no-conditional-in-test'?: Linter.RuleEntry<[]>
2968
+ /**
2969
+ * Disallow duplicate setup and teardown hooks
2970
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-duplicate-hooks.md
2971
+ */
2972
+ 'playwright/no-duplicate-hooks'?: Linter.RuleEntry<[]>
2952
2973
  /**
2953
2974
  * The use of ElementHandle is discouraged, use Locator instead
2954
2975
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-element-handle.md
@@ -2969,6 +2990,16 @@ interface RuleOptions {
2969
2990
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-force-option.md
2970
2991
  */
2971
2992
  'playwright/no-force-option'?: Linter.RuleEntry<[]>
2993
+ /**
2994
+ * Disallows the usage of getByTitle()
2995
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-get-by-title.md
2996
+ */
2997
+ 'playwright/no-get-by-title'?: Linter.RuleEntry<[]>
2998
+ /**
2999
+ * Disallow setup and teardown hooks
3000
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-hooks.md
3001
+ */
3002
+ 'playwright/no-hooks'?: Linter.RuleEntry<PlaywrightNoHooks>
2972
3003
  /**
2973
3004
  * Disallow nested `test.step()` methods
2974
3005
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-nested-step.md
@@ -2976,6 +3007,7 @@ interface RuleOptions {
2976
3007
  'playwright/no-nested-step'?: Linter.RuleEntry<[]>
2977
3008
  /**
2978
3009
  * Prevent usage of the networkidle option
3010
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-networkidle.md
2979
3011
  */
2980
3012
  'playwright/no-networkidle'?: Linter.RuleEntry<[]>
2981
3013
  /**
@@ -2985,13 +3017,14 @@ interface RuleOptions {
2985
3017
  'playwright/no-nth-methods'?: Linter.RuleEntry<[]>
2986
3018
  /**
2987
3019
  * Prevent usage of page.pause()
3020
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-page-pause.md
2988
3021
  */
2989
3022
  'playwright/no-page-pause'?: Linter.RuleEntry<[]>
2990
3023
  /**
2991
3024
  * Disallows the usage of raw locators
2992
3025
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-raw-locators.md
2993
3026
  */
2994
- 'playwright/no-raw-locators'?: Linter.RuleEntry<[]>
3027
+ 'playwright/no-raw-locators'?: Linter.RuleEntry<PlaywrightNoRawLocators>
2995
3028
  /**
2996
3029
  * Disallow specific matchers & modifiers
2997
3030
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-matchers.md
@@ -3002,8 +3035,24 @@ interface RuleOptions {
3002
3035
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-skipped-test.md
3003
3036
  */
3004
3037
  'playwright/no-skipped-test'?: Linter.RuleEntry<PlaywrightNoSkippedTest>
3038
+ /**
3039
+ * Prevent usage of the `.slow()` slow test annotation.
3040
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-slowed-test.md
3041
+ */
3042
+ 'playwright/no-slowed-test'?: Linter.RuleEntry<PlaywrightNoSlowedTest>
3043
+ /**
3044
+ * Disallow using `expect` outside of `test` blocks
3045
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-standalone-expect.md
3046
+ */
3047
+ 'playwright/no-standalone-expect'?: Linter.RuleEntry<[]>
3048
+ /**
3049
+ * Prevent unsafe variable references in page.evaluate() and page.addInitScript()
3050
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-unsafe-references.md
3051
+ */
3052
+ 'playwright/no-unsafe-references'?: Linter.RuleEntry<[]>
3005
3053
  /**
3006
3054
  * Disallow unnecessary awaits for Playwright methods
3055
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-useless-await.md
3007
3056
  */
3008
3057
  'playwright/no-useless-await'?: Linter.RuleEntry<[]>
3009
3058
  /**
@@ -3011,16 +3060,56 @@ interface RuleOptions {
3011
3060
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-useless-not.md
3012
3061
  */
3013
3062
  'playwright/no-useless-not'?: Linter.RuleEntry<[]>
3063
+ /**
3064
+ * Prevent usage of page.waitForNavigation()
3065
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-navigation.md
3066
+ */
3067
+ 'playwright/no-wait-for-navigation'?: Linter.RuleEntry<[]>
3068
+ /**
3069
+ * Prevent usage of page.waitForSelector()
3070
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-selector.md
3071
+ */
3072
+ 'playwright/no-wait-for-selector'?: Linter.RuleEntry<[]>
3014
3073
  /**
3015
3074
  * Prevent usage of page.waitForTimeout()
3016
3075
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-timeout.md
3017
3076
  */
3018
3077
  'playwright/no-wait-for-timeout'?: Linter.RuleEntry<[]>
3078
+ /**
3079
+ * Suggest using the built-in comparison matchers
3080
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-comparison-matcher.md
3081
+ */
3082
+ 'playwright/prefer-comparison-matcher'?: Linter.RuleEntry<[]>
3083
+ /**
3084
+ * Suggest using the built-in equality matchers
3085
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-equality-matcher.md
3086
+ */
3087
+ 'playwright/prefer-equality-matcher'?: Linter.RuleEntry<[]>
3088
+ /**
3089
+ * Prefer having hooks in a consistent order
3090
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-in-order.md
3091
+ */
3092
+ 'playwright/prefer-hooks-in-order'?: Linter.RuleEntry<[]>
3093
+ /**
3094
+ * Suggest having hooks before any test cases
3095
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-hooks-on-top.md
3096
+ */
3097
+ 'playwright/prefer-hooks-on-top'?: Linter.RuleEntry<[]>
3098
+ /**
3099
+ * Suggest locators over page methods
3100
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-locator.md
3101
+ */
3102
+ 'playwright/prefer-locator'?: Linter.RuleEntry<[]>
3019
3103
  /**
3020
3104
  * Enforce lowercase test names
3021
3105
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-lowercase-title.md
3022
3106
  */
3023
3107
  'playwright/prefer-lowercase-title'?: Linter.RuleEntry<PlaywrightPreferLowercaseTitle>
3108
+ /**
3109
+ * Prefer native locator functions
3110
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-native-locators.md
3111
+ */
3112
+ 'playwright/prefer-native-locators'?: Linter.RuleEntry<PlaywrightPreferNativeLocators>
3024
3113
  /**
3025
3114
  * Suggest using `toStrictEqual()`
3026
3115
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-strict-equal.md
@@ -3051,21 +3140,50 @@ interface RuleOptions {
3051
3140
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/prefer-web-first-assertions.md
3052
3141
  */
3053
3142
  'playwright/prefer-web-first-assertions'?: Linter.RuleEntry<[]>
3143
+ /**
3144
+ * Require setup and teardown code to be within a hook
3145
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-hook.md
3146
+ */
3147
+ 'playwright/require-hook'?: Linter.RuleEntry<PlaywrightRequireHook>
3054
3148
  /**
3055
3149
  * Require all assertions to use `expect.soft`
3056
3150
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-soft-assertions.md
3057
3151
  */
3058
3152
  'playwright/require-soft-assertions'?: Linter.RuleEntry<[]>
3153
+ /**
3154
+ * Require a message for `toThrow()`
3155
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-to-throw-message.md
3156
+ */
3157
+ 'playwright/require-to-throw-message'?: Linter.RuleEntry<[]>
3059
3158
  /**
3060
3159
  * Require test cases and hooks to be inside a `test.describe` block
3061
3160
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/require-top-level-describe.md
3062
3161
  */
3063
3162
  'playwright/require-top-level-describe'?: Linter.RuleEntry<PlaywrightRequireTopLevelDescribe>
3163
+ /**
3164
+ * Enforce valid `describe()` callback
3165
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-describe-callback.md
3166
+ */
3167
+ 'playwright/valid-describe-callback'?: Linter.RuleEntry<[]>
3064
3168
  /**
3065
3169
  * Enforce valid `expect()` usage
3066
3170
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-expect.md
3067
3171
  */
3068
3172
  'playwright/valid-expect'?: Linter.RuleEntry<PlaywrightValidExpect>
3173
+ /**
3174
+ * Require promises that have expectations in their chain to be valid
3175
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-expect-in-promise.md
3176
+ */
3177
+ 'playwright/valid-expect-in-promise'?: Linter.RuleEntry<[]>
3178
+ /**
3179
+ * Enforce valid tag format in Playwright test blocks
3180
+ */
3181
+ 'playwright/valid-test-tags'?: Linter.RuleEntry<PlaywrightValidTestTags>
3182
+ /**
3183
+ * Enforce valid titles
3184
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-title.md
3185
+ */
3186
+ 'playwright/valid-title'?: Linter.RuleEntry<PlaywrightValidTitle>
3069
3187
  /**
3070
3188
  * Require returning inside each `then()` to create readable and reusable Promise chains.
3071
3189
  * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/always-return.md
@@ -14771,7 +14889,11 @@ type PerfectionistSortVariableDeclarations = []|[{
14771
14889
  }]
14772
14890
  // ----- playwright/expect-expect -----
14773
14891
  type PlaywrightExpectExpect = []|[{
14774
- additionalAssertFunctionNames?: []|[string]
14892
+ assertFunctionNames?: []|[string]
14893
+ }]
14894
+ // ----- playwright/max-expects -----
14895
+ type PlaywrightMaxExpects = []|[{
14896
+ max?: number
14775
14897
  }]
14776
14898
  // ----- playwright/max-nested-describe -----
14777
14899
  type PlaywrightMaxNestedDescribe = []|[{
@@ -14781,6 +14903,14 @@ type PlaywrightMaxNestedDescribe = []|[{
14781
14903
  type PlaywrightMissingPlaywrightAwait = []|[{
14782
14904
  customMatchers?: string[]
14783
14905
  }]
14906
+ // ----- playwright/no-hooks -----
14907
+ type PlaywrightNoHooks = []|[{
14908
+ allow?: unknown[]
14909
+ }]
14910
+ // ----- playwright/no-raw-locators -----
14911
+ type PlaywrightNoRawLocators = []|[{
14912
+ allowed?: string[]
14913
+ }]
14784
14914
  // ----- playwright/no-restricted-matchers -----
14785
14915
  type PlaywrightNoRestrictedMatchers = []|[{
14786
14916
  [k: string]: (string | null) | undefined
@@ -14789,12 +14919,24 @@ type PlaywrightNoRestrictedMatchers = []|[{
14789
14919
  type PlaywrightNoSkippedTest = []|[{
14790
14920
  allowConditional?: boolean
14791
14921
  }]
14922
+ // ----- playwright/no-slowed-test -----
14923
+ type PlaywrightNoSlowedTest = []|[{
14924
+ allowConditional?: boolean
14925
+ }]
14792
14926
  // ----- playwright/prefer-lowercase-title -----
14793
14927
  type PlaywrightPreferLowercaseTitle = []|[{
14794
14928
  allowedPrefixes?: string[]
14795
14929
  ignore?: ("test.describe" | "test")[]
14796
14930
  ignoreTopLevelDescribe?: boolean
14797
14931
  }]
14932
+ // ----- playwright/prefer-native-locators -----
14933
+ type PlaywrightPreferNativeLocators = []|[{
14934
+ testIdAttribute?: string
14935
+ }]
14936
+ // ----- playwright/require-hook -----
14937
+ type PlaywrightRequireHook = []|[{
14938
+ allowedFunctionCalls?: string[]
14939
+ }]
14798
14940
  // ----- playwright/require-top-level-describe -----
14799
14941
  type PlaywrightRequireTopLevelDescribe = []|[{
14800
14942
  maxTopLevelDescribes?: number
@@ -14804,6 +14946,26 @@ type PlaywrightValidExpect = []|[{
14804
14946
  maxArgs?: number
14805
14947
  minArgs?: number
14806
14948
  }]
14949
+ // ----- playwright/valid-test-tags -----
14950
+ type PlaywrightValidTestTags = []|[{
14951
+ allowedTags?: (string | {
14952
+ source?: string
14953
+ })[]
14954
+ disallowedTags?: (string | {
14955
+ source?: string
14956
+ })[]
14957
+ }]
14958
+ // ----- playwright/valid-title -----
14959
+ type PlaywrightValidTitle = []|[{
14960
+ disallowedWords?: string[]
14961
+ ignoreSpaces?: boolean
14962
+ ignoreTypeOfDescribeName?: boolean
14963
+ ignoreTypeOfStepName?: boolean
14964
+ ignoreTypeOfTestName?: boolean
14965
+ [k: string]: (string | [string]|[string, string] | {
14966
+ [k: string]: (string | [string]|[string, string]) | undefined
14967
+ })
14968
+ }]
14807
14969
  // ----- promise/always-return -----
14808
14970
  type PromiseAlwaysReturn = []|[{
14809
14971
  ignoreLastCallback?: boolean