Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v-on-handler-style with default ["method", "inline-function"] does not seem to work correctly #2571

Open
2 tasks done
chrisnruud opened this issue Oct 10, 2024 · 0 comments
Open
2 tasks done

Comments

@chrisnruud
Copy link

chrisnruud commented Oct 10, 2024

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 9.12.0
  • eslint-plugin-vue version: 9.28.0
  • Vue version: 3.5.11
  • Node version: 20.16.0
  • Operating System: Mac OSX 15.0.1

Please show your full configuration:

// eslint.config.mjs
import pluginVue from "eslint-plugin-vue";
import vueTsEslintConfig from "@vue/eslint-config-typescript";

export default [
  ...pluginVue.configs["flat/essential"],
  ...vueTsEslintConfig(),
  {
    rules: {
      'vue/v-on-handler-style': [ 'error',
        [ 'method', 'inline-function' ], // ["method", "inline-function"] | ["method", "inline"] | "inline-function" | "inline"
        {
          ignoreIncludesComment: false
        }
      ]
    }
  }
]

Output from npx eslint --print-config eslint.config.mjs:

{
  "linterOptions": {
    "reportUnusedDisableDirectives": 1
  },
  "rules": {
    "vue/multi-word-component-names": [
      2
    ],
    "vue/no-arrow-functions-in-watch": [
      2
    ],
    "vue/no-async-in-computed-properties": [
      2
    ],
    "vue/no-child-content": [
      2
    ],
    "vue/no-computed-properties-in-data": [
      2
    ],
    "vue/no-deprecated-data-object-declaration": [
      2
    ],
    "vue/no-deprecated-destroyed-lifecycle": [
      2
    ],
    "vue/no-deprecated-dollar-listeners-api": [
      2
    ],
    "vue/no-deprecated-dollar-scopedslots-api": [
      2
    ],
    "vue/no-deprecated-events-api": [
      2
    ],
    "vue/no-deprecated-filter": [
      2
    ],
    "vue/no-deprecated-functional-template": [
      2
    ],
    "vue/no-deprecated-html-element-is": [
      2
    ],
    "vue/no-deprecated-inline-template": [
      2
    ],
    "vue/no-deprecated-props-default-this": [
      2
    ],
    "vue/no-deprecated-router-link-tag-prop": [
      2
    ],
    "vue/no-deprecated-scope-attribute": [
      2
    ],
    "vue/no-deprecated-slot-attribute": [
      2
    ],
    "vue/no-deprecated-slot-scope-attribute": [
      2
    ],
    "vue/no-deprecated-v-bind-sync": [
      2
    ],
    "vue/no-deprecated-v-is": [
      2
    ],
    "vue/no-deprecated-v-on-native-modifier": [
      2
    ],
    "vue/no-deprecated-v-on-number-modifiers": [
      2
    ],
    "vue/no-deprecated-vue-config-keycodes": [
      2
    ],
    "vue/no-dupe-keys": [
      2
    ],
    "vue/no-dupe-v-else-if": [
      2
    ],
    "vue/no-duplicate-attributes": [
      2
    ],
    "vue/no-export-in-script-setup": [
      2
    ],
    "vue/no-expose-after-await": [
      2
    ],
    "vue/no-lifecycle-after-await": [
      2
    ],
    "vue/no-mutating-props": [
      2
    ],
    "vue/no-parsing-error": [
      2
    ],
    "vue/no-ref-as-operand": [
      2
    ],
    "vue/no-reserved-component-names": [
      2
    ],
    "vue/no-reserved-keys": [
      2
    ],
    "vue/no-reserved-props": [
      2
    ],
    "vue/no-shared-component-data": [
      2
    ],
    "vue/no-side-effects-in-computed-properties": [
      2
    ],
    "vue/no-template-key": [
      2
    ],
    "vue/no-textarea-mustache": [
      2
    ],
    "vue/no-unused-components": [
      2
    ],
    "vue/no-unused-vars": [
      2
    ],
    "vue/no-use-computed-property-like-method": [
      2
    ],
    "vue/no-use-v-if-with-v-for": [
      2
    ],
    "vue/no-useless-template-attributes": [
      2
    ],
    "vue/no-v-for-template-key-on-child": [
      2
    ],
    "vue/no-v-text-v-html-on-component": [
      2
    ],
    "vue/no-watch-after-await": [
      2
    ],
    "vue/prefer-import-from-vue": [
      2
    ],
    "vue/require-component-is": [
      2
    ],
    "vue/require-prop-type-constructor": [
      2
    ],
    "vue/require-render-return": [
      2
    ],
    "vue/require-slots-as-functions": [
      2
    ],
    "vue/require-toggle-inside-transition": [
      2
    ],
    "vue/require-v-for-key": [
      2
    ],
    "vue/require-valid-default-prop": [
      2
    ],
    "vue/return-in-computed-property": [
      2
    ],
    "vue/return-in-emits-validator": [
      2
    ],
    "vue/use-v-on-exact": [
      2
    ],
    "vue/valid-attribute-name": [
      2
    ],
    "vue/valid-define-emits": [
      2
    ],
    "vue/valid-define-props": [
      2
    ],
    "vue/valid-next-tick": [
      2
    ],
    "vue/valid-template-root": [
      2
    ],
    "vue/valid-v-bind": [
      2
    ],
    "vue/valid-v-cloak": [
      2
    ],
    "vue/valid-v-else-if": [
      2
    ],
    "vue/valid-v-else": [
      2
    ],
    "vue/valid-v-for": [
      2
    ],
    "vue/valid-v-html": [
      2
    ],
    "vue/valid-v-if": [
      2
    ],
    "vue/valid-v-is": [
      2
    ],
    "vue/valid-v-memo": [
      2
    ],
    "vue/valid-v-model": [
      2
    ],
    "vue/valid-v-on": [
      2
    ],
    "vue/valid-v-once": [
      2
    ],
    "vue/valid-v-pre": [
      2
    ],
    "vue/valid-v-show": [
      2
    ],
    "vue/valid-v-slot": [
      2
    ],
    "vue/valid-v-text": [
      2
    ],
    "@typescript-eslint/ban-ts-comment": [
      2
    ],
    "no-array-constructor": [
      0
    ],
    "@typescript-eslint/no-array-constructor": [
      2
    ],
    "@typescript-eslint/no-duplicate-enum-values": [
      2
    ],
    "@typescript-eslint/no-empty-object-type": [
      2
    ],
    "@typescript-eslint/no-explicit-any": [
      2
    ],
    "@typescript-eslint/no-extra-non-null-assertion": [
      2
    ],
    "@typescript-eslint/no-misused-new": [
      2
    ],
    "@typescript-eslint/no-namespace": [
      2
    ],
    "@typescript-eslint/no-non-null-asserted-optional-chain": [
      2
    ],
    "@typescript-eslint/no-require-imports": [
      2
    ],
    "@typescript-eslint/no-this-alias": [
      2
    ],
    "@typescript-eslint/no-unnecessary-type-constraint": [
      2
    ],
    "@typescript-eslint/no-unsafe-declaration-merging": [
      2
    ],
    "@typescript-eslint/no-unsafe-function-type": [
      2
    ],
    "no-unused-expressions": [
      0
    ],
    "@typescript-eslint/no-unused-expressions": [
      2
    ],
    "no-unused-vars": [
      0
    ],
    "@typescript-eslint/no-unused-vars": [
      2
    ],
    "@typescript-eslint/no-wrapper-object-types": [
      2
    ],
    "@typescript-eslint/prefer-as-const": [
      2
    ],
    "@typescript-eslint/prefer-namespace-keyword": [
      2
    ],
    "@typescript-eslint/triple-slash-reference": [
      2
    ],
    "vue/v-on-handler-style": [
      2,
      [
        "method",
        "inline-function"
      ],
      {
        "ignoreIncludesComment": false
      }
    ]
  },
  "plugins": [
    "@",
    "vue:[email protected]",
    "@typescript-eslint:@typescript-eslint/[email protected]"
  ],
  "language": "@/js",
  "languageOptions": {
    "sourceType": "module",
    "ecmaVersion": "latest",
    "parser": "typescript-eslint/[email protected]",
    "parserOptions": {},
    "globals": {
      "AbortController": false,
      "AbortSignal": false,
      "addEventListener": false,
      "alert": false,
      "AnalyserNode": false,
      "Animation": false,
      "AnimationEffectReadOnly": false,
      "AnimationEffectTiming": false,
      "AnimationEffectTimingReadOnly": false,
      "AnimationEvent": false,
      "AnimationPlaybackEvent": false,
      "AnimationTimeline": false,
      "applicationCache": false,
      "ApplicationCache": false,
      "ApplicationCacheErrorEvent": false,
      "atob": false,
      "Attr": false,
      "Audio": false,
      "AudioBuffer": false,
      "AudioBufferSourceNode": false,
      "AudioContext": false,
      "AudioDestinationNode": false,
      "AudioListener": false,
      "AudioNode": false,
      "AudioParam": false,
      "AudioProcessingEvent": false,
      "AudioScheduledSourceNode": false,
      "AudioWorkletGlobalScope": false,
      "AudioWorkletNode": false,
      "AudioWorkletProcessor": false,
      "BarProp": false,
      "BaseAudioContext": false,
      "BatteryManager": false,
      "BeforeUnloadEvent": false,
      "BiquadFilterNode": false,
      "Blob": false,
      "BlobEvent": false,
      "blur": false,
      "BroadcastChannel": false,
      "btoa": false,
      "BudgetService": false,
      "ByteLengthQueuingStrategy": false,
      "Cache": false,
      "caches": false,
      "CacheStorage": false,
      "cancelAnimationFrame": false,
      "cancelIdleCallback": false,
      "CanvasCaptureMediaStreamTrack": false,
      "CanvasGradient": false,
      "CanvasPattern": false,
      "CanvasRenderingContext2D": false,
      "ChannelMergerNode": false,
      "ChannelSplitterNode": false,
      "CharacterData": false,
      "clearInterval": false,
      "clearTimeout": false,
      "clientInformation": false,
      "ClipboardEvent": false,
      "ClipboardItem": false,
      "close": false,
      "closed": false,
      "CloseEvent": false,
      "Comment": false,
      "CompositionEvent": false,
      "CompressionStream": false,
      "confirm": false,
      "console": false,
      "ConstantSourceNode": false,
      "ConvolverNode": false,
      "CountQueuingStrategy": false,
      "createImageBitmap": false,
      "Credential": false,
      "CredentialsContainer": false,
      "crypto": false,
      "Crypto": false,
      "CryptoKey": false,
      "CSS": false,
      "CSSConditionRule": false,
      "CSSFontFaceRule": false,
      "CSSGroupingRule": false,
      "CSSImportRule": false,
      "CSSKeyframeRule": false,
      "CSSKeyframesRule": false,
      "CSSMatrixComponent": false,
      "CSSMediaRule": false,
      "CSSNamespaceRule": false,
      "CSSPageRule": false,
      "CSSPerspective": false,
      "CSSRotate": false,
      "CSSRule": false,
      "CSSRuleList": false,
      "CSSScale": false,
      "CSSSkew": false,
      "CSSSkewX": false,
      "CSSSkewY": false,
      "CSSStyleDeclaration": false,
      "CSSStyleRule": false,
      "CSSStyleSheet": false,
      "CSSSupportsRule": false,
      "CSSTransformValue": false,
      "CSSTranslate": false,
      "CustomElementRegistry": false,
      "customElements": false,
      "CustomEvent": false,
      "DataTransfer": false,
      "DataTransferItem": false,
      "DataTransferItemList": false,
      "DecompressionStream": false,
      "defaultstatus": false,
      "defaultStatus": false,
      "DelayNode": false,
      "DeviceMotionEvent": false,
      "DeviceOrientationEvent": false,
      "devicePixelRatio": false,
      "dispatchEvent": false,
      "document": false,
      "Document": false,
      "DocumentFragment": false,
      "DocumentType": false,
      "DOMError": false,
      "DOMException": false,
      "DOMImplementation": false,
      "DOMMatrix": false,
      "DOMMatrixReadOnly": false,
      "DOMParser": false,
      "DOMPoint": false,
      "DOMPointReadOnly": false,
      "DOMQuad": false,
      "DOMRect": false,
      "DOMRectList": false,
      "DOMRectReadOnly": false,
      "DOMStringList": false,
      "DOMStringMap": false,
      "DOMTokenList": false,
      "DragEvent": false,
      "DynamicsCompressorNode": false,
      "Element": false,
      "ErrorEvent": false,
      "event": false,
      "Event": false,
      "EventSource": false,
      "EventTarget": false,
      "external": false,
      "fetch": false,
      "File": false,
      "FileList": false,
      "FileReader": false,
      "find": false,
      "focus": false,
      "FocusEvent": false,
      "FontFace": false,
      "FontFaceSetLoadEvent": false,
      "FormData": false,
      "FormDataEvent": false,
      "frameElement": false,
      "frames": false,
      "GainNode": false,
      "Gamepad": false,
      "GamepadButton": false,
      "GamepadEvent": false,
      "getComputedStyle": false,
      "getSelection": false,
      "HashChangeEvent": false,
      "Headers": false,
      "history": false,
      "History": false,
      "HTMLAllCollection": false,
      "HTMLAnchorElement": false,
      "HTMLAreaElement": false,
      "HTMLAudioElement": false,
      "HTMLBaseElement": false,
      "HTMLBodyElement": false,
      "HTMLBRElement": false,
      "HTMLButtonElement": false,
      "HTMLCanvasElement": false,
      "HTMLCollection": false,
      "HTMLContentElement": false,
      "HTMLDataElement": false,
      "HTMLDataListElement": false,
      "HTMLDetailsElement": false,
      "HTMLDialogElement": false,
      "HTMLDirectoryElement": false,
      "HTMLDivElement": false,
      "HTMLDListElement": false,
      "HTMLDocument": false,
      "HTMLElement": false,
      "HTMLEmbedElement": false,
      "HTMLFieldSetElement": false,
      "HTMLFontElement": false,
      "HTMLFormControlsCollection": false,
      "HTMLFormElement": false,
      "HTMLFrameElement": false,
      "HTMLFrameSetElement": false,
      "HTMLHeadElement": false,
      "HTMLHeadingElement": false,
      "HTMLHRElement": false,
      "HTMLHtmlElement": false,
      "HTMLIFrameElement": false,
      "HTMLImageElement": false,
      "HTMLInputElement": false,
      "HTMLLabelElement": false,
      "HTMLLegendElement": false,
      "HTMLLIElement": false,
      "HTMLLinkElement": false,
      "HTMLMapElement": false,
      "HTMLMarqueeElement": false,
      "HTMLMediaElement": false,
      "HTMLMenuElement": false,
      "HTMLMetaElement": false,
      "HTMLMeterElement": false,
      "HTMLModElement": false,
      "HTMLObjectElement": false,
      "HTMLOListElement": false,
      "HTMLOptGroupElement": false,
      "HTMLOptionElement": false,
      "HTMLOptionsCollection": false,
      "HTMLOutputElement": false,
      "HTMLParagraphElement": false,
      "HTMLParamElement": false,
      "HTMLPictureElement": false,
      "HTMLPreElement": false,
      "HTMLProgressElement": false,
      "HTMLQuoteElement": false,
      "HTMLScriptElement": false,
      "HTMLSelectElement": false,
      "HTMLShadowElement": false,
      "HTMLSlotElement": false,
      "HTMLSourceElement": false,
      "HTMLSpanElement": false,
      "HTMLStyleElement": false,
      "HTMLTableCaptionElement": false,
      "HTMLTableCellElement": false,
      "HTMLTableColElement": false,
      "HTMLTableElement": false,
      "HTMLTableRowElement": false,
      "HTMLTableSectionElement": false,
      "HTMLTemplateElement": false,
      "HTMLTextAreaElement": false,
      "HTMLTimeElement": false,
      "HTMLTitleElement": false,
      "HTMLTrackElement": false,
      "HTMLUListElement": false,
      "HTMLUnknownElement": false,
      "HTMLVideoElement": false,
      "IDBCursor": false,
      "IDBCursorWithValue": false,
      "IDBDatabase": false,
      "IDBFactory": false,
      "IDBIndex": false,
      "IDBKeyRange": false,
      "IDBObjectStore": false,
      "IDBOpenDBRequest": false,
      "IDBRequest": false,
      "IDBTransaction": false,
      "IDBVersionChangeEvent": false,
      "IdleDeadline": false,
      "IIRFilterNode": false,
      "Image": false,
      "ImageBitmap": false,
      "ImageBitmapRenderingContext": false,
      "ImageCapture": false,
      "ImageData": false,
      "indexedDB": false,
      "innerHeight": false,
      "innerWidth": false,
      "InputEvent": false,
      "IntersectionObserver": false,
      "IntersectionObserverEntry": false,
      "Intl": false,
      "isSecureContext": false,
      "KeyboardEvent": false,
      "KeyframeEffect": false,
      "KeyframeEffectReadOnly": false,
      "length": false,
      "localStorage": false,
      "location": true,
      "Location": false,
      "locationbar": false,
      "matchMedia": false,
      "MediaDeviceInfo": false,
      "MediaDevices": false,
      "MediaElementAudioSourceNode": false,
      "MediaEncryptedEvent": false,
      "MediaError": false,
      "MediaKeyMessageEvent": false,
      "MediaKeySession": false,
      "MediaKeyStatusMap": false,
      "MediaKeySystemAccess": false,
      "MediaList": false,
      "MediaMetadata": false,
      "MediaQueryList": false,
      "MediaQueryListEvent": false,
      "MediaRecorder": false,
      "MediaSettingsRange": false,
      "MediaSource": false,
      "MediaStream": false,
      "MediaStreamAudioDestinationNode": false,
      "MediaStreamAudioSourceNode": false,
      "MediaStreamConstraints": false,
      "MediaStreamEvent": false,
      "MediaStreamTrack": false,
      "MediaStreamTrackEvent": false,
      "menubar": false,
      "MessageChannel": false,
      "MessageEvent": false,
      "MessagePort": false,
      "MIDIAccess": false,
      "MIDIConnectionEvent": false,
      "MIDIInput": false,
      "MIDIInputMap": false,
      "MIDIMessageEvent": false,
      "MIDIOutput": false,
      "MIDIOutputMap": false,
      "MIDIPort": false,
      "MimeType": false,
      "MimeTypeArray": false,
      "MouseEvent": false,
      "moveBy": false,
      "moveTo": false,
      "MutationEvent": false,
      "MutationObserver": false,
      "MutationRecord": false,
      "name": false,
      "NamedNodeMap": false,
      "NavigationPreloadManager": false,
      "navigator": false,
      "Navigator": false,
      "NavigatorUAData": false,
      "NetworkInformation": false,
      "Node": false,
      "NodeFilter": false,
      "NodeIterator": false,
      "NodeList": false,
      "Notification": false,
      "OfflineAudioCompletionEvent": false,
      "OfflineAudioContext": false,
      "offscreenBuffering": false,
      "OffscreenCanvas": true,
      "OffscreenCanvasRenderingContext2D": false,
      "onabort": true,
      "onafterprint": true,
      "onanimationend": true,
      "onanimationiteration": true,
      "onanimationstart": true,
      "onappinstalled": true,
      "onauxclick": true,
      "onbeforeinstallprompt": true,
      "onbeforeprint": true,
      "onbeforeunload": true,
      "onblur": true,
      "oncancel": true,
      "oncanplay": true,
      "oncanplaythrough": true,
      "onchange": true,
      "onclick": true,
      "onclose": true,
      "oncontextmenu": true,
      "oncuechange": true,
      "ondblclick": true,
      "ondevicemotion": true,
      "ondeviceorientation": true,
      "ondeviceorientationabsolute": true,
      "ondrag": true,
      "ondragend": true,
      "ondragenter": true,
      "ondragleave": true,
      "ondragover": true,
      "ondragstart": true,
      "ondrop": true,
      "ondurationchange": true,
      "onemptied": true,
      "onended": true,
      "onerror": true,
      "onfocus": true,
      "ongotpointercapture": true,
      "onhashchange": true,
      "oninput": true,
      "oninvalid": true,
      "onkeydown": true,
      "onkeypress": true,
      "onkeyup": true,
      "onlanguagechange": true,
      "onload": true,
      "onloadeddata": true,
      "onloadedmetadata": true,
      "onloadstart": true,
      "onlostpointercapture": true,
      "onmessage": true,
      "onmessageerror": true,
      "onmousedown": true,
      "onmouseenter": true,
      "onmouseleave": true,
      "onmousemove": true,
      "onmouseout": true,
      "onmouseover": true,
      "onmouseup": true,
      "onmousewheel": true,
      "onoffline": true,
      "ononline": true,
      "onpagehide": true,
      "onpageshow": true,
      "onpause": true,
      "onplay": true,
      "onplaying": true,
      "onpointercancel": true,
      "onpointerdown": true,
      "onpointerenter": true,
      "onpointerleave": true,
      "onpointermove": true,
      "onpointerout": true,
      "onpointerover": true,
      "onpointerup": true,
      "onpopstate": true,
      "onprogress": true,
      "onratechange": true,
      "onrejectionhandled": true,
      "onreset": true,
      "onresize": true,
      "onscroll": true,
      "onsearch": true,
      "onseeked": true,
      "onseeking": true,
      "onselect": true,
      "onstalled": true,
      "onstorage": true,
      "onsubmit": true,
      "onsuspend": true,
      "ontimeupdate": true,
      "ontoggle": true,
      "ontransitionend": true,
      "onunhandledrejection": true,
      "onunload": true,
      "onvolumechange": true,
      "onwaiting": true,
      "onwheel": true,
      "open": false,
      "openDatabase": false,
      "opener": false,
      "Option": false,
      "origin": false,
      "OscillatorNode": false,
      "outerHeight": false,
      "outerWidth": false,
      "OverconstrainedError": false,
      "PageTransitionEvent": false,
      "pageXOffset": false,
      "pageYOffset": false,
      "PannerNode": false,
      "parent": false,
      "Path2D": false,
      "PaymentAddress": false,
      "PaymentRequest": false,
      "PaymentRequestUpdateEvent": false,
      "PaymentResponse": false,
      "performance": false,
      "Performance": false,
      "PerformanceEntry": false,
      "PerformanceLongTaskTiming": false,
      "PerformanceMark": false,
      "PerformanceMeasure": false,
      "PerformanceNavigation": false,
      "PerformanceNavigationTiming": false,
      "PerformanceObserver": false,
      "PerformanceObserverEntryList": false,
      "PerformancePaintTiming": false,
      "PerformanceResourceTiming": false,
      "PerformanceTiming": false,
      "PeriodicWave": false,
      "Permissions": false,
      "PermissionStatus": false,
      "personalbar": false,
      "PhotoCapabilities": false,
      "Plugin": false,
      "PluginArray": false,
      "PointerEvent": false,
      "PopStateEvent": false,
      "postMessage": false,
      "Presentation": false,
      "PresentationAvailability": false,
      "PresentationConnection": false,
      "PresentationConnectionAvailableEvent": false,
      "PresentationConnectionCloseEvent": false,
      "PresentationConnectionList": false,
      "PresentationReceiver": false,
      "PresentationRequest": false,
      "print": false,
      "ProcessingInstruction": false,
      "ProgressEvent": false,
      "PromiseRejectionEvent": false,
      "prompt": false,
      "PushManager": false,
      "PushSubscription": false,
      "PushSubscriptionOptions": false,
      "queueMicrotask": false,
      "RadioNodeList": false,
      "Range": false,
      "ReadableByteStreamController": false,
      "ReadableStream": false,
      "ReadableStreamBYOBReader": false,
      "ReadableStreamBYOBRequest": false,
      "ReadableStreamDefaultController": false,
      "ReadableStreamDefaultReader": false,
      "registerProcessor": false,
      "RemotePlayback": false,
      "removeEventListener": false,
      "reportError": false,
      "Request": false,
      "requestAnimationFrame": false,
      "requestIdleCallback": false,
      "resizeBy": false,
      "ResizeObserver": false,
      "ResizeObserverEntry": false,
      "resizeTo": false,
      "Response": false,
      "RTCCertificate": false,
      "RTCDataChannel": false,
      "RTCDataChannelEvent": false,
      "RTCDtlsTransport": false,
      "RTCIceCandidate": false,
      "RTCIceGatherer": false,
      "RTCIceTransport": false,
      "RTCPeerConnection": false,
      "RTCPeerConnectionIceEvent": false,
      "RTCRtpContributingSource": false,
      "RTCRtpReceiver": false,
      "RTCRtpSender": false,
      "RTCSctpTransport": false,
      "RTCSessionDescription": false,
      "RTCStatsReport": false,
      "RTCTrackEvent": false,
      "screen": false,
      "Screen": false,
      "screenLeft": false,
      "ScreenOrientation": false,
      "screenTop": false,
      "screenX": false,
      "screenY": false,
      "ScriptProcessorNode": false,
      "scroll": false,
      "scrollbars": false,
      "scrollBy": false,
      "scrollTo": false,
      "scrollX": false,
      "scrollY": false,
      "SecurityPolicyViolationEvent": false,
      "Selection": false,
      "self": false,
      "ServiceWorker": false,
      "ServiceWorkerContainer": false,
      "ServiceWorkerRegistration": false,
      "sessionStorage": false,
      "setInterval": false,
      "setTimeout": false,
      "ShadowRoot": false,
      "SharedWorker": false,
      "SourceBuffer": false,
      "SourceBufferList": false,
      "speechSynthesis": false,
      "SpeechSynthesisEvent": false,
      "SpeechSynthesisUtterance": false,
      "StaticRange": false,
      "status": false,
      "statusbar": false,
      "StereoPannerNode": false,
      "stop": false,
      "Storage": false,
      "StorageEvent": false,
      "StorageManager": false,
      "structuredClone": false,
      "styleMedia": false,
      "StyleSheet": false,
      "StyleSheetList": false,
      "SubmitEvent": false,
      "SubtleCrypto": false,
      "SVGAElement": false,
      "SVGAngle": false,
      "SVGAnimatedAngle": false,
      "SVGAnimatedBoolean": false,
      "SVGAnimatedEnumeration": false,
      "SVGAnimatedInteger": false,
      "SVGAnimatedLength": false,
      "SVGAnimatedLengthList": false,
      "SVGAnimatedNumber": false,
      "SVGAnimatedNumberList": false,
      "SVGAnimatedPreserveAspectRatio": false,
      "SVGAnimatedRect": false,
      "SVGAnimatedString": false,
      "SVGAnimatedTransformList": false,
      "SVGAnimateElement": false,
      "SVGAnimateMotionElement": false,
      "SVGAnimateTransformElement": false,
      "SVGAnimationElement": false,
      "SVGCircleElement": false,
      "SVGClipPathElement": false,
      "SVGComponentTransferFunctionElement": false,
      "SVGDefsElement": false,
      "SVGDescElement": false,
      "SVGDiscardElement": false,
      "SVGElement": false,
      "SVGEllipseElement": false,
      "SVGFEBlendElement": false,
      "SVGFEColorMatrixElement": false,
      "SVGFEComponentTransferElement": false,
      "SVGFECompositeElement": false,
      "SVGFEConvolveMatrixElement": false,
      "SVGFEDiffuseLightingElement": false,
      "SVGFEDisplacementMapElement": false,
      "SVGFEDistantLightElement": false,
      "SVGFEDropShadowElement": false,
      "SVGFEFloodElement": false,
      "SVGFEFuncAElement": false,
      "SVGFEFuncBElement": false,
      "SVGFEFuncGElement": false,
      "SVGFEFuncRElement": false,
      "SVGFEGaussianBlurElement": false,
      "SVGFEImageElement": false,
      "SVGFEMergeElement": false,
      "SVGFEMergeNodeElement": false,
      "SVGFEMorphologyElement": false,
      "SVGFEOffsetElement": false,
      "SVGFEPointLightElement": false,
      "SVGFESpecularLightingElement": false,
      "SVGFESpotLightElement": false,
      "SVGFETileElement": false,
      "SVGFETurbulenceElement": false,
      "SVGFilterElement": false,
      "SVGForeignObjectElement": false,
      "SVGGElement": false,
      "SVGGeometryElement": false,
      "SVGGradientElement": false,
      "SVGGraphicsElement": false,
      "SVGImageElement": false,
      "SVGLength": false,
      "SVGLengthList": false,
      "SVGLinearGradientElement": false,
      "SVGLineElement": false,
      "SVGMarkerElement": false,
      "SVGMaskElement": false,
      "SVGMatrix": false,
      "SVGMetadataElement": false,
      "SVGMPathElement": false,
      "SVGNumber": false,
      "SVGNumberList": false,
      "SVGPathElement": false,
      "SVGPatternElement": false,
      "SVGPoint": false,
      "SVGPointList": false,
      "SVGPolygonElement": false,
      "SVGPolylineElement": false,
      "SVGPreserveAspectRatio": false,
      "SVGRadialGradientElement": false,
      "SVGRect": false,
      "SVGRectElement": false,
      "SVGScriptElement": false,
      "SVGSetElement": false,
      "SVGStopElement": false,
      "SVGStringList": false,
      "SVGStyleElement": false,
      "SVGSVGElement": false,
      "SVGSwitchElement": false,
      "SVGSymbolElement": false,
      "SVGTextContentElement": false,
      "SVGTextElement": false,
      "SVGTextPathElement": false,
      "SVGTextPositioningElement": false,
      "SVGTitleElement": false,
      "SVGTransform": false,
      "SVGTransformList": false,
      "SVGTSpanElement": false,
      "SVGUnitTypes": false,
      "SVGUseElement": false,
      "SVGViewElement": false,
      "TaskAttributionTiming": false,
      "Text": false,
      "TextDecoder": false,
      "TextDecoderStream": false,
      "TextEncoder": false,
      "TextEncoderStream": false,
      "TextEvent": false,
      "TextMetrics": false,
      "TextTrack": false,
      "TextTrackCue": false,
      "TextTrackCueList": false,
      "TextTrackList": false,
      "TimeRanges": false,
      "ToggleEvent": false,
      "toolbar": false,
      "top": false,
      "Touch": false,
      "TouchEvent": false,
      "TouchList": false,
      "TrackEvent": false,
      "TransformStream": false,
      "TransformStreamDefaultController": false,
      "TransitionEvent": false,
      "TreeWalker": false,
      "UIEvent": false,
      "URL": false,
      "URLSearchParams": false,
      "ValidityState": false,
      "visualViewport": false,
      "VisualViewport": false,
      "VTTCue": false,
      "WaveShaperNode": false,
      "WebAssembly": false,
      "WebGL2RenderingContext": false,
      "WebGLActiveInfo": false,
      "WebGLBuffer": false,
      "WebGLContextEvent": false,
      "WebGLFramebuffer": false,
      "WebGLProgram": false,
      "WebGLQuery": false,
      "WebGLRenderbuffer": false,
      "WebGLRenderingContext": false,
      "WebGLSampler": false,
      "WebGLShader": false,
      "WebGLShaderPrecisionFormat": false,
      "WebGLSync": false,
      "WebGLTexture": false,
      "WebGLTransformFeedback": false,
      "WebGLUniformLocation": false,
      "WebGLVertexArrayObject": false,
      "WebSocket": false,
      "WheelEvent": false,
      "window": false,
      "Window": false,
      "Worker": false,
      "WritableStream": false,
      "WritableStreamDefaultController": false,
      "WritableStreamDefaultWriter": false,
      "XMLDocument": false,
      "XMLHttpRequest": false,
      "XMLHttpRequestEventTarget": false,
      "XMLHttpRequestUpload": false,
      "XMLSerializer": false,
      "XPathEvaluator": false,
      "XPathExpression": false,
      "XPathResult": false,
      "XRAnchor": false,
      "XRBoundedReferenceSpace": false,
      "XRCPUDepthInformation": false,
      "XRDepthInformation": false,
      "XRFrame": false,
      "XRInputSource": false,
      "XRInputSourceArray": false,
      "XRInputSourceEvent": false,
      "XRInputSourcesChangeEvent": false,
      "XRPose": false,
      "XRReferenceSpace": false,
      "XRReferenceSpaceEvent": false,
      "XRRenderState": false,
      "XRRigidTransform": false,
      "XRSession": false,
      "XRSessionEvent": false,
      "XRSpace": false,
      "XRSystem": false,
      "XRView": false,
      "XRViewerPose": false,
      "XRViewport": false,
      "XRWebGLBinding": false,
      "XRWebGLDepthInformation": false,
      "XRWebGLLayer": false,
      "XSLTProcessor": false
    }
  }
}

What did you do?

<script setup lang="ts">

// this is called from other parts in the code with parameters
function myHandler (
  a?: string,
  b?: string,
  c?: string
) {
  // business logic here
  console.log(a, b, c)
}

// this is called from another part of the template
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function myBusinessLogic () {
  myHandler('a', 'b', 'c')
}

</script>

<template>
  <!-- this looks like the documentation
   ✓ GOOD
  <button v-on:click="handler" />
  <template v-for="e in list">
    <button v-on:click="e" />
    <button v-on:click="() => handler(e)" />
  </template>
  -->
  <button
    @click="() => myHandler(undefined, undefined, undefined)"
  />
</template>

What did you expect to happen?
The documentation for ["method", "inline-function"] seems to allow handlers of type @click="() => myHandler(parameter)" but in this case it doesnt seem that this is resprected correctly

What actually happened?

~/repositories/eslint9test
npx eslint src/App.vue

/Users/aurora/eslint9test/src/App.vue
  31:13  error  Prefer method handler over inline function in v-on  vue/v-on-handler-style

✖ 1 problem (1 error, 0 warnings)

Repository to reproduce this issue

https://github.com/chrisnruud/eslint9test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant