Comments (5)
import/sort does not order by path, it orders by first specifier based on documentation which isn't ideal considering your imports may jump around in diffs if you import a new function (e.g. importing extra lodash functions).
I'm also curious what the benefit of enforcing the ordering actually is. If a team wants to enforce it they can, but in the base eslint rules? Why? I say just enforce the import/first without absolute and avoid bad code scenarios from a platform perspective. As for ordering preferences, leave that up to each team.
from eslint-config-fusion.
Oh and if you're enforcing the sort order of imports, may want to include exports in that ordering then
and change import/exports-last to on instead of off (which is it's current value)
from eslint-config-fusion.
About import/first... Jest allows you to mock an import, for example:
jest.mock('@uber/web-rpc-redux');
import * as rpcRedux from '@uber/web-rpc-redux';
Without adding a eslint-disable for every single one of these cases, is there a more general solution if we keep import/first?
from eslint-config-fusion.
I think we've decided as a team that we only want to go with eslint:recommended and type checking for now. Developers can be more specific with their own rules if they want.
from eslint-config-fusion.
Is there a issue/PR tracking the work to remove the non eslint:recommended rules that have already been added?
from eslint-config-fusion.
Related Issues (10)
- Add import rules
- suggest adding plugin-jsx-a11y
- We should enable import extensions, except for packages. HOT 2
- Delete this repo HOT 3
- Initial implementation
- Use buildkite for CI
- Action Required: Fix Renovate Configuration
- See if we can remove the import rules HOT 1
- Build failing due to new peerDependency for eslint-config-jest HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-config-fusion.