-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce ESLint (JavaScript linting) with pre-commit hooks #11699
Conversation
Does this eslint configuration meet the project style guide? |
var oriSeconds = seconds; | ||
var floatingPart = oriSeconds- Math.floor(oriSeconds); | ||
export function convertSecsToHumanReadable(secs) { | ||
const oriSeconds = secs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have Babel? I know there were some compatibility issues with older browsers.
@mik-laj yes this is running the same configuration as |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/home/runner/work/airflow/airflow/airflow/www/static/js/ie.js
22:8 error Unable to resolve path to module 'url-search-params-polyfill' import/no-unresolved
✖ 2 problems (1 error, 1 warning)
/home/runner/work/airflow/airflow/airflow/www/webpack.config.js
20:25 error Unable to resolve path to module 'webpack' import/no-unresolved
22:32 error Unable to resolve path to module 'webpack-manifest-plugin' import/no-unresolved
23:23 error Unable to resolve path to module 'clean-webpack-plugin' import/no-unresolved
24:35 error Unable to resolve path to module 'copy-webpack-plugin' import/no-unresolved
25:38 error Unable to resolve path to module 'mini-css-extract-plugin' import/no-unresolved
26:37 error Unable to resolve path to module 'moment-locales-webpack-plugin' import/no-unresolved
27:41 error Unable to resolve path to module 'optimize-css-assets-webpack-plugin' import/no-unresolved
We might need to use something like https://www.npmjs.com/package/eslint-import-resolver-webpack ?
@ashb pre-commit wasn't including files outside of the |
Yeah - we are running pre-commit with --all-files switch in CI. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
8141f45
to
4564053
Compare
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
Rebased as Master was failing |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
@ryanahamilton CI failed with the following:
https://github.com/apache/airflow/pull/11699/checks?check_run_id=1292691649#step:7:176 |
33df9db
to
c8ecb98
Compare
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
b0453e1
to
953fb25
Compare
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
953fb25
to
0683435
Compare
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
This lead to bases such as in apache#11699 where despite there being changes, and an image being build, the pre-commit tests were not being run.
This lead to bases such as in #11699 where despite there being changes, and an image being build, the pre-commit tests were not being run.
0683435
to
145ad83
Compare
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
145ad83
to
ee319c5
Compare
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
…#12070) This lead to bases such as in apache#11699 where despite there being changes, and an image being build, the pre-commit tests were not being run. (cherry picked from commit 8000ab7)
The codebase has existing ESLint JavaScript linting rules configured, but they are not enforced (until now).
eslint
check to the pre-commit hooks.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.