Skip to content

Commit

Permalink
Chore: Fix random errors with lint-staged (#2533)
Browse files Browse the repository at this point in the history
* Skip stashing on lint-staged

* Only run linter on files we normally lint on when running in lint-staged
  • Loading branch information
ikoenigsknecht committed May 16, 2024
1 parent 5c5d9c8 commit 9000ee6
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"lint:no-fix": "eslint --ext .jsx,.js,.ts,.tsx ./src/",
"lint": "npm run lint:no-fix -- --fix",
"lint-ci": "npm run lint:no-fix",
"lint-staged": "lint-staged",
"lint-staged": "lint-staged --no-stash",
"test-nest": "cross-env NODE_OPTIONS=--experimental-vm-modules DEBUG=ipfs:*,backend:* node_modules/jest/bin/jest.js --detectOpenHandles --forceExit ./src/nest/**/*.spec.ts",
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules DEBUG=ipfs:*,backend:* jest --runInBand --verbose --testPathIgnorePatterns=\".src/(!?nodeTest*)|(.node_modules*)\" --",
"test-ci": "cross-env NODE_OPTIONS=--experimental-vm-modules jest ./src/**/* --runInBand --colors --ci --silent --verbose --testPathIgnorePatterns=\".src/nest/(!?nodeTest*)|(.node_modules*)|src/nest/.*\\.tor.spec\\.(t|j)s|src/nest/ipfs-file-manager/big-files.long.spec.ts$\"",
Expand Down Expand Up @@ -152,6 +152,6 @@
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
"src/**/*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
}
}
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint:no-fix": "eslint --ext .ts .",
"lint": "npm run lint:no-fix -- --fix",
"lint-ci": "npm run lint:no-fix",
"lint-staged": "lint-staged",
"lint-staged": "lint-staged --no-stash",
"test": "jest --runInBand",
"prettier": "prettier",
"rmDist": "rimraf lib/"
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"lint:no-fix": "eslint --ext .jsx,.js,.ts,.tsx ./src/",
"lint": "npm run lint:no-fix -- --fix",
"lint-ci": "npm run lint:no-fix",
"lint-staged": "lint-staged",
"lint-staged": "lint-staged --no-stash",
"type-check": "tsc -p tsconfig.build.json --noEmit",
"test": "jest --runInBand",
"test:watch": "jest --watchAll",
Expand Down Expand Up @@ -305,6 +305,6 @@
"npm": "8.19.2"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
"src/**/*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
}
}
4 changes: 2 additions & 2 deletions packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint:no-fix": "eslint --ext .js,.ts ./src/",
"lint": "npm run lint:no-fix -- --fix",
"lint-ci": "npm run lint:no-fix",
"lint-staged": "lint-staged",
"lint-staged": "lint-staged --no-stash",
"prettier:write": "prettier --write .",
"prettier:check": "prettier --check .",
"test": "cross-env TEST_MODE=true jest --runInBand --detectOpenHandles --forceExit",
Expand Down Expand Up @@ -55,6 +55,6 @@
"author": "",
"license": "GPL-3.0-or-later",
"lint-staged": {
"*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
"src/**/*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
}
}
4 changes: 2 additions & 2 deletions packages/identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint:no-fix": "eslint --ext .jsx,.js,.ts,.tsx ./src/",
"lint": "npm run lint:no-fix -- --fix",
"lint-ci": "npm run lint:no-fix",
"lint-staged": "lint-staged",
"lint-staged": "lint-staged --no-stash",
"check-style": "prettier --check src/**",
"rmDist": "rimraf lib/"
},
Expand Down Expand Up @@ -71,6 +71,6 @@
"access": "public"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
"src/**/*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
}
}
4 changes: 2 additions & 2 deletions packages/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test-ci": "jest integrationTests/*",
"lint:no-fix": "eslint --ext .ts ./src/",
"lint": "npm run lint:no-fix -- --fix",
"lint-staged": "lint-staged",
"lint-staged": "lint-staged --no-stash",
"prettier": "prettier"
},
"files": [
Expand Down Expand Up @@ -76,6 +76,6 @@
]
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
"src/**/*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
}
}
4 changes: 2 additions & 2 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint:no-fix": "eslint --ext .ts ./src/",
"lint": "npm run lint:no-fix -- --fix",
"lint-ci": "npm run lint:no-fix",
"lint-staged": "lint-staged",
"lint-staged": "lint-staged --no-stash",
"prettier": "prettier",
"rmDist": "rimraf lib/"
},
Expand All @@ -35,6 +35,6 @@
"author": "",
"license": "GPL-3.0-or-later",
"lint-staged": {
"*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
"src/**/*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
}
}
4 changes: 2 additions & 2 deletions packages/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:no-fix": "eslint --ext .jsx,.js,.ts,.tsx ./src/",
"lint": "npm run lint:no-fix -- --fix",
"lint-ci": "npm run lint:no-fix",
"lint-staged": "lint-staged",
"lint-staged": "lint-staged --no-stash",
"gen": "plop",
"prepare-backend-assets": "mkdir -p ./nodejs-assets/nodejs-project && cp ../backend/lib/bundle.cjs ./nodejs-assets/nodejs-project/bundle.cjs",
"patch-state-manager": "node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || patch -f -d ../state-manager -p0 < ./factory-girl.patch || true",
Expand Down Expand Up @@ -159,6 +159,6 @@
"testRegex": "src/.*\\.test\\.(t|j)sx?$"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
"src/**/*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
}
}
4 changes: 2 additions & 2 deletions packages/state-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint:no-fix": "eslint --ext .ts ./src/",
"lint": "npm run lint:no-fix -- --fix",
"lint-ci": "npm run lint:no-fix",
"lint-staged": "lint-staged",
"lint-staged": "lint-staged --no-stash",
"prettier": "prettier",
"rmDist": "rimraf lib/"
},
Expand Down Expand Up @@ -83,6 +83,6 @@
]
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
"src/**/*.{js,jsx,ts,tsx}": "npm run lint:no-fix"
}
}
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint:no-fix": "eslint --ext .ts .",
"lint": "npm run lint:no-fix -- --fix",
"lint-ci": "npm run lint:no-fix",
"lint-staged": "lint-staged",
"lint-staged": "lint-staged --no-stash",
"test": "exit 0",
"prettier": "prettier",
"rmDist": "rimraf lib/"
Expand Down

0 comments on commit 9000ee6

Please sign in to comment.