Skip to content

Commit

Permalink
ci: check for changes to lints separate from writing changes (#2117)
Browse files Browse the repository at this point in the history
  • Loading branch information
zimeg authored Dec 5, 2024
1 parent 4cbe2cf commit 96d846a
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 46 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
- webhook
runs-on: ${{ matrix.os }}
steps:
- name: Configure git settings (Windows)
if: matrix.os == 'windows-latest'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"prebuild": "shx rm -rf ./coverage",
"build": "shx chmod +x src/*.js",
"prelint": "tsc --noemit --module es2022 --maxNodeModuleJsDepth 0 --project ./jsconfig.json",
"lint": "npx @biomejs/biome check --write .",
"lint": "npx @biomejs/biome check .",
"lint:fix": "npx @biomejs/biome check --write .",
"pretest": "npm run lint",
"test": "c8 mocha src/*.spec.js"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
"url": "https://github.com/slackapi/node-slack-sdk/issues"
},
"scripts": {
"lint": "npx @biomejs/biome check --write .",
"build": "npm run build:clean && tsc",
"build:clean": "shx rm -rf ./dist ./coverage",
"lint": "npx @biomejs/biome check .",
"lint:fix": "npx @biomejs/biome check --write .",
"prepare": "npm run build",
"mocha": "cross-env SLACK_CLI_PATH=/doesnt/matter mocha --config .mocharc.json src/*.spec.ts src/**/*.spec.ts src/**/**/*.spec.ts",
"test": "npm run lint && npm run build && c8 npm run mocha"
Expand Down
3 changes: 2 additions & 1 deletion packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"prepare": "npm run build",
"build": "npm run build:clean && tsc",
"build:clean": "shx rm -rf ./dist ./coverage",
"lint": "npx @biomejs/biome check --write .",
"lint": "npx @biomejs/biome check .",
"lint:fix": "npx @biomejs/biome check --write .",
"mocha": "mocha --config .mocharc.json src/*.spec.js",
"test:unit": "npm run build && npm run mocha",
"test": "npm run lint && npm run coverage",
Expand Down
12 changes: 3 additions & 9 deletions packages/logger/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,16 @@
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"*": [
"./types/*"
]
"*": ["./types/*"]
},
"esModuleInterop": true
// Not using this setting because its only used to require the package.json file, and that would change the
// structure of the files in the dist directory because package.json is not located inside src. It would be nice
// to use import instead of require(), but its not worth the tradeoff of restructuring the build (for now).
// "resolveJsonModule": true,
},
"include": [
"src/**/*"
],
"exclude": [
"src/**/*.spec.*"
],
"include": ["src/**/*"],
"exclude": ["src/**/*.spec.*"],
"jsdoc": {
"out": "support/jsdoc",
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/oauth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"prepare": "npm run build",
"build": "npm run build:clean && tsc",
"build:clean": "shx rm -rf ./dist ./coverage",
"lint": "npx @biomejs/biome check --write .",
"lint": "npx @biomejs/biome check .",
"lint:fix": "npx @biomejs/biome check --write .",
"test": "npm run lint && npm run coverage",
"coverage": "npm run build && c8 npm run test:mocha",
"test:mocha": "mocha --config .mocharc.json src/*.spec.ts src/**/*.spec.ts",
Expand Down
13 changes: 3 additions & 10 deletions packages/oauth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,16 @@
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"*": [
"./types/*"
]
"*": ["./types/*"]
},
"esModuleInterop": true
// Not using this setting because its only used to require the package.json file, and that would change the
// structure of the files in the dist directory because package.json is not located inside src. It would be nice
// to use import instead of require(), but its not worth the tradeoff of restructuring the build (for now).
// "resolveJsonModule": true,
},
"include": [
"src/**/*"
],
"exclude": [
"src/**/spec-utils.ts",
"src/**/*.spec.*"
],
"include": ["src/**/*"],
"exclude": ["src/**/spec-utils.ts", "src/**/*.spec.*"],
"jsdoc": {
"out": "support/jsdoc",
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/rtm-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"prepare": "npm run build",
"build": "npm run build:clean && tsc",
"build:clean": "shx rm -rf ./dist",
"lint": "npx @biomejs/biome check --write .",
"lint": "npx @biomejs/biome check .",
"lint:fix": "npx @biomejs/biome check --write .",
"test": "npm run lint && npm run build && npm run test:integration",
"test:integration": "mocha --config .mocharc.json test/integration.spec.js"
},
Expand Down
12 changes: 3 additions & 9 deletions packages/rtm-api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,16 @@
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"*": [
"./types/*"
]
"*": ["./types/*"]
},
"esModuleInterop": true
// Not using this setting because its only used to require the package.json file, and that would change the
// structure of the files in the dist directory because package.json is not located inside src. It would be nice
// to use import instead of require(), but its not worth the tradeoff of restructuring the build (for now).
// "resolveJsonModule": true,
},
"include": [
"src/**/*"
],
"exclude": [
"src/**/*.spec.*"
],
"include": ["src/**/*"],
"exclude": ["src/**/*.spec.*"],
"jsdoc": {
"out": "support/jsdoc",
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion packages/socket-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"prepare": "npm run build",
"build": "npm run build:clean && tsc",
"build:clean": "shx rm -rf ./dist ./coverage",
"lint": "npx @biomejs/biome check --write .",
"lint": "npx @biomejs/biome check .",
"lint:fix": "npx @biomejs/biome check --write .",
"test:unit": "mocha --config .mocharc.json src/**/*.spec.ts",
"test:coverage": "c8 npm run test:unit",
"test:integration": "mocha --config .mocharc.json test/integration.spec.js",
Expand Down
3 changes: 2 additions & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"prepare": "npm run build",
"build": "npm run build:clean && tsc",
"build:clean": "shx rm -rf ./dist",
"lint": "npx @biomejs/biome check --write .",
"lint": "npx @biomejs/biome check .",
"lint:fix": "npx @biomejs/biome check --write .",
"test": "npm run lint && npm run build && npm run test:types",
"test:types": "tsd"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/web-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"prepare": "npm run build",
"build": "npm run build:clean && tsc",
"build:clean": "shx rm -rf ./dist ./coverage",
"lint": "npx @biomejs/biome check --write .",
"lint": "npx @biomejs/biome check .",
"lint:fix": "npx @biomejs/biome check --write .",
"mocha": "mocha --config .mocharc.json \"./src/**/*.spec.ts\"",
"test": "npm run lint && npm run test:types && npm run test:integration && npm run test:unit",
"test:integration": "npm run build && node test/integration/commonjs-project/index.js && node test/integration/esm-project/index.mjs && npm run test:integration:ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/webhook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"prepare": "npm run build",
"build": "npm run build:clean && tsc",
"build:clean": "shx rm -rf ./dist ./coverage",
"lint": "npx @biomejs/biome check --write .",
"lint": "npx @biomejs/biome check .",
"lint:fix": "npx @biomejs/biome check --write .",
"mocha": "mocha --config .mocharc.json src/*.spec.ts",
"test": "npm run lint && npm run test:unit",
"test:unit": "npm run build && c8 npm run mocha"
Expand Down
12 changes: 3 additions & 9 deletions packages/webhook/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,16 @@
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"*": [
"./types/*"
]
"*": ["./types/*"]
},
"esModuleInterop": true
// Not using this setting because its only used to require the package.json file, and that would change the
// structure of the files in the dist directory because package.json is not located inside src. It would be nice
// to use import instead of require(), but its not worth the tradeoff of restructuring the build (for now).
// "resolveJsonModule": true,
},
"include": [
"src/**/*"
],
"exclude": [
"src/**/*.spec.*"
],
"include": ["src/**/*"],
"exclude": ["src/**/*.spec.*"],
"jsdoc": {
"out": "support/jsdoc",
"access": "public"
Expand Down

0 comments on commit 96d846a

Please sign in to comment.