Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropping bash script precommit in favor of using lint-staged #407

Merged
merged 6 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
"*.json": "prettier --write"
}
File renamed without changes.
5 changes: 4 additions & 1 deletion Common/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: { project: './tsconfig.cjs.json' },
parserOptions: {
project: './tsconfig.cjs.json',
tsconfigRootDir: __dirname,
},
plugins: [
'@typescript-eslint',
'eslint-plugin-tsdoc',
Expand Down
7 changes: 7 additions & 0 deletions Common/.lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import baseConfig from '../.lintstagedrc.mjs'

export default {
...baseConfig,
'*.ts': 'eslint --fix',
}

98 changes: 49 additions & 49 deletions Common/package.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
{
"name": "@epicgames-ps/lib-pixelstreamingcommon-ue5.5",
"version": "0.1.4",
"description": "Common utilities library for Unreal Engine 5.5 Pixel Streaming",
"main": "build/commonjs/pixelstreamingcommon.js",
"module": "build/esm/pixelstreamingcommon.js",
"types": "build/types/pixelstreamingcommon.d.ts",
"sideEffects": false,
"scripts": {
"compile": "tsc --project tsconfig.esm.json && tsc --project tsconfig.cjs.json",
"build": "rimraf ./build && npm run build-proto && npm run compile",
"build-dev": "npm run build-proto && npm run compile",
"build-proto": "protoc --experimental_allow_proto3_optional --ts_out src/Messages --proto_path protobuf protobuf/signalling_messages.proto",
"build-proto-docs": "protoc --doc_out=docs --doc_opt=markdown,messages.md --proto_path protobuf protobuf/signalling_messages.proto",
"build-docs": "typedoc --tsconfig tsconfig.base.json",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/webxr": "^0.5.1",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"cspell": "^4.1.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-tsdoc": "^0.2.17",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "3.3.3",
"rimraf": "^5.0.5",
"ts-jest": "^29.2.5",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.2",
"typedoc": "^0.27.4",
"typedoc-plugin-markdown": "^4.3.2",
"typescript": "^5.0.0"
},
"author": "Epic Games",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@protobuf-ts/plugin": "^2.9.3",
"@types/ws": "^8.5.10",
"ws": "^8.17.1"
}
}
{
"name": "@epicgames-ps/lib-pixelstreamingcommon-ue5.5",
"version": "0.1.4",
"description": "Common utilities library for Unreal Engine 5.5 Pixel Streaming",
"main": "build/commonjs/pixelstreamingcommon.js",
"module": "build/esm/pixelstreamingcommon.js",
"types": "build/types/pixelstreamingcommon.d.ts",
"sideEffects": false,
"scripts": {
"compile": "tsc --project tsconfig.esm.json && tsc --project tsconfig.cjs.json",
"build": "rimraf ./build && npm run build-proto && npm run compile",
"build-dev": "npm run build-proto && npm run compile",
"build-proto": "protoc --experimental_allow_proto3_optional --ts_out src/Messages --proto_path protobuf protobuf/signalling_messages.proto",
"build-proto-docs": "protoc --doc_out=docs --doc_opt=markdown,messages.md --proto_path protobuf protobuf/signalling_messages.proto",
"build-docs": "typedoc --tsconfig tsconfig.base.json",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/webxr": "^0.5.1",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"cspell": "^4.1.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-tsdoc": "^0.2.17",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "3.3.3",
"rimraf": "^5.0.5",
"ts-jest": "^29.2.5",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.2",
"typedoc": "^0.27.4",
"typedoc-plugin-markdown": "^4.3.2",
"typescript": "^5.0.0"
},
"author": "Epic Games",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@protobuf-ts/plugin": "^2.9.3",
"@types/ws": "^8.5.10",
"ws": "^8.17.1"
}
}
3 changes: 3 additions & 0 deletions Extras/Scripts/pre-commit-checks.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# No longer used in favor of using lint-staged
# Will remove this eventually but leaving here for reference for now

LINT_CHECK_PATHS=(
"Common/"
"Signalling/"
Expand Down
5 changes: 4 additions & 1 deletion Frontend/library/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: { project: './tsconfig.cjs.json' },
parserOptions: {
project: './tsconfig.cjs.json',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', "plugin:prettier/recommended"],
rules: {
Expand Down
7 changes: 7 additions & 0 deletions Frontend/library/.lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import baseConfig from '../../.lintstagedrc.mjs'

export default {
...baseConfig,
'*.ts': 'eslint --fix',
}

7 changes: 0 additions & 7 deletions Frontend/library/.prettierrc.json

This file was deleted.

90 changes: 45 additions & 45 deletions Frontend/library/package.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
"name": "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5",
"version": "0.4.5",
"description": "Frontend library for Unreal Engine 5.5 Pixel Streaming",
"main": "dist/commonjs/pixelstreamingfrontend.js",
"module": "dist/esm/pixelstreamingfrontend.js",
"types": "dist/types/pixelstreamingfrontend.d.ts",
"sideEffects": false,
"scripts": {
"compile": "tsc --project tsconfig.esm.json && tsc --project tsconfig.cjs.json",
"build": "npm run compile",
"build-all": "cd ../../Common && npm install && npm run build && cd ../Frontend/library && npm install && npm run build",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"test": "jest --detectOpenHandles --coverage=true",
"spellcheck": "cspell \"{README.md,.github/*.md,src/**/*.ts}\""
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"cspell": "^4.1.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "3.3.3",
"ts-jest": "^29.2.5",
"typedoc": "^0.27.4",
"typescript": "^5.0.0"
},
"dependencies": {
"@epicgames-ps/lib-pixelstreamingcommon-ue5.5": "^0.1.4",
"@types/webxr": "^0.5.1",
"sdp": "^3.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/EpicGamesExt/PixelStreamingInfrastructure.git"
},
"author": "Epic Games",
"license": "MIT",
"publishConfig": {
"access": "public"
}
}
{
"name": "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5",
"version": "0.4.5",
"description": "Frontend library for Unreal Engine 5.5 Pixel Streaming",
"main": "dist/commonjs/pixelstreamingfrontend.js",
"module": "dist/esm/pixelstreamingfrontend.js",
"types": "dist/types/pixelstreamingfrontend.d.ts",
"sideEffects": false,
"scripts": {
"compile": "tsc --project tsconfig.esm.json && tsc --project tsconfig.cjs.json",
"build": "npm run compile",
"build-all": "cd ../../Common && npm install && npm run build && cd ../Frontend/library && npm install && npm run build",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"test": "jest --detectOpenHandles --coverage=true",
"spellcheck": "cspell \"{README.md,.github/*.md,src/**/*.ts}\""
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"cspell": "^4.1.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "3.3.3",
"ts-jest": "^29.2.5",
"typedoc": "^0.27.4",
"typescript": "^5.0.0"
},
"dependencies": {
"@epicgames-ps/lib-pixelstreamingcommon-ue5.5": "^0.1.4",
"@types/webxr": "^0.5.1",
"sdp": "^3.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/EpicGamesExt/PixelStreamingInfrastructure.git"
},
"author": "Epic Games",
"license": "MIT",
"publishConfig": {
"access": "public"
}
}
5 changes: 4 additions & 1 deletion Frontend/ui-library/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: { project: './tsconfig.json' },
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
plugins: [
'@typescript-eslint',
'eslint-plugin-tsdoc'
Expand Down
7 changes: 7 additions & 0 deletions Frontend/ui-library/.lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import baseConfig from '../../.lintstagedrc.mjs'

export default {
...baseConfig,
'*.ts': 'eslint --fix',
}

7 changes: 0 additions & 7 deletions Frontend/ui-library/.prettierrc.json

This file was deleted.

88 changes: 44 additions & 44 deletions Frontend/ui-library/package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
{
"name": "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5",
"version": "0.4.4",
"description": "Reference frontend UI library for Unreal Engine 5.5 Pixel Streaming - gives the stock look and feel.",
"main": "dist/commonjs/pixelstreamingfrontend-ui.js",
"module": "dist/esm/pixelstreamingfrontend-ui.esm.js",
"types": "dist/types/pixelstreamingfrontend-ui.d.ts",
"sideEffects": false,
"scripts": {
"compile": "tsc --project tsconfig.esm.json && tsc --project tsconfig.cjs.json",
"build": "npm run compile",
"build-all": "cd ../library && npm install && npm run build-all && cd ../ui-library && npm install && npm run build",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"spellcheck": "cspell \"{README.md,.github/*.md,src/**/*.ts}\""
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.21.0",
"cspell": "^4.1.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-tsdoc": "^0.2.17",
"prettier": "3.3.3",
"typedoc": "^0.27.4",
"typescript": "^5.0.0"
},
"dependencies": {
"jss": "^10.9.2",
"jss-plugin-camel-case": "^10.9.2",
"jss-plugin-global": "^10.9.2"
},
"peerDependencies": {
"@epicgames-ps/lib-pixelstreamingfrontend-ue5.5": "^0.4.5"
},
"repository": {
"type": "git",
"url": "https://github.com/EpicGamesExt/PixelStreamingInfrastructure.git"
},
"author": "Epic Games",
"license": "MIT",
"publishConfig": {
"access": "public"
}
}
{
"name": "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5",
"version": "0.4.4",
"description": "Reference frontend UI library for Unreal Engine 5.5 Pixel Streaming - gives the stock look and feel.",
"main": "dist/commonjs/pixelstreamingfrontend-ui.js",
"module": "dist/esm/pixelstreamingfrontend-ui.esm.js",
"types": "dist/types/pixelstreamingfrontend-ui.d.ts",
"sideEffects": false,
"scripts": {
"compile": "tsc --project tsconfig.esm.json && tsc --project tsconfig.cjs.json",
"build": "npm run compile",
"build-all": "cd ../library && npm install && npm run build-all && cd ../ui-library && npm install && npm run build",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"spellcheck": "cspell \"{README.md,.github/*.md,src/**/*.ts}\""
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.21.0",
"cspell": "^4.1.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-tsdoc": "^0.2.17",
"prettier": "3.3.3",
"typedoc": "^0.27.4",
"typescript": "^5.0.0"
},
"dependencies": {
"jss": "^10.9.2",
"jss-plugin-camel-case": "^10.9.2",
"jss-plugin-global": "^10.9.2"
},
"peerDependencies": {
"@epicgames-ps/lib-pixelstreamingfrontend-ue5.5": "^0.4.5"
},
"repository": {
"type": "git",
"url": "https://github.com/EpicGamesExt/PixelStreamingInfrastructure.git"
},
"author": "Epic Games",
"license": "MIT",
"publishConfig": {
"access": "public"
}
}
5 changes: 4 additions & 1 deletion Signalling/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: { project: './tsconfig.cjs.json' },
parserOptions: {
project: './tsconfig.cjs.json',
tsconfigRootDir: __dirname,
},
plugins: [
'@typescript-eslint',
'eslint-plugin-tsdoc'
Expand Down
7 changes: 7 additions & 0 deletions Signalling/.lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import baseConfig from '../.lintstagedrc.mjs'

export default {
...baseConfig,
'*.ts': 'eslint --fix',
}

7 changes: 0 additions & 7 deletions Signalling/.prettierrc.json

This file was deleted.

Loading
Loading