Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

vue/no-ref-as-operand only lint left identifier of a logical expression #2271

Open
Labels
@lakb248

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: v8.27.0
  • eslint-plugin-vue version: v9.7.0
  • Node version: v16.17.0
  • Operating System: MacOS

Please show your full configuration:

module.exports = {
 env: {
 browser: true,
 node: true,
 es6: true,
 },
 extends: [
 'plugin:vue/recommended',
 'eslint:recommended',
 '@vue/eslint-config-typescript/recommended',
 ],
 settings: {
 'import/resolver': {
 typescript: { directory: 'tsconfig.json' },
 alias: {
 extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue'],
 map: [
 // for more custom alias config not included in tsconfig
 ],
 },
 },
 },
 plugins: [
 'import'
 ],
}

What did you do?

const myRef = ref(0);
const a = true;
if (a && myRef) {
 // do something
}

What did you expect to happen?
myRef will throw vue/no-ref-as-operand error, vue/no-ref-as-operand only lint left identifier of a logicalExpression

What actually happened?

eslint don't throw vue/no-ref-as-operand error, and

Repository to reproduce this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /