带SonarJS的Sonar扫描仪无法解析typescript
我使用的是SonarQube Scanner 3.3.0.1492和SonarJS 5.2.1.7778(javascript)插件。我做了一个安装来安装typescript v3.5.3。当我运行声纳扫描器时,我收到了两个不同的解析错误,这些错误通常是在构建过程中正确解析的。这里有几个例子带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
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/**/*"
]
}