You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2025/10/01 03:06:14 UTC

[PR] refactor(frontend): Flatten ESLint configuration and remove Airbnb dependency [superset]

rusackas opened a new pull request, #35353:
URL: https://github.com/apache/superset/pull/35353

   ## Summary
   
   This PR completes the ESLint configuration flattening by extracting all rules from `eslint-config-airbnb` and adding them directly to our config file. This gives us full control over our linting rules and reduces external dependencies.
   
   ## Motivation
   
   - **Control**: All linting rules are now explicit and easily modifiable
   - **Transparency**: No more hidden rules from external configs
   - **Maintenance**: Easier to update individual rules without waiting for upstream changes
   - **Dependencies**: Reduced package footprint
   
   ## Changes Made
   
   ### 1. Extracted Airbnb Rules
   - Analyzed and extracted 426 total rules from Airbnb config:
     - 251 core ESLint rules
     - 175 plugin rules (import, react, jsx-a11y, react-hooks)
   - Skipped 2 rules not needed with React 17+ (`jsx-uses-react`, `react-in-jsx-scope`)
   
   ### 2. Updated Configuration
   - Added all extracted rules directly to `.eslintrc.js`
   - Added required plugins to the plugins array: `['import', 'jsx-a11y', 'react-hooks']`
   - Removed `'airbnb'` from extends arrays
   
   ### 3. Removed Dependencies
   - Removed `eslint-config-airbnb` and 4 utility packages:
     - `object.assign`
     - `object.entries`
     - `confusing-browser-globals`
     - `semver` (from eslint-config-airbnb-base)
   
   ### 4. Cleanup
   - Removed 116 redundant rules:
     - 62 rules set to 'off' that are already off by default
     - 6 deprecated rules that no longer exist in ESLint
     - 48 rules set to ESLint's default values
   
   ## Testing
   
   - ✅ ESLint configuration is valid
   - ✅ All required plugins are installed and working
   - ✅ Linting works on all file types (JS, JSX, TS, TSX)
   - ✅ Pre-commit hooks pass
   - ✅ All existing linting behavior is preserved
   
   ## Benefits
   
   - **Complete control** - All rules are now explicit in our config
   - **No external config dependencies** - Everything is self-contained
   - **Easier to modify** - Can directly see and change any rule
   - **Reduced dependencies** - Removed 5 packages total
   - **Same behavior** - All the same rules are enforced
   
   ## Next Steps (Future PRs)
   
   - Consider migrating to the new ESLint flat config format (ESLint 9+)
   - Review and potentially adjust rule severities based on team preferences
   - Consider enabling additional useful rules that were previously disabled
   
   🤖 Generated with 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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] refactor(frontend): Flatten ESLint configuration and remove Airbnb dependency [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #35353:
URL: https://github.com/apache/superset/pull/35353#issuecomment-3354535833

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] refactor(frontend): Flatten ESLint configuration and remove Airbnb dependency [superset]

Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on PR #35353:
URL: https://github.com/apache/superset/pull/35353#issuecomment-3354535732

   Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment `/korbit-review`.
   
   > Your admin can change your review schedule in the [Korbit Console](https://app.korbit.ai/settings)
   
   
   
   [](f58c6b04-38e2-462b-9750-81b476e4e435)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] refactor(frontend): Flatten ESLint configuration and remove Airbnb dependency [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed pull request #35353: refactor(frontend): Flatten ESLint configuration and remove Airbnb dependency
URL: https://github.com/apache/superset/pull/35353


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org