rusackas opened a new pull request, #37883: URL: https://github.com/apache/superset/pull/37883
### SUMMARY Upgrade several lint rules from warn to error, reducing tech debt and enforcing better code practices. This PR cleans up the single violation of each rule in the codebase. ### Rules upgraded from warn → error | Rule | Fix Applied | |------|-------------| | `constructor-super` | eslint-disable (intentional pattern in ExtensibleFunction) | | `no-alert` | eslint-disable with TODO (SqlEditorTabHeader uses native prompt) | | `react/no-danger` | eslint-disable with safety comments (all uses are sanitized) | | `react/forbid-foreign-prop-types` | (no violations found) | | `unicorn/no-invalid-remove-event-listener` | Fixed by storing bound function reference | ### New rules added (set to error) - `react-you-might-not-need-an-effect/no-empty-effect` - `react-you-might-not-need-an-effect/no-pass-live-state-to-parent` - `react-you-might-not-need-an-effect/no-initialize-state` ### Notable fix **SqlLab App component**: The `removeEventListener` was using `.bind(this)` which creates a new function reference each time, meaning the listener was never actually removed. Fixed by storing the bound function in the constructor. ### BEFORE/AFTER SCREENSHOTS OR COVERAGE N/A - lint configuration changes only ### TESTING INSTRUCTIONS 1. Run `npx oxlint -c oxlint.json` - should have no errors for upgraded rules 2. Run `npm run lint` - should pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
