solidjs-community / eslint-plugin-solid

Solid-specific linting rules for ESLint.
MIT License
220 stars 27 forks source link

onDblClick is being transformed to onDoubleClick, which is invalid #46

Closed goenning closed 1 year ago

goenning commented 1 year ago

Describe the bug Whenever I try to use the onDblClick event on a button tag, the eslint-plugin transforms to onDoubleClick, which is in invalid event on a button.

To Reproduce My config:

module.exports = {
  env: {
    browser: true,
    es2021: true,
  },
  extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:solid/recommended", "prettier"],
  parser: "@typescript-eslint/parser",
  parserOptions: {
    ecmaVersion: "latest",
    sourceType: "module",
  },
  plugins: ["@typescript-eslint"],
  rules: {
    "@typescript-eslint/consistent-type-imports": "error",
  },
};
<button onDblClick={() => console.log("Hey")}>
Double Click me
</button>

Expected behavior

The onDblClick event should not be transformed, it's a valid name.

Screenshots

Screenshot 2022-11-27 at 06 34 58

Environment (please complete the following information):

Additional context

joshwilsonvu commented 1 year ago

Good catch—thanks so much for opening the issue! Fixed in v0.9.1.