Skip to content

Enable the autofix of vue/v-on-event-hyphenation in vue/vue3-recommended #2065

Closed
@saschanaz

Description

@saschanaz

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: 8.30.0
  • eslint-plugin-vue version: 9.8.0
  • Node version: 19.2.0
  • Operating System: Windows 11

Please show your full configuration:

module.exports = {
	root: true,
	env: {
		'node': false,
	},
	parser: 'vue-eslint-parser',
	parserOptions: {
		'parser': '@typescript-eslint/parser',
		tsconfigRootDir: __dirname,
		project: ['./tsconfig.json'],
		extraFileExtensions: ['.vue'],
	},
	extends: [
		'../shared/.eslintrc.js',
		'plugin:vue/vue3-recommended',
	],
	rules: {
		'@typescript-eslint/no-empty-interface': [
			'error',
			{
				'allowSingleExtends': true,
			},
		],
		'@typescript-eslint/prefer-nullish-coalescing': [
			'error',
		],
		// window の禁止理由: グローバルスコープと衝突し、予期せぬ結果を招くため
		// e の禁止理由: error や event など、複数のキーワードの頭文字であり分かりにくいため
		'id-denylist': ['error', 'window', 'e'],
		'no-shadow': ['warn'],
		'vue/attributes-order': ['error', {
			'alphabetical': false,
		}],
		'vue/no-use-v-if-with-v-for': ['error', {
			'allowUsingIterationVar': false,
		}],
		'vue/no-ref-as-operand': 'error',
		'vue/no-multi-spaces': ['error', {
			'ignoreProperties': false,
		}],
		'vue/no-v-html': 'warn',
		'vue/order-in-components': 'error',
		'vue/html-indent': ['warn', 'tab', {
			'attribute': 1,
			'baseIndent': 0,
			'closeBracket': 0,
			'alignAttributesVertically': true,
			'ignores': [],
		}],
		'vue/html-closing-bracket-spacing': ['warn', {
			'startTag': 'never',
			'endTag': 'never',
			'selfClosingTag': 'never',
		}],
		'vue/multi-word-component-names': 'warn',
		'vue/require-v-for-key': 'warn',
		'vue/no-unused-components': 'warn',
		'vue/valid-v-for': 'warn',
		'vue/return-in-computed-property': 'warn',
		'vue/no-setup-props-destructure': 'warn',
		'vue/max-attributes-per-line': 'off',
		'vue/html-self-closing': 'off',
		'vue/singleline-html-element-content-newline': 'off',
	},
	globals: {
		// Node.js
		'module': false,
		'require': false,
		'__dirname': false,

		// Vue
		'$$': false,
		'$ref': false,
		'$shallowRef': false,
		'$computed': false,

		// Misskey
		'_DEV_': false,
		'_LANGS_': false,
		'_VERSION_': false,
		'_ENV_': false,
		'_PERF_PREFIX_': false,
		'_DATA_TRANSFER_DRIVE_FILE_': false,
		'_DATA_TRANSFER_DRIVE_FOLDER_': false,
		'_DATA_TRANSFER_DECK_COLUMN_': false,
	},
};

What did you do?

<FormSwitch v-model="$i.injectFeaturedNote" class="_formBlock" @update:model-value="onChangeInjectFeaturedNote">

What did you expect to happen?

An autofixable warning

What actually happened?

Non-autofixable warning

Repository to reproduce this issue

https://github.com/misskey-dev/misskey/tree/f1fd1d2585bd5230caea4c7b8814c2cf007e57cc

Docs imply the autofix is disabled by default for Vue 2 compatibility, but vue/vue3-recommended has no reason to keep it disabled as it's for Vue 3.

https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/configs/vue3-strongly-recommended.js is autogenerated with no options, it should somehow pass an option.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions