Skip to content

Commit d069319

Browse files
committed
better precommit hook - lint components too
and remove the Py2 exclusion for black while we're at it
1 parent dff95f8 commit d069319

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.husky/pre-commit

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
npm run lint
1+
npm run lint && \
2+
(cd components/dash-core-components && npm run lint) && \
3+
(cd components/dash-table && npm run lint)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"private::initialize.renderer": "cd dash/dash-renderer && npm ci",
88
"private::build.components": "python dash/development/update_components.py 'all'",
99
"private::build.renderer": "cd dash/dash-renderer && renderer build",
10-
"private::lint.black": "if [ ${PYLINTRC:-x} != '.pylintrc' ]; then black dash tests --exclude metadata_test.py --check; fi",
10+
"private::lint.black": "black dash tests --exclude metadata_test.py --check",
1111
"private::lint.flake8": "flake8 --exclude=metadata_test.py dash tests",
1212
"private::lint.pylint-dash": "PYLINTRC=${PYLINTRC:=.pylintrc39} && pylint dash setup.py --rcfile=$PYLINTRC",
1313
"private::lint.pylint-tests": "PYLINTRC=${PYLINTRC:=.pylintrc39} && pylint tests/unit tests/integration -d all --rcfile=$PYLINTRC",

0 commit comments

Comments
 (0)