diff --git a/package.json b/package.json index 51a2031..60376d5 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "engines": { "node": ">=14" }, - "version": "2.0.1", + "version": "3.0.0", "description": "ESLint configuration rules.", "main": "index.js", "repository": "git@github.com:lapras-inc/frontend-config.git", @@ -13,8 +13,8 @@ "author": "Lapras Inc.", "license": "MIT", "peerDependencies": { - "eslint": ">= 6", - "eslint-plugin-vue": ">= 7", + "eslint": ">= 7", + "eslint-plugin-vue": ">= 9", "@typescript-eslint/eslint-plugin": ">= 3", "@typescript-eslint/parser": ">= 3", "@vue/eslint-config-prettier": ">= 6", diff --git a/vue3.js b/vue3.js new file mode 100644 index 0000000..fe77386 --- /dev/null +++ b/vue3.js @@ -0,0 +1,28 @@ +module.exports = { + extends: [ + 'plugin:vue/vue3-essential', + '@vue/typescript/recommended', + '@vue/prettier', + ], + rules: { + '@typescript-eslint/member-delimiter-style': ['error', { + multiline: { + delimiter: 'none', + }, + }], + '@typescript-eslint/explicit-module-boundary-types': 'off', + // TS側でoverrideしているため、元ルールはOFFにする必要がある + // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-shadow.md#how-to-use + "no-shadow": "off", + 'no-param-reassign': [ + 'error', + { + props: true, + ignorePropertyModificationsFor: [ + 'state', // for vuex + ], + }, + ], + "vue/require-explicit-emits": "error", + }, +}