We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checklist
Tell us about your environment
Please show your full configuration:
/* eslint-env node */ require('@rushstack/eslint-patch/modern-module-resolution') module.exports = { root: true, ignorePatterns: ['*.legacy.vue'], env: { node: true, es6: true, browser: true, jest: true }, extends: [ 'eslint:recommended', '@vue/eslint-config-typescript', 'plugin:vue/vue3-recommended', 'plugin:@typescript-eslint/recommended', 'plugin:import/recommended', 'plugin:import/typescript', '@vue/eslint-config-prettier', ], parser: 'vue-eslint-parser', parserOptions: { ecmaVersion: 'latest', parser: '@typescript-eslint/parser', }, plugins: ['import', '@typescript-eslint', 'unused-imports'], settings: { 'import/resolver': { typescript: { alwaysTryTypes: true, project: './tsconfig.app.json', }, node: true, }, }, rules: { quotes: [ 'error', 'single', { avoidEscape: true, allowTemplateLiterals: false }, ], '@typescript-eslint/no-explicit-any': 'error', '@typescript-eslint/explicit-function-return-type': 'warn', 'import/newline-after-import': 'error', 'import/no-unresolved': 'error', 'import/order': [ 'error', { 'newlines-between': 'always', groups: [ 'builtin', 'external', 'internal', 'parent', 'sibling', 'index', ], alphabetize: { order: 'asc', caseInsensitive: true }, }, ], 'no-console': 'warn', 'no-use-before-define': 'off', 'no-warning-comments': 'warn', 'padding-line-between-statements': 'off', 'unused-imports/no-unused-imports': 'error', 'vue/no-multiple-template-root': 'off', 'vue/no-ref-as-operand': 'error', 'vue/no-undef-components': 'error', 'vue/html-self-closing': 'off', 'vue/component-name-in-template-casing': [ 'error', 'PascalCase', { registeredComponentsOnly: true, }, ], }, globals: { 'i18n-t': 'readonly', }, }
What did you do?
<script setup> function useSomething() { const testRef = ref('test') const testComputed = computed(() => { return testRef.value !== 'test' }) return { testComputed, testRef, } } const isTestComputedOk = computed(() => { const { testComputed } = useSomething() if (testComputed) { return 'yes' } else { return 'no' } }) </script>
What did you expect to happen? The testComputed in the isTestComputedOk should throw a vue/no-ref-as-operand lint error
testComputed
isTestComputedOk
vue/no-ref-as-operand
What actually happened? It doesn't throw
Repository to reproduce this issue https://github.com/timothee-durand/minimal-reproduce-no-ref-as-operand
The text was updated successfully, but these errors were encountered:
This is a duplicate of #2519. Thanks for the detailed info. Let's track the issue there.
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
The
testComputed
in theisTestComputedOk
should throw avue/no-ref-as-operand
lint errorWhat actually happened?
It doesn't throw
Repository to reproduce this issue
https://github.com/timothee-durand/minimal-reproduce-no-ref-as-operand
The text was updated successfully, but these errors were encountered: