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: [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]

Reply via email to