-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
UI ESLint #42184
UI ESLint #42184
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
🔥 remove `settings.json` for now.
@bbovenzi FYI: I renamed |
@bbovenzi I also fixed the linting of |
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.
Thanks for taking this on. I hope this helps set a good foundation for our new UI.
Thanks a lot for addressing the comments, the PR is looking good. We have one gitignore left with the ‘.vscode’ removal. I’ll be able to try this locally on Monday (I’m on my phone atm), just to confirm that the errors I had previously are gone :) |
Main was just fixed here, rebasing should solve the CI problem. |
@pierrejeambrun just in case I pushed a commit making the dist ignoring global, should make it so it doesn't run in the dist directory at all ^_^ |
Looking good, working locally. We still have one |
@pierrejeambrun there were 3 aperances of
I just kept the last one removed, I can add it back, but the effect is the same afaik. |
Oh yes indeed, thanks for removing that useless ignore. |
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.
Nice
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
* 🚨 new ESLint rules and configuration. * 🚨 fix all linting errors. * 🚚 fix component casing. * 🔧 add new import sorting for prettier. * 🚨 apply new sorting of imports. * 🔧 add missing `noUncheckedIndexedAccess` setting to avoid potential mistakes with index access. * 📄 add license to `prettier.config.js` * 🎨 format code examples to use spaces instead of tabs. * 🎨 format openapi-gen files. * 🔧 exclude `pnpm-lock.yaml` from adding a license. * 🔧 add ignore of `pnpm-lock.yaml` in more places. 🌐 add statics word. * 🔧 add `.vscode/settings.json` * 🔧 add `*.tsbuildinfo` to `.gitignore`. ⬇️ downgrade typescript. * 🔧 revert `.vscode` files ignore in gitignore. 🔥 remove `settings.json` for now. * ⏪ revert formatting in .pre-commit-config.yaml * 🚚 change casing of files to match main. * 🔀 fix main merge issues -_- * 🚚 fix incorrect main file casing change. * 🔥 delete duplicated files that were moved in main. * 🎨 add missing space in pre-commit-config * ✏️ fix pnpm-lock.yaml * 🔧 fix dist ignoring. * 🤔 Lint and fox vite.config.ts.
* 🚨 new ESLint rules and configuration. * 🚨 fix all linting errors. * 🚚 fix component casing. * 🔧 add new import sorting for prettier. * 🚨 apply new sorting of imports. * 🔧 add missing `noUncheckedIndexedAccess` setting to avoid potential mistakes with index access. * 📄 add license to `prettier.config.js` * 🎨 format code examples to use spaces instead of tabs. * 🎨 format openapi-gen files. * 🔧 exclude `pnpm-lock.yaml` from adding a license. * 🔧 add ignore of `pnpm-lock.yaml` in more places. 🌐 add statics word. * 🔧 add `.vscode/settings.json` * 🔧 add `*.tsbuildinfo` to `.gitignore`. ⬇️ downgrade typescript. * 🔧 revert `.vscode` files ignore in gitignore. 🔥 remove `settings.json` for now. * ⏪ revert formatting in .pre-commit-config.yaml * 🚚 change casing of files to match main. * 🔀 fix main merge issues -_- * 🚚 fix incorrect main file casing change. * 🔥 delete duplicated files that were moved in main. * 🎨 add missing space in pre-commit-config * ✏️ fix pnpm-lock.yaml * 🔧 fix dist ignoring. * 🤔 Lint and fox vite.config.ts.
Using my open-source ESLint configuration as a base, and updating to adapt to the code in Airflow UI, I:
rules
directory inairflow/ui
with.js
files tackling different parts of the UI (Core rules, TypeScript rules, prettier rules and so on)..vscode
settings file to organize imports and apply fixes in each explicit save.Feel free to explore each file inside
rules
, each rule has some documentation on top explaining what it does, I curated each and every one of them manually.The PR is separated in 2 commits, one only has the configuration changes mentioned above, the other is the changes that had to be made to make the linter happy.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.