From 1db241aa2f381a37b5df39346982d825a1719dfb Mon Sep 17 00:00:00 2001 From: Stijn de Vos Date: Thu, 24 Oct 2024 13:40:48 +0200 Subject: [PATCH 1/2] Make template lint use node glob to ensure consistent lint results --- packages/create-sitecore-jss/src/templates/nextjs/package.json | 2 +- .../create-sitecore-jss/src/templates/react-native/package.json | 2 +- packages/create-sitecore-jss/src/templates/react/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/create-sitecore-jss/src/templates/nextjs/package.json b/packages/create-sitecore-jss/src/templates/nextjs/package.json index 7665d0d39a..ab0d148117 100644 --- a/packages/create-sitecore-jss/src/templates/nextjs/package.json +++ b/packages/create-sitecore-jss/src/templates/nextjs/package.json @@ -71,7 +71,7 @@ }, "scripts": { "jss": "jss", - "lint": "eslint ./src/**/*.tsx ./src/**/*.ts ./scripts/**/*.ts", + "lint": "eslint \"./src/**/*.tsx\" \"./src/**/*.ts\" \"./scripts/**/*.ts\"", "bootstrap": "ts-node --require dotenv-flow/config --project tsconfig.scripts.json scripts/bootstrap.ts && graphql-let", "build": "cross-env NODE_ENV=production npm-run-all --serial bootstrap next:build", "graphql:update": "ts-node --project tsconfig.scripts.json ./scripts/fetch-graphql-introspection-data.ts", diff --git a/packages/create-sitecore-jss/src/templates/react-native/package.json b/packages/create-sitecore-jss/src/templates/react-native/package.json index 3735cfba46..110b00aa58 100644 --- a/packages/create-sitecore-jss/src/templates/react-native/package.json +++ b/packages/create-sitecore-jss/src/templates/react-native/package.json @@ -19,7 +19,7 @@ "start-ios": "node ./build/start.js --platform ios", "start-ios:connected": "scjss-verify-setup && node ./build/start.js --platform ios --appMode connected", "start-ios:connected-tunnel": "scjss-verify-setup && node ./build/start.js --platform ios --appMode connected-tunnel", - "lint": "eslint ./src/**/*.js ./sitecore/definitions/**/*.js" + "lint": "eslint \"./src/**/*.js\" \"./sitecore/definitions/**/*.js\"" }, "dependencies": { "@react-native-community/masked-view": "^0.1.10", diff --git a/packages/create-sitecore-jss/src/templates/react/package.json b/packages/create-sitecore-jss/src/templates/react/package.json index cab94ed384..ac2081adf7 100644 --- a/packages/create-sitecore-jss/src/templates/react/package.json +++ b/packages/create-sitecore-jss/src/templates/react/package.json @@ -105,7 +105,7 @@ "bootstrap": "node scripts/bootstrap.js", "graphql:update": "node -r @babel/register ./scripts/update-graphql-fragment-data.js", "test": "react-scripts test --env=jsdom", - "lint": "eslint ./src/**/*.js ./sitecore/definitions/**/*.js ./scripts/**/*.js ./server/**/*.js ./data/**/*.yml", + "lint": "eslint \"./src/**/*.js\" \"./sitecore/definitions/**/*.js\" \"./scripts/**/*.js\" \"./server/**/*.js\" \"./data/**/*.yml\"", "eject": "react-scripts eject", "eject:script": "ncp ./scripts ./scripts-copy && node ./scripts-copy/eject.js && ncp ./scripts-copy ./scripts && del-cli ./scripts-copy", "install-pre-push-hook": "node ./scripts/install-pre-push-hook.js" From d4f89b652b0284d0860da60a0eb0b486290a21ba Mon Sep 17 00:00:00 2001 From: Stijn de Vos Date: Thu, 24 Oct 2024 13:54:02 +0200 Subject: [PATCH 2/2] Updated changelong --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa5b7db9ef..e423915f2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Our versioning strategy is as follows: ### 🐛 Bug Fixes +* `[templates/nextjs]` `[templates/react-native]` `[templates/react]` Make lint use node glob for consistent linting across different OS ([#1959](https://github.com/Sitecore/jss/pull/1959)) * `[sitecore-jss-nextjs]` Link component prefetches files ([#1956](https://github.com/Sitecore/jss/pull/1956)) * `[templates/nextjs]` `[templates/react]` `[templates/angular]` `[templates/vue]` Fixed an issue when environment variable is undefined (not present in .env), that produced an "undefined" value in generated config file ([#1875](https://github.com/Sitecore/jss/pull/1875)) * `[templates/nextjs]` Fix embedded personalization not rendering correctly after navigation through router links. ([#1911](https://github.com/Sitecore/jss/pull/1911))