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

@ -60,7 +60,18 @@ This project uses ESLint and Prettier for code formatting and style checking. Th
You can check your code style by running:
```bash
npx eslint src/
npm run check-style
```
This will run all code style checks, including a specific check for semicolons.
You can also run individual checks:
```bash
npm run lint # Run ESLint to check for code issues
npm run lint:fix # Automatically fix linting issues
npm run format # Format your code with Prettier
npm run check-format # Check if your code is properly formatted
```
## Branching Strategy