spdx-online-tools
spdx-online-tools copied to clipboard
Added linters to the project
- Intended to solve #472 • Install the necessary linters:
- Python linter: pylint (pip install pylint)
- JavaScript linter: eslint (npm install eslint)
- HTML linter: htmlhint
- CSS linter: stylelint (npm install stylelint) • Create configuration files for each linter:
- Python: create a .pylintrc file in the root directory of the project with desired configuration options
- JavaScript: create an .eslintrc file in the root directory of the project with desired configuration options.
- HTML: create a .tidyrc file in the root directory of the project with desired configuration options
- CSS: create a stylelint.config.js file in the root directory of the project with desired configuration options. • Integrate the linters into the project workflow:
- For Python, add a pylint command to the project's Makefile or scripts directory.
- For JavaScript, add an eslint command to the project's Makefile or scripts directory and include it in the pre-commit hook.
- For HTML, add a tidy command to the project's Makefile or scripts directory and include it in the pre-commit hook.
- For CSS, add a stylelint command to the project's Makefile or scripts directory and include it in the pre-commit hook.