False postive javascript:S1128 with Vue <script setup lang=ts">

  • ALM used (Azure DevOps)
  • CI system used (Azure DevOps)
  • Vue, Typescript, Javascript

Hi ! I have a project running on Nuxt Bridge:
“nuxt-edge”: “^2.16.0-27358576.777a4b7f”,
“@ nuxt/bridge”: “^0.10.1”,

My project is runnning on node 16.13.0, i have the unused error in every .vue file since September 20

My tsconfig.json

{
	"extends": "./.nuxt/tsconfig.json",
	"compilerOptions": {
		// needed to use node modules with jest
		"esModuleInterop": true,
		"useUnknownInCatchVariables": false,
		"types": [
			"node",
			"animejs",
			"@ types/body-scroll-lock",
			"@ pinia/nuxt",
			"@ nuxtjs/i18n",
			"@ nuxt/types",
			"@ nuxt/image"
		]
	},
	"exclude": [
		"**/node_modules",
		"**/dist",
		"**/.output",
		"static",
		"projects/storybook/**/*"
	]
}
1 Like

Hey there.

What version of SonarLint for VSCode are you using? Are you using Connected Mode?

Hi Colin :slight_smile: ,

I am using the version 1.71.2 of VSCODE, and i am in connected mode.

The issue is not about my IDE, i just used it to make a screenshot.

The real issue is directly in our sonarcloud

I started to have the exact same issue both in sonarcloud and in VSCode around 20th September.

My tsconfig

{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "strict": true,
    "jsx": "preserve",
    "importHelpers": true,
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "sourceMap": true,
    "baseUrl": ".",
    "types": [
      "webpack-env",
      "jest"
    ],
    "paths": {
      "@/*": [
        "src/*"
      ]
    },
    "lib": [
      "esnext",
      "dom",
      "dom.iterable",
      "scripthost"
    ]
  },
  "include": [
    "src/**/*",
    "tests/**/*"
  ],
  "exclude": [
    "node_modules"
  ]
}

Hello Adrien, hello Eugen,

Thank you for reporting this, we have opened an issue on SonarJS to track this.

Best,
Ilia

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.