source

Vuex 변환 매개 변수와 충돌하는 SonarQube 규칙을 사용하지 않도록 설정하려면 어떻게 해야 합니까?

bestscript 2022. 11. 13. 19:37

Vuex 변환 매개 변수와 충돌하는 SonarQube 규칙을 사용하지 않도록 설정하려면 어떻게 해야 합니까?

Vuex 스토어 모듈의 일부로 변환을 구현하면 다음과 같은 SonarQube 충돌이 발생합니다.

"state" hides or potentially hides a variable declared in an outer scope at line X

이 코드는 Vuex 문서의 다음 코드 조각과 유사합니다.

const moduleA = {
  state: { count: 0 },
  mutations: {
    increment (state) {
      // `state` is the local module state
      state.count++
    }
  }
}

(https://vuex.vuejs.org/guide/modules.html)

구현이 잘못된 관행입니까?아니면 SonarQube가 Vue/Vuex를 올바르게 분석하려면 특별한 구성/플러그인이 필요합니까?

언급URL : https://stackoverflow.com/questions/57992853/how-to-disable-the-sonarqube-rule-which-conflicts-with-the-parameter-of-a-vuex-m