Add variable validation features to README and CLI; implement linting and strict mode for environment variables in executor and linter. Enhance VSCode extension documentation for improved user guidance.
This commit is contained in:
18
.vscode/extensions/playwrong-syntax/README.md
vendored
18
.vscode/extensions/playwrong-syntax/README.md
vendored
@@ -57,8 +57,24 @@ dump "login_page"
|
||||
- Unknown HTML elements
|
||||
- Generic element selectors
|
||||
- Semantic misuse (e.g., `click` on input fields)
|
||||
- **Undefined variables**: Variables that are not commonly defined environment variables
|
||||
|
||||
### Info
|
||||
- Environment variable usage
|
||||
- Command placement suggestions
|
||||
- Best practice tips
|
||||
- Best practice tips
|
||||
|
||||
## Variable Validation
|
||||
|
||||
The extension now provides enhanced validation for environment variables:
|
||||
|
||||
- **Common variables** like `$PASSWORD`, `$PASSWORDMAIL`, `$EMAIL`, `$USERNAME`, `$API_KEY`, `$TOKEN`, `$BASE_URL` show as info messages
|
||||
- **Undefined variables** that are not commonly defined show as warnings
|
||||
- Use the CLI with `--strict-variables` flag to treat undefined variables as errors during execution
|
||||
|
||||
## CLI Integration
|
||||
|
||||
The extension works with the PlayWrong CLI which supports:
|
||||
- `--lint` - Run linter before execution
|
||||
- `--strict` - Treat linter warnings as errors
|
||||
- `--strict-variables` - Treat undefined variables as errors during execution
|
||||
Reference in New Issue
Block a user