Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/rules/no-unused-properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,16 @@ module.exports = {
let groupName = null
if (/^mapMutations|mapActions$/u.test(node.callee.name)) {
groupName = 'methods'
} else if (/^mapState|mapGetters$/u.test(node.callee.name)) {
} else if (
/^mapState|mapGetters|mapWritableState$/u.test(node.callee.name)
) {
groupName = 'computed'
}

if (!groupName || node.arguments.length === 0) return
const arg = node.arguments[0]
// On Pinia the store is always the first argument
const arg =
node.arguments.length === 2 ? node.arguments[1] : node.arguments[0]
if (arg.type === 'ObjectExpression') {
// e.g.
// `mapMutations({ add: 'increment' })`
Expand Down
Loading