diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11f747eeda..02a9c12e7c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,13 @@ jobs: restore-keys: | ${{ runner.os }}-pnpm-store- + - name: setup eslint cache + uses: actions/cache@v3 + with: + path: '**/.eslintcache' + key: eslint-${{github.sha}} + restore-keys: eslint- + - name: setup lerna cache id: lerna-cache uses: actions/cache@v3 @@ -50,13 +57,6 @@ jobs: key: lerna-cache-${{github.sha}} restore-keys: lerna-cache- - - name: setup eslint cache - uses: actions/cache@v3 - with: - path: .eslintcache - key: eslint-${{github.sha}} - restore-keys: eslint- - - name: install dependencies run: pnpm install diff --git a/.gitignore b/.gitignore index af72d4cd80..43fcc33e38 100644 --- a/.gitignore +++ b/.gitignore @@ -15,9 +15,7 @@ .env.*.local # Log files -pnpm-debug.log* -npm-debug.log* -yarn-debug.log* +*-debug.log* yarn-error.log* # Editor directories and files diff --git a/nx.json b/nx.json index 8b60fef222..977666b1f9 100644 --- a/nx.json +++ b/nx.json @@ -12,10 +12,14 @@ "dependsOn": ["^build", "prebuild"], "outputs": [ "{projectRoot}/dist", + "{projectRoot}/report", + "{projectRoot}/schemas", "{projectRoot}/showcase", - "{projectRoot}/types", - "{projectRoot}/report" + "{projectRoot}/types" ] + }, + "test": { + "outputs": ["{projectRoot}/coverage"] } } } diff --git a/package.json b/package.json index faac4fffe5..b9a1b1ffd2 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "postinstall": "lerna run build", "postci": "lerna run build", "build": "lerna run build", - "lint": "eslint packages --ext .ts,.tsx,.vue --quiet --cache --cache-strategy content", - "lint:fix": "eslint packages --ext .ts,.tsx,.vue --fix", + "lint": "lerna run lint -- --quiet --cache --cache-strategy content", + "lint:fix": "lerna run lint -- --fix", "test": "lerna run test", "serve": "lerna run serve", "prepare-release:stable": "lerna version --conventional-commits --conventional-graduate --no-git-tag-version --yes", diff --git a/packages/deep-merge/package.json b/packages/deep-merge/package.json index f15d8e3f0f..102de4332d 100644 --- a/packages/deep-merge/package.json +++ b/packages/deep-merge/package.json @@ -29,11 +29,12 @@ }, "scripts": { "preinstall": "npx only-allow pnpm", + "prebuild": "pnpm run clean", "build": "tsc && tsc --project tsconfig.esm.json", "clean": "rimraf dist && rimraf coverage", "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts", "prepublishOnly": "pnpm run build", - "prebuild": "pnpm run clean", "test": "jest" }, "dependencies": { diff --git a/packages/jest-utils/package.json b/packages/jest-utils/package.json index 44fef3a796..eda2b38e5f 100644 --- a/packages/jest-utils/package.json +++ b/packages/jest-utils/package.json @@ -27,6 +27,7 @@ "build": "tsc", "build:watch": "tsc --watch", "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts", "prepublishOnly": "pnpm run build" }, "devDependencies": { diff --git a/packages/logger/package.json b/packages/logger/package.json index 87f637d953..ca2de8791c 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -30,6 +30,7 @@ "build": "tsc && tsc --project tsconfig.esm.json", "build:watch": "tsc --watch", "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts", "prepublishOnly": "pnpm run build", "test": "jest" }, diff --git a/packages/react-wrapper/package.json b/packages/react-wrapper/package.json index 0c4813b4e0..5cc6972e5a 100644 --- a/packages/react-wrapper/package.json +++ b/packages/react-wrapper/package.json @@ -30,6 +30,7 @@ "build": "tsc", "cypress:open": "cypress open --browser chrome", "cypress:run": "cypress run --headless --browser chrome", + "lint": "eslint . --ext .ts,tsx", "postbuild": "pnpm pack", "prepublishOnly": "pnpm run build", "test": "pnpm run test:unit && pnpm run test:e2e:ci", diff --git a/packages/storage-service/package.json b/packages/storage-service/package.json index 387f325a2b..c3be402c76 100644 --- a/packages/storage-service/package.json +++ b/packages/storage-service/package.json @@ -32,10 +32,11 @@ "preinstall": "npx only-allow pnpm", "build": "tsc && tsc --project tsconfig.esm.json", "build:watch": "tsc --watch", + "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts", "test": "jest", "test:watch": "jest --watch", "test:coverage": "jest --coverage", - "postbuild": "pnpm pack", "prepublishOnly": "pnpm run build" }, "dependencies": { diff --git a/packages/x-adapter-platform/package.json b/packages/x-adapter-platform/package.json index 6e9888f783..feeed23235 100644 --- a/packages/x-adapter-platform/package.json +++ b/packages/x-adapter-platform/package.json @@ -31,11 +31,12 @@ "build": "concurrently \"pnpm run build:*\" && pnpm run gen:docs", "build:cjs": "tsc --project tsconfig.cjs.json", "build:esm": "tsc --project tsconfig.esm.json", + "postbuild": "pnpm pack", "gen:model-docs": "api-extractor run -l", "gen:typescript-docs": "api-documenter markdown -i report -o docs", "gen:docs": "pnpm run gen:model-docs && pnpm run gen:typescript-docs", + "lint": "eslint . --ext .ts", "test": "jest", - "postbuild": "pnpm pack", "prepublishOnly": "pnpm run build" }, "dependencies": { diff --git a/packages/x-adapter/package.json b/packages/x-adapter/package.json index c56389d3ef..c68d39d9f0 100644 --- a/packages/x-adapter/package.json +++ b/packages/x-adapter/package.json @@ -31,8 +31,9 @@ "build": "concurrently \"pnpm run build:*\"", "build:cjs": "tsc --project tsconfig.cjs.json", "build:esm": "tsc --project tsconfig.esm.json", - "test": "jest", "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts", + "test": "jest", "prepublishOnly": "pnpm run build" }, "dependencies": { diff --git a/packages/x-archetype-utils/package.json b/packages/x-archetype-utils/package.json index 6bf2dcd6f7..c73ba043bb 100644 --- a/packages/x-archetype-utils/package.json +++ b/packages/x-archetype-utils/package.json @@ -31,6 +31,7 @@ "build:cjs": "tsc --project tsconfig.cjs.json", "build:esm": "tsc --project tsconfig.esm.json", "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts", "test": "jest", "prepublishOnly": "pnpm run build" }, diff --git a/packages/x-bus/package.json b/packages/x-bus/package.json index f9b975d420..1eb6695a6b 100644 --- a/packages/x-bus/package.json +++ b/packages/x-bus/package.json @@ -31,6 +31,7 @@ "build:cjs": "tsc --project tsconfig.cjs.json", "build:esm": "tsc --project tsconfig.esm.json", "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts", "test": "jest", "prepublishOnly": "pnpm run build" }, diff --git a/packages/x-components/package.json b/packages/x-components/package.json index 0d90c9afef..168198eacf 100644 --- a/packages/x-components/package.json +++ b/packages/x-components/package.json @@ -47,11 +47,11 @@ "serve": "vue-cli-service serve", "build": "ts-node --project ./build/tsconfig.json ./build/build.ts", "build:website": "vue-cli-service build", + "postbuild": "pnpm pack --pack-destination ..", "gen:docs": "rimraf ./docs && pnpm run gen:typescript-docs && pnpm run gen:component-docs", "gen:typescript-docs": "api-documenter markdown --input-folder dist/report --output-folder docs/API-reference/api", "gen:component-docs": "vue-docgen", - "postbuild": "pnpm pack --pack-destination ..", - "prepublishOnly": "pnpm run build", + "lint": "eslint . --ext .ts,.vue", "test:unit": "jest --silent && pnpm run test:unit-cypress", "test:unit-jest": "jest", "test:unit-cypress": "cypress run --component", @@ -64,7 +64,8 @@ "cypress:open": "cypress open --e2e --browser chrome", "cypress:open:firefox": "cypress open --e2e --browser firefox", "cypress:open:component": "cypress open --component --browser chrome", - "cypress:open:component:firefox": "cypress open --component --browser firefox" + "cypress:open:component:firefox": "cypress open --component --browser firefox", + "prepublishOnly": "pnpm run build" }, "dependencies": { "@empathyco/x-adapter": "^8.0.0-alpha.24", diff --git a/packages/x-priority-queue/package.json b/packages/x-priority-queue/package.json index dc0a93a139..14f7ed7f29 100644 --- a/packages/x-priority-queue/package.json +++ b/packages/x-priority-queue/package.json @@ -31,6 +31,7 @@ "build:cjs": "tsc --project tsconfig.cjs.json", "build:esm": "tsc --project tsconfig.esm.json", "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts", "test": "jest", "prepublishOnly": "pnpm run build" }, diff --git a/packages/x-svg-converter/package.json b/packages/x-svg-converter/package.json index 3a33c9e2cd..7275ba16dd 100644 --- a/packages/x-svg-converter/package.json +++ b/packages/x-svg-converter/package.json @@ -29,6 +29,7 @@ "prebuild": "rimraf dist ./*.tgz", "build": "tsc --project tsconfig.build.json", "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts", "test": "jest -i" }, "devDependencies": { diff --git a/packages/x-tailwindcss/package.json b/packages/x-tailwindcss/package.json index 7bbe4aa5c1..9240621fea 100644 --- a/packages/x-tailwindcss/package.json +++ b/packages/x-tailwindcss/package.json @@ -33,6 +33,7 @@ "prebuild": "rimraf ./dist ./showcase ./*.tgz", "build": "rollup -c && rollup -c demo/rollup.config.js", "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts,.vue", "prepublishOnly": "pnpm run build" }, "dependencies": { diff --git a/packages/x-translations/package.json b/packages/x-translations/package.json index 835e881d35..fb793785af 100644 --- a/packages/x-translations/package.json +++ b/packages/x-translations/package.json @@ -27,6 +27,7 @@ "preinstall": "npx only-allow pnpm", "build": "tsc", "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts", "test": "jest -i" }, "dependencies": { diff --git a/packages/x-utils/package.json b/packages/x-utils/package.json index d460186161..7b378f3d1d 100644 --- a/packages/x-utils/package.json +++ b/packages/x-utils/package.json @@ -30,6 +30,7 @@ "build": "tsc --project tsconfig.cjs.json && tsc --project tsconfig.esm.json", "test": "jest", "postbuild": "pnpm pack", + "lint": "eslint . --ext .ts", "prepublishOnly": "pnpm run build" }, "dependencies": {