feat(scripts, project): add comprehensive code style enforcement script and update style-related workflows

- Created `scripts/check-code-style.js` to enforce coding standards.
  - Includes ESLint, Prettier checks, and custom semicolon rule validation.
  - Outputs actionable feedback for style violations.
- Updated `CONTRIBUTING.md` to document new code style workflows and commands.
- Added style commands to `package.json`:
  - `lint`, `lint:fix`, `format`, `check-format`, and `check-style`.
- Refactored `demo/index.html` to use `Object.defineProperty` for better global property management and prevent conflicts.

These changes enhance the automation of code quality checks, streamline developer workflows, and improve reliability in global property handling for the demo.
This commit is contained in:
David Snelling 2025-06-30 09:51:53 -07:00
parent 17d734630a
commit 79c293559a
4 changed files with 114 additions and 4 deletions

View file

@ -38,6 +38,11 @@
"version:patch": "npm version patch",
"version:minor": "npm version minor",
"version:major": "npm version major",
"lint": "eslint --ext .ts,.js src/",
"lint:fix": "eslint --ext .ts,.js src/ --fix",
"format": "prettier --write \"src/**/*.{ts,js}\"",
"check-format": "prettier --check \"src/**/*.{ts,js}\"",
"check-style": "node scripts/check-code-style.js",
"deploy": "npm run build && npm publish",
"deploy:cloud:aws": "cd cloud-wrapper && npm run build && npm run deploy:aws",
"deploy:cloud:gcp": "cd cloud-wrapper && npm run build && npm run deploy:gcp",