ipywidgets_bokeh
ipywidgets_bokeh copied to clipboard
Add pre-commit
This commit does not run pre-commit on the repo, it just adds it as a dev dependency, and adds the following checks.
- prevents commits to the
mainbranch - remove unused imports from python files
- modifies all imports to be absolute for python files
- removes commented out code in python files
- runs
isorton imports for python files - runs
blackon python files (formatting) - runs
ruffon python files (linting) - fixes for the
setup.cfgfile - ensures
json,yaml, andtomlfiles are parseable (ignores the conda.recipe/meta.yaml file) - uses local installs of eslint and prettier for linting and formatting any [java|type]script files.
Also, three additional files have been added.
ipywidgets_bokeh/.eslintrc.jsipywidgets_bokeh/.prettierrc
These files contain the formatting and linting rules as outlined in Bokeh.
The last file is a project.toml file that for the time being only contains preferences for ruff. In the future we can use it for complying with setuptools installs.
The package*.json files have also been modified to include eslint and prettier, as well as updating the lint script from a TODO to an actual linting action. This helps with the requests in #75
Resolves #80
Happy to see this merged!