From af07f6b2a9278b4d3f62b57021cce02680cc5157 Mon Sep 17 00:00:00 2001 From: MishaZhem Date: Wed, 10 Jul 2024 15:58:03 +0300 Subject: [PATCH] [FIX]: Add tsconfig.eslint.json --- .github/workflows/test.yml | 73 ------------------- CODE_OF_CONDUCT.md | 2 +- .../taiga-lumbermill-e2e/playwright.config.ts | 1 + .../src/app/app.component.html | 4 +- apps/taiga-lumbermill/src/test-setup.ts | 2 +- package.json | 11 --- tsconfig.eslint.json | 12 +++ tsconfig.json | 12 +++ 8 files changed, 29 insertions(+), 88 deletions(-) delete mode 100644 .github/workflows/test.yml create mode 100644 tsconfig.eslint.json create mode 100644 tsconfig.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 28be75597..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Tests - -on: - pull_request: - push: - branches: - - main - -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: taiga-family/ci/actions/setup/checkout@v1.65.2 - - uses: taiga-family/ci/actions/setup/variables@v1.65.2 - - uses: taiga-family/ci/actions/setup/node@v1.65.2 - - - name: Run tests - run: npx nx run-many --target test --all --coverage - - - name: Archive coverage artifacts - uses: actions/upload-artifact@v4.3.4 - with: - name: coverage-${{ github.workflow }}-${{ github.run_id }} - path: coverage - - codecov: - name: Collect coverage - needs: [tests] - runs-on: ubuntu-latest - steps: - - uses: taiga-family/ci/actions/setup/checkout@v1.65.2 - - uses: actions/download-artifact@v4.1.8 - with: - name: coverage-${{ github.workflow }}-${{ github.run_id }} - path: coverage - - - name: Display structure of coverage files - run: tree -L 2 ./coverage -P 'lcov.info' - - - uses: codecov/codecov-action@v4.5.0 - with: - directory: ./coverage/core/ - flags: summary,core - name: core - - uses: codecov/codecov-action@v4.5.0 - with: - directory: ./coverage/kit/ - flags: summary,kit - name: kit - - uses: codecov/codecov-action@v4.5.0 - with: - directory: ./coverage/phone/ - flags: summary,phone - name: phone - - uses: codecov/codecov-action@v4.5.0 - with: - directory: ./coverage/angular/ - flags: summary,angular - name: angular - - uses: codecov/codecov-action@v4.5.0 - with: - directory: ./coverage/react/ - flags: summary,react - name: react - - uses: codecov/codecov-action@v4.5.0 - with: - directory: ./coverage/vue/ - flags: summary,vue - name: vue - -concurrency: - group: test-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index c4f7c5ed7..39f091cb1 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -58,4 +58,4 @@ https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org -For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq \ No newline at end of file +For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq diff --git a/apps/taiga-lumbermill-e2e/playwright.config.ts b/apps/taiga-lumbermill-e2e/playwright.config.ts index 002b1b531..fd8d15813 100644 --- a/apps/taiga-lumbermill-e2e/playwright.config.ts +++ b/apps/taiga-lumbermill-e2e/playwright.config.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import {defineConfig, devices} from '@playwright/test'; import {nxE2EPreset} from '@nx/playwright/preset'; diff --git a/apps/taiga-lumbermill/src/app/app.component.html b/apps/taiga-lumbermill/src/app/app.component.html index 8dbc4ef99..f03606936 100644 --- a/apps/taiga-lumbermill/src/app/app.component.html +++ b/apps/taiga-lumbermill/src/app/app.component.html @@ -1,4 +1,4 @@ - - + + diff --git a/apps/taiga-lumbermill/src/test-setup.ts b/apps/taiga-lumbermill/src/test-setup.ts index b3525effa..a2178d304 100644 --- a/apps/taiga-lumbermill/src/test-setup.ts +++ b/apps/taiga-lumbermill/src/test-setup.ts @@ -1,3 +1,4 @@ +import 'jest-preset-angular/setup-jest'; // @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment globalThis.ngJest = { testEnvironmentOptions: { @@ -5,4 +6,3 @@ globalThis.ngJest = { errorOnUnknownProperties: true, }, }; -import 'jest-preset-angular/setup-jest'; diff --git a/package.json b/package.json index 006c6ae22..6f3bcd960 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ ] }, "dependencies": { - "@angular-eslint/schematics": "^18.1.0", "@angular/animations": "~18.0.0", "@angular/common": "~18.0.0", "@angular/compiler": "~18.0.0", @@ -75,7 +74,6 @@ "@taiga-ui/stylelint-config": "^0.113.7", "@taiga-ui/styles": "^4.0.0-rc.4", "@taiga-ui/tsconfig": "^0.113.7", - "@tinkoff/eslint-config-react": "^4.1.1", "cspell": "^8.10.4", "husky": "^9.0.11", "rxjs": "~7.8.0", @@ -86,15 +84,10 @@ "@angular-devkit/build-angular": "~18.0.0", "@angular-devkit/core": "~18.0.0", "@angular-devkit/schematics": "~18.0.0", - "@angular-eslint/eslint-plugin": "^18.0.1", - "@angular-eslint/eslint-plugin-template": "^18.0.1", - "@angular-eslint/template-parser": "^18.0.1", "@angular/cli": "~18.0.0", "@angular/compiler-cli": "~18.0.0", "@angular/language-service": "~18.0.0", "@nx/devkit": "19.4.2", - "@nx/eslint": "19.4.2", - "@nx/eslint-plugin": "19.4.2", "@nx/jest": "19.4.2", "@nx/js": "19.4.2", "@nx/playwright": "19.4.2", @@ -106,10 +99,6 @@ "@swc/helpers": "~0.5.11", "@types/jest": "^29.4.0", "@types/node": "18.16.9", - "@typescript-eslint/eslint-plugin": "^7.3.0", - "@typescript-eslint/parser": "^7.3.0", - "eslint": "~8.57.0", - "eslint-config-prettier": "^9.0.0", "jest": "^29.4.1", "jest-environment-jsdom": "^29.4.1", "jest-preset-angular": "~14.1.0", diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 000000000..05b604bce --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": ".", + "baseUrl": ".", + "strict": true, + "module": "esnext", + "incremental": true + }, + "include": ["apps/**/*.ts", "apps/**/*.ts", "scripts", "setup-jest.ts", "jest.config.ts", "*.spec.ts", "*.cy.ts"], + "exclude": ["**/node_modules", "*.js"] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..a1fd59faf --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "@taiga-ui/tsconfig", + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist", + "lib": ["es2021", "dom"], + "target": "ES2017", + "module": "ES2020", + "useDefineForClassFields": false, + "typeRoots": ["node_modules/@types"] + } +}