Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带SonarJS的Sonar扫描仪无法解析typescript_Typescript_Sonarqube_Sonarscanner_Sonarjs - Fatal编程技术网

带SonarJS的Sonar扫描仪无法解析typescript

带SonarJS的Sonar扫描仪无法解析typescript,typescript,sonarqube,sonarscanner,sonarjs,Typescript,Sonarqube,Sonarscanner,Sonarjs,我使用的是SonarQube Scanner 3.3.0.1492和SonarJS 5.2.1.7778(javascript)插件。我做了一个安装来安装typescript v3.5.3。当我运行声纳扫描器时,我收到了两个不同的解析错误,这些错误通常是在构建过程中正确解析的。这里有几个例子 const genericGatewayRequest = <T extends {} | void>(request: AxiosRequestConfig): AxiosPromise&l

我使用的是SonarQube Scanner 3.3.0.1492和SonarJS 5.2.1.7778(javascript)插件。我做了一个安装来安装typescript v3.5.3。当我运行声纳扫描器时,我收到了两个不同的解析错误,这些错误通常是在构建过程中正确解析的。这里有几个例子

 const genericGatewayRequest = <T extends {} | void>(request: AxiosRequestConfig): AxiosPromise<T> => {
                                          ^
 const mockedAxios = Axios as jest.Mocked<typeof Axios>;
                           ^
 declare module 'react-number-format' {
    export interface NumberFormatProps extends Partial<FormOutlinedTextFieldProps> {
    ^
这是我的tsconfig.json

  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "baseUrl": "src",
    "paths": {
      "@test-utils": [
        "../test/utils"
      ]
    },
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react",
    "sourceMap": true
  },
  "include": [
    "./src/**/*"
  ]
}
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "baseUrl": "src",
    "paths": {
      "@test-utils": [
        "../test/utils"
      ]
    },
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react",
    "sourceMap": true
  },
  "include": [
    "./src/**/*"
  ]
}