-
-
Notifications
You must be signed in to change notification settings - Fork 691
Closed
Description
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: 7.32.0
- eslint-plugin-vue version: 7.16.0
- Node version: 14.17.5
- Operating System: macOS
Please show your full configuration:
module.exports = {
root: true,
globals: {
Sentry: true,
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly'
},
env: {
browser: true,
node: true
},
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module'
},
parser: 'vue-eslint-parser',
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended',
'standard',
'@vue/standard',
'@vue/typescript/recommended'
],
plugins: ['vue'],
rules: {
'arrow-parens': ['error', 'as-needed'],
'quote-props': ['error', 'as-needed'],
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'max-len': ['warn', { code: 80 }],
'object-curly-spacing': ['error', 'always'],
'arrow-spacing': ['error', { before: true, after: true }],
'array-bracket-spacing': ['error', 'never'],
'no-console': process.NODE_ENV === 'production' ? 'error' : 'warn',
'no-unused-vars': 'off',
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'none',
requireLast: false
},
singleline: {
delimiter: 'semi',
requireLast: false
}
}],
'@typescript-eslint/no-unused-vars': 'error',
'vue/script-setup-uses-vars': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/no-extra-semi': ['error'],
'@typescript-eslint/type-annotation-spacing': ['error', {
before: false,
after: true,
overrides: {
arrow: { before: true, after: true }
}
}]
}
}
What did you do?
<script setup lang='ts'>
defineProps<{
msg: string
}>()
const fn = () => {
// eslint-disable-next-line no-console
console.log(123)
}
</script>
<template>
<div @click="fn">123</div>
</template>
What did you expect to happen?
ignore 'fn' is assigned a value but never used.
What actually happened?
Rule eslint@typescript-eslint/no-unused-vars remind me 'fn' is assigned a value but never used.
Repository to reproduce this issue
mustard-mh
Metadata
Metadata
Assignees
Labels
No labels