All code and documentation files must be written in English.
This includes:
- All JavaScript files (
.js) - All Markdown files (
.md) - Code comments
- Commit messages
- Documentation
All Markdown files must comply with markdownlint rules.
- Use proper heading hierarchy
- Ensure consistent formatting
- Include blank lines where required
- Follow standard Markdown syntax
All userscripts in the user.js/ directory must:
- Follow ESLint rules as much as possible
- Remain compatible with Tampermonkey
- Follow the header structure defined in user.js/INSTRUCTIONS.md
- Be synchronized with the main
README.md
The ESLint configuration is defined in eslint.config.js and is optimized for Tampermonkey compatibility.
Run ESLint before committing:
npm run lintor
npx eslint .The lab/ directory contains prototypes and experimental code. While more flexibility is allowed:
- Strive to follow the same coding standards
- Include a
README.mdexplaining the purpose of the script/project - Code should still be readable and maintainable
- Use English for all code and documentation
This repository uses a pre-commit hook to ensure code quality. Before each commit:
- ESLint runs automatically on staged JavaScript files
- Commits will be blocked if ESLint errors are found
- Fix all errors before committing
In exceptional cases, you can bypass the pre-commit hook:
git commit --no-verifyNote: Only use this when absolutely necessary, as it bypasses quality checks.
-
Make your changes
-
Run linting tools:
npm run lint
-
Fix any errors
-
Commit your changes
-
The pre-commit hook will run automatically
-
If successful, your commit will proceed
Make sure you have the required dependencies installed:
npm installThis will install:
- ESLint
- All necessary ESLint plugins and configurations
- Write clean code: Follow JavaScript best practices
- Comment your code: Explain complex logic
- Test your scripts: Ensure they work in Tampermonkey before committing
- Update documentation: Keep README files up to date
- Use semantic versioning: Increment version numbers appropriately
- Commit atomically: Make small, focused commits
If you have questions about these guidelines, please open an issue on GitHub.