From 8bc00a93e4d431b95b3b2d77bdaac5a68144b3ce Mon Sep 17 00:00:00 2001 From: Luiz Bezerra Date: Wed, 9 Oct 2024 17:46:03 +0100 Subject: [PATCH] lint configurations Signed-off-by: Luiz Bezerra --- .eslintrc.yaml | 1 + .gitignore | 1 + package.json | 3 ++- sonar-project.properties | 3 +++ tsconfig.json | 9 +-------- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 2ed6a1eed6..cc455a31be 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -10,6 +10,7 @@ ignorePatterns: - "packages/**/wasm/*.js" - "!.storybook" - storybook-static + - coverage plugins: - file-progress diff --git a/.gitignore b/.gitignore index 9d6d3d6676..c4c1e34722 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ coverage/ # SonarQube files .sonar_lock .scannerwork +eslint-report.json diff --git a/package.json b/package.json index dc4ad66ae4..145c1974bb 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "node": ">=16" }, "scripts": { - "clean": "tsc --build --clean packages/**/tsconfig.json && rimraf .webpack */.webpack dist storybook-screenshots storybook-static", + "clean": "tsc --build --clean packages/**/tsconfig.json && rimraf .webpack */.webpack dist storybook-screenshots storybook-static coverage", "build:packages": "tsc --build --verbose packages/*/tsconfig.json packages/*/src/*/tsconfig.json", "desktop:build:dev": "webpack --mode development --progress --config desktop/webpack.config.ts", "desktop:build:prod": "webpack --mode production --progress --config desktop/webpack.config.ts", @@ -35,6 +35,7 @@ "license-check": "ts-node ci/license-check.ts", "lint": "TIMING=1 eslint --report-unused-disable-directives --fix .", "lint:ci": "TIMING=1 eslint --report-unused-disable-directives --config .eslintrc.ci.yaml .", + "lint:ci:report": "yarn lint:ci -f json -o eslint-report.json", "lint:unused-exports": "ts-node ./ci/lint-unused-exports.ts", "lint:dependencies": "ts-node ./ci/lint-dependencies.ts .", "test": "jest", diff --git a/sonar-project.properties b/sonar-project.properties index 400efe80a7..de32400e67 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,7 +1,10 @@ # General sonar.projectKey=Lichtblick-Suite_lichtblick sonar.organization=lichtblick-suite + +# TS and Lint sonar.typescript.tsconfigPath=tsconfig.json +sonar.eslint.reportPaths=eslint-report.json # Path to sources sonar.sources=benchmark,ci,desktop,packages,web diff --git a/tsconfig.json b/tsconfig.json index 28978ff99c..15fa67f853 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,14 +3,7 @@ // Do not "include" files here if they are already included by another tsconfig.json. { "extends": "@lichtblick/tsconfig/base", - "include": [ - "./*.ts", - "./*.js", - "./**/jest.config.ts", - "./ci/**/*.ts", - "./resources/notarize.ts", - "./package.json" - ], + "include": ["./**/*.ts", "./**/*.tsx", "./**/*.js", "./package.json"], "compilerOptions": { "jsx": "react-jsx", "module": "commonjs",