Skip to content
New issue

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

False-positive for react/display-name after 7.29.4 → 7.30.0 upgrade #3300

Closed
angelikatyborska opened this issue May 30, 2022 · 1 comment · Fixed by #3305
Closed

False-positive for react/display-name after 7.29.4 → 7.30.0 upgrade #3300

angelikatyborska opened this issue May 30, 2022 · 1 comment · Fixed by #3305

Comments

@angelikatyborska
Copy link

After upgrading eslint-plugin-react from 7.29.4 to 7.30.0 a new linting error appeared in my project that doesn't seem right. My project is a big full-stack monolith web app and it contains both Vue.js and React.js code. Now I am getting react/display-name for some Vue/Vuex code that has nothing to do with React. I stripped down the file, the original was much longer, but this still triggers the error:

import Vuex from 'vuex'
import Vue from 'vue'

// code omitted

const getters = {
  getChat: state => (scopePath, partnerId) => {
    const selectedChatScope = state.chats && state.chats.find(chat => chat.path === scopePath)

    if (!selectedChatScope) {
      return null
    }

    return 'something'
  }
}

export {
  getters
}
  7:21  error  Component definition is missing display name  react/display-name
@ljharb
Copy link
Member

ljharb commented Jun 1, 2022

cc @golopot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants