diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d412cd1..faaaf98 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ name: CI on: push jobs: - lint-test-build-publish: + lint-test-build: runs-on: ubuntu-20.04 steps: - name: Checkout repository @@ -12,19 +12,15 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v2 with: - node-version: 14 + node-version: 20 registry-url: 'https://registry.npmjs.org' scope: '@codexteam' - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Restore Yarn cache uses: actions/cache@v2 id: yarn-cache with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: .yarn/cache key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- @@ -33,7 +29,7 @@ jobs: run: yarn install - name: Test Eslint - run: yarn lint:test + run: yarn lint - name: Run unit tests run: yarn test @@ -41,28 +37,28 @@ jobs: - name: Build library run: yarn build - - name: Publish library - if: ${{ github.ref == 'refs/heads/main' }} - run: yarn publish --access=public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # - name: Publish library + # if: ${{ github.ref == 'refs/heads/main' }} + # run: yarn publish --access=public + # env: + # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - notify: - needs: lint-test-build-publish - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-20.04 - steps: - - name: Checkout repository - uses: actions/checkout@v2 + # notify: + # needs: lint-test-build-publish + # if: github.ref == 'refs/heads/main' + # runs-on: ubuntu-20.04 + # steps: + # - name: Checkout repository + # uses: actions/checkout@v2 - - name: Get package info - id: package - uses: codex-team/action-nodejs-package-info@v1 + # - name: Get package info + # id: package + # uses: codex-team/action-nodejs-package-info@v1 - - name: Send a message - uses: codex-team/action-codexbot-notify@v1 - with: - webhook: ${{ secrets.CODEX_BOT_WEBHOOK }} - message: '📦 [${{ steps.package.outputs.name }}](${{ steps.package.outputs.npmjs-link }}) ${{ steps.package.outputs.version }} was published' - parse_mode: 'markdown' - disable_web_page_preview: true + # - name: Send a message + # uses: codex-team/action-codexbot-notify@v1 + # with: + # webhook: ${{ secrets.CODEX_BOT_WEBHOOK }} + # message: '📦 [${{ steps.package.outputs.name }}](${{ steps.package.outputs.npmjs-link }}) ${{ steps.package.outputs.version }} was published' + # parse_mode: 'markdown' + # disable_web_page_preview: true diff --git a/eslint.config.mjs b/eslint.config.mjs index c6ecc43..c94c6b0 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,5 +1,10 @@ import CodeX from 'eslint-config-codex'; import { plugin as TsPlugin, parser as TsParser } from 'typescript-eslint'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); export default [ ...CodeX, @@ -18,7 +23,7 @@ export default [ languageOptions: { parser: TsParser, parserOptions: { - project: './tsconfig.eslint.json', + project: path.resolve(__dirname, 'tsconfig.json'), tsconfigRootDir: './', sourceType: 'module', }, diff --git a/packages/core/package.json b/packages/core/package.json index c0c187c..5668d21 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -25,6 +25,7 @@ "mylib-utils": "workspace:^" }, "devDependencies": { + "eslint": "^9.14.0", "rimraf": "^6.0.1", "typescript": "^5.6.3" } diff --git a/packages/utils/package.json b/packages/utils/package.json index 435f986..e237f45 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -10,6 +10,7 @@ "test": "jest" }, "devDependencies": { + "eslint": "^9.14.0", "typescript": "^5.6.3" } } diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json deleted file mode 100644 index 383a82b..0000000 --- a/tsconfig.eslint.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": [ - "eslint.config.mjs", - "packages/*/src/**/*.ts", - "packages/*/src/**/*.tsx", - ], -} diff --git a/yarn.lock b/yarn.lock index 52bd6b2..a7751b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4394,6 +4394,7 @@ __metadata: version: 0.0.0-use.local resolution: "mylib-utils@workspace:packages/utils" dependencies: + eslint: "npm:^9.14.0" typescript: "npm:^5.6.3" languageName: unknown linkType: soft @@ -4402,6 +4403,7 @@ __metadata: version: 0.0.0-use.local resolution: "mylib@workspace:packages/core" dependencies: + eslint: "npm:^9.14.0" mylib-utils: "workspace:^" rimraf: "npm:^6.0.1" typescript: "npm:^5.6.3"