Comments (15)
Probably also related: we should lax newline-per-chained-call
, which is has a max depth of just 2
.
from eslint-config.
Please do, the newline-per-chained-call
is a pain in the *** as it is at the moment and it becomes strange when you have just 3 calls for example because one will be going to the next line. Either we define it as 1 and it all goes in a new line or we make it bigger
from eslint-config.
Yes, at the moment that is valid as well. The real problem is when you want everything in a one liner having 3 calls
from eslint-config.
@ruipneves yeah, what I mean is you can still put them in each line right?
array
.filter()
.map()
.filter()
this would be valid right? (a part from indentation)
from eslint-config.
@hugomrdias Prettier does have have an overlap with eslint in regards to formatting, especially now that eslint has autofix. Still, eslint does much more than just formatting, which is linting. As an example, it detects errors based on static analysis that prettier doesn't do.
@ritazoliveira do you want to take on this? So overall, we need to:
- Remove all exceptions made to
indent
(SwitchCase
andMemberExpression
) and update tests - Lax
newline-per-chained-call
into a larger depth or completely disable it
This is a breaking change, so the commits should reflect that. It might be worth making these as separate PRs.
from eslint-config.
Agreed 👌
Would also do it for SwitchCase
, but maybe that's less standard.
from eslint-config.
Yep, not only it becomes more readable but also seems more inline with what we are used to do and what our current rules are enforcing.
from eslint-config.
Please do, the newline-per-chained-call is a pain in the *** as it is at the moment and it becomes strange when you have just 3 calls for example because one will be going to the next line. Either we define it as 1 and it all goes in a new line or we make it bigger
Yeah, I must admit the above is quite annoying in my opinion...
from eslint-config.
Please do, the newline-per-chained-call is a pain in the *** as it is at the moment and it becomes strange when you have just 3 calls for example because one will be going to the next line. Either we define it as 1 and it all goes in a new line or we make it bigger
@ruipneves but you can put all of them inline still right? (https://eslint.org/docs/rules/newline-per-chained-call)
Or you mean it sucks because the autofix puts it 2 (first lines) + 1 (next line)?
Do agree that max depth of 2 is weird - only one or everything in each new line sounds better @ruipneves 👌
from eslint-config.
It sucks because of the new line 😛
array.filter().map()
.filter()
from eslint-config.
Wouldn't prettier solve all the formatting issues and simplify the config. Feel free to ignore me as I'm not very familiar with the repo.
from eslint-config.
@satazor yes I know all that, just saying leave the formatting to prettier and linting to eslint. This setup is pretty standard even with styles (prettier/style lint).
from eslint-config.
I'm not familiar with prettier, but if eslint does as much as prettier and even more, what would be the point to maintain a prettier config as well?
from eslint-config.
Both PR's are now open for review.
from eslint-config.
from eslint-config.
Related Issues (20)
- Consider using `eslint-plugin-testing-library` and `eslint-plugin-jest-dom` HOT 2
- Update `eslint-plugin-jsx-a11y` to v6.3.1 HOT 1
- Enforce lowercase in test names
- Consider enabling linting of markdown files HOT 1
- Remove rules no longer needed in React 17
- Support ESM for Node.js
- Consider using `eslint-plugin-postcss-modules`
- Consider laxing `max-len` HOT 1
- Disable `global-require` and `prefer-import` on the jest addon HOT 1
- Upgrade to eslint@5 HOT 1
- Specify react version HOT 1
- Consider using eslint-plugin-jsx-a11y HOT 3
- An in-range update of eslint-plugin-jsdoc is breaking the build 🚨 HOT 10
- An in-range update of eslint is breaking the build 🚨 HOT 2
- Reminder: after update to ESLint v6, dissalow 'allow require for configs' for nested configs HOT 1
- Disable some react rules in tests HOT 3
- jest global throws 'not defined' error in global mock HOT 2
- Remove commitHooks setting from Lerna's publish config
- Add Node CI with GitHub Actions
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.