Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "eslint"
-
Be me
> find an eslint bug
> report it on their github
> ask to assign it to self
> start working on it
> spend half a day to find out the source of bug
> realises the bug is coming from a library eslint is using
> report it on the library's github
> ask to assign it to self
🤦🏻♂️9 -
So I put a very strict eslint configuration to a 6 month old project
..
..
..
..
924 errors in 27 files
..
..
..
..
..
I removed eslint from the project8 -
Module build failed: Module failed because of a eslint error.
217:15 error 'param' is assigned a value but never used no-unused-vars
Me:
Don't do it
Don't do it
Don't do it
Don't do it
Don't do it
Don't do it
Don't do it
Don't do it
Don't do it
Don't do it
Don't do it
Don't do it
Me:
console.log(param);9 -
When it's your job to fix the 15,000 errors picked up after suggesting to add ESLint to an existing project 😣9
-
writing library code is hard.
there are sooo many details that go into writing good libraries:
designing intuitive and powerful apis
deciding good api option defaults, disallowing or warning for illegal operations
knowing when to throw, knowing when to warn/log
handling edge cases
having good code coverage with tests that doesn't suck shit, while ensuring thry don't take a hundred years to run
making the code easy to read, to maintain, robust
and also not vulnerable, which is probably the most overlooked quality.
"too many classes, too little classes"
the functions do too much it's hard to follow them
or the functions are so well abstracted, that every function has 1 line of code, resulting in code that is even harder to understand or debug (have fun drowning in those immense stack traces)
don't forget to be disciplined about the documentation.
most of these things are
deeply affected by the ecosystem, the tools of the language you're writing this in:
like 5 years ago I hated coding in nodejs, because I didn't know about linters, and now we have tools like eslint or babel, so it's more passable now
but now dealing with webpack/babel configs and plugins can literally obliterate your asshole.
some languages don't even have a stable line by line debugger (hard pass for me)
then there's also the several phases of the project:
you first conceive the idea, the api, and try to implement it, write some md's of usage examples.
as you do that, you iterate on the api, you notice that it could better, so you redesign it. once, twice, thrice.
so at that point you're spending days, weeks on this side project, and your boss is like "what the fuck are you doing right now?"
then, you reach fuckinnnnng 0.1.0, with a "frozen" api, put it on github with a shitton of badges like the badge whore you are.
then you drop it on forums, and slack communities and irc, and what do you get?
half of the community wants to ban you for doing self promotion
the other half thinks either
a) your library api is shitty
b) has no real need for it
c) "why reinvent the wheel bruh"
that's one scenario,
the other scenario is the project starts to get traction.
people start to star it and shit.
but now you have one peoblem you didn't have before: humans.
all sorts of shit:
people treating you like shit as if they were premium users.
people posting majestically written issues with titles like "people help, me no work, here" with bodies like "HAAAAAAAAAALP".
and if you have the blessing to work in the current js ecosystem, issues like "this doesn't work with esm, unpkg, cdnjs, babel, webpack, parcel, buble, A BROWSER".
with some occasional lunatic complaining about IE 4 having a very weird, obscure bug.
not the best prospect either.3 -
Motherfucker if the project uses Eslint to enforce code standards, please don't start every fucking file with 20 lines of /*eslint-disable*/s
It's there to fucking help you and all the new devs who have to deal with your shitty code. I'm sorry that you're too fucking lazy to make a few small tweaks so that future developers don't have to deal with your sad braindead 1337speak JavaScript
Just use the fucking tool like everyone else, you don't have to fucking disable it so that your sad ego can continue to think you're the Bill Gates of JavaScript7 -
5 years as a software engr. In the last year I have programmed in java, js, ruby, and python professionally.
Just want to thank the guys contributing to linting tools. ESLint, Prettier, and other syntax helpers/correction tools.
You guys are awesome.2 -
Let me make a small change to this file, a one-line pull request will probably be accepted right away
* saves *
Prettier runs...
EsLint runs...
StyleLint runs...
60 changes submitted for review11 -
Retarded person I met today : "JS is gay cos you require strict mode for blah blah blah"
Me (and my webdev friend): pfft...
[Shows our ESLint Styling rules]
him: "o-oh... How the f-"6 -
I wrote a node + vue web app that consumes bing api and lets you block specific hosts with a click, and I have some thoughts I need to post somewhere.
My main motivation for this it is that the search results I've been getting with the big search engines are lacking a lot of quality. The SEO situation right now is very complex but the bottom line is that there is a lot of white hat SEO abuse.
Commercial companies are fucking up the internet very hard. Search results have become way too profit oriented thus unneutral. Personal blogs are becoming very rare. Information is losing quality and sites are losing identity. The internet is consollidating.
So, I decided to write something to help me give this situation the middle finger.
I wrote this because I consider the ability to block specific sites a basic universal right. If you were ripped off by a website or you just don't like it, then you should be able to block said site from your search results. It's not rocket science.
Google used to have this feature integrated but they removed it in 2013. They also had an extension that did this client side, but they removed it in 2018 too. We're years past the time where Google forgot their "Don't be evil" motto.
AFAIK, the only search engine on earth that lets you block sites is millionshort.com, but if you block too many sites, the performance degrades. And the company that runs it is a for profit too.
There is a third party extension that blocks sites called uBlacklist. The problem is that it only works on google. I wrote my app so as to escape google's tracking clutches, ads and their annoying products showing up in between my results.
But aside uBlacklist does the same thing as my app, including the limitation that this isn't an actual search engine, it's just filtering search results after they are generated.
This is far from ideal because filter results before the results are generated would be much more preferred.
But developing a search engine is prohibitively expensive to both index and rank pages for a single person. Which is sad, but can't do much about it.
I'm also thinking of implementing the ability promote certain sites, the opposite to blocking, so these promoted sites would get more priority within the results.
I guess I would have to move the promoted sites between all pages I fetched to the first page/s, but client side.
But this is suboptimal compared to having actual access to the rank algorithm, where you could promote sites in a smarter way, but again, I can't build a search engine by myself.
I'm using mongo to cache the results, so with a click of a button I can retrieve the results of a previous query without hitting bing. So far a couple of queries don't seem to bring much performance or space issues.
On using bing: bing is basically the only realiable API option I could find that was hobby cost worthy. Most microsoft products are usually my last choice.
Bing is giving me a 7 day free trial of their search API until I register a CC. They offer a free tier, but I'm not sure if that's only for these 7 days. Otherwise, I'm gonna need to pay like 5$.
Paying or not, having to use a CC to use this software I wrote sucks balls.
So far the usage of this app has resulted in me becoming more critical of sites and finding sites of better quality. I think overall it helps me to become a better programmer, all the while having better protection of my privacy.
One not upside is that I'm the only one curating myself, whereas I could benefit from other people that I trust own block/promote lists.
I will git push it somewhere at some point, but it does require some more work:
I would want to add a docker-compose script to make it easy to start, and I didn't write any tests unfortunately (I did use eslint for both apps, though).
The performance is not excellent (the app has not experienced blocks so far, but it does make the coolers spin after a bit) because the algorithms I wrote were very POC.
But it took me some time to write it, and I need to catch some breath.
There are other more open efforts that seem to be more ethical, but they are usually hard to use or just incomplete.
commoncrawl.org is a free index of the web. one problem I found is that it doesn't seem to index everything (for example, it doesn't seem to index the blog of a friend I know that has been writing for years and is indexed by google).
it also requires knowledge on reading warc files, which will surely require some time investment to learn.
it also seems kinda slow for responses,
it is also generated only once a month, and I would still have little idea on how to implement a pagerank algorithm, let alone code it.4 -
take adderall and stay up coding all night extremely effectively, but then u keep going and by the end of it you're just optimizing your vim plugins and installing a new linter
-
Me: Why did you exit the build?
Webpack (W): Build exited with code 2 - Eslint error at 2:1 in *filename*.scss 'Expected 2 line indent'
Me: internally *ARE YOU KIDDING ME?!?!?!? YOU FAILED OVER AN ESLINT STYLING!!!* *curses out original dev profusely under breath while fixing styling*4 -
Dear ESLint,
- you convinced me to put a space between function() and {
- you convinced me to use single quotes for strings in place of double quotes
- you convinced me to put a space between inline operators
- you had me when you said that trailing spaces shouldn't compare in my code
- you said to put semicolons at the end of each instruction, and I thought it wasn't a so bad idea
BUT NO FUCK OFF NO NEVER I WON'T NEVER PUT A FUCKING TRAILING COMMA IN THE END OF JAVASCRIPT OBJECT IT'S MEANINGLESS UGLY A WASTE OF A FUCKING BYTE.
WHY THE FUCK I SHOULD TYPE var obj = {a: 'some text',} INSTEAD OF var obj = {a: 'some text'} WHY WHAT'S THE MEANING OF THAT FUCKING COMMA9 -
Apparently `a || b` is unreadable to set a default value for a string in JS, but assigning temporary variables and use if statements all over is better somehow.
My code reviewer said use `a ? a : b` except it failed eslint, so he went back on that. (eslint suggested `a || b`, ffs.)10 -
hey guys,
I've been working with js for like 5 years now, and I figured I could help some people out, if needed.
I wouldn't consider myself a js lord, but I have some decent experience, and even if I don't know something I'll be honest about it and at the very least I'm pretty sure I'll point you in the right direction.
I'm fond of vue, lodash, es6, node, eslint bla bla. I also know rails.
In any case, my objective with this is to learn myself.
So feel free to tag me if you have any type of question about anything js.
Cheers.11 -
EsLint => 3n errors in you code.
Program failed to run
Removed ESLint
And application ran forever
EsLint is like that mother that warns her daughter time to time. Dont sit like this. Dont play with your hair. Dont whistle11 -
"Hey guys, we should start using ESLint. It's a popular linter. There's 13,000+ styling inconsistencies it could streamline using `--fix`"
"Yeah... But these errors, they're not really errors, right? So, we don't need to fix them."
...
1. I never said they were errors. Do you know how a linter works?
2. Sure, I guess being consistent and familiar are overrated qualities of a codebase. Carry on!4 -
Look, normally I don't give a shit how others code, but when the company's style guide is literally just the statement "use eslint", and I have to do code reviews...we will start to have problems.1
-
When you've got your first job as a junior dev with a company of 5 people, but don't have a mentor and don't really want to pay £12/hr for one.
Eslint + airbnb is the closest I have to a mentor.3 -
CAN NODEJS KINDLY GO FUCK ITSELF?
well maybe not node itself, but those node js so-called "professional node developers"
WHO THE FUCK thought it was a good idea to pass about EVERY SINGLE ARGUMENT as a global variable so absolutely no code insights are available, eslint with THEIR eslintrc shows ABOUT ONE MILLION DIFFERENT LINTER WARNING and on top they commited the node_modules folder
-_-
I'm out.4 -
---Me coding away---
ESLint: Hey...
ESLint: Hey... don't-
ESLint: No I think-
Me: Not now bro! This is fine, I need to get this done.
---Months later I go back to clean some things up and I look to see what ESLint has to say----
ESLint:4 -
Continued from https://devrant.io/rants/918357
Made the switch
I think I'll be saying bye to Atom. VSCode seems to be far more snappier.
The transition was pretty painless too. Vim and eslint integration seems to work just fine.3 -
Being a front end developer and working in a team of motivated "full stack" developers sucks big time.
So, recently joined this new company with a very small project which just started, basically a cloud version of a really old desktop app. Few people from the team completely from the asp dotnet background decided the architecture few months before I joined in.
So, they did it something like this -
- mono repo dotnet project with VueJs app served within it (because that would be maintainable 😑)
- vue app served by pointing the built files through dotnet index file (simply because they didn't care about the gift to the front end world which is webpack or even had any knowledge about it 😑)
- added typescript because, u know it's cool 😑, without even knowing that they don't possess that team which know how to write the types (f***ers write classes for every payload object coz they don't know what interfaces are)
- no loader to load typescript, they are running tsc in watch mode and we have .js and .js.map for every .ts file in our project which some teammates are even pushing to repo
Recently, I added eslint with git hooks to the project so that everyone will at least stick to the coding standards. Now, to avoid the errors they are bypassing the git hooks by uninstalling the library and then installing it after the commit😂😂
Then we have a girl who uses document.getElementById to programmatically change styles in a Vue project😑😑😑😂
Then we have dotnet people using dotnet coding conventions all over the front end app.
People, how do I deal with these so called "full stack" people?12 -
Well all thanks to JavaScript . The problem of the century was gone i.e missing semicolon . And still I see people put semicolon:true in eslint ... well what's the point of removing it in the first place then .3
-
Senior colleague wants to remove eslint from a project, it keeps giving him errors when his lines are several hundred characters long 😐13
-
Boss assigned code cleanup to me. We put up eslint and fixed a couple of issues, all nice and cute. Now, he wants me to find any redundant code and remove it (redundant fields in config objects). Sounds doable right?
WRONG!
Because we're writing fucking ExtJS. This abomination that is still called a "web framework" in lieu of its former glory supports no typescript, no code intel, no JSDoc, no nothing. Absolutely heinous and deplorable. Add insult to injury, our code on it is even worse. NO single component reused except from a couple REALLY fucking badly written ones, because every component queries for shit outside its jurisdiction so it's all a dependency spaghetti. Everything else is just copy-paste. Barely anything works as intended anymore in this bloody joke of an app.
I tell him in a meeting, I can prepare an automated solution. Some script or something that runs on a file watcher. All nice and dandy. A weekend and a Monday later, I get tired and do something else to clear up my mind. Show him some progress in that other thing. He's like:
Boss: that's good and all but did you remove *insert misused config that got everywhere during copy paste* like I told you to?
Me: I'm still working on it. I switched cause I got tired a bit with the automation.
Boss: automation?
Me: We were talking about in the meeting. *Explains again*
Boss: That's not what we agreed upon
Mfw I've been rambling uselessly on the meeting about it just for you to put me down and make me remove all that copy pasted GUNK from the melting hot garbage that is our codebase BY HAND? All the 150 occurrences of it? What do you think I am, a fucking robot?2 -
principle software developer who does not code, design, or architect,
instead, do random eslint fixes which create conflict with everyone's branches.
1 line of code "fix" per commit.
there goes 26 commits1 -
Looks like ESLint is all confused about my tabs and spaces. I've never seen this kind of error message where it expects the tabs to be the same number as the spaces indentation? I have it configured for 1 tab = 2 spaces.
So confused. Must fix. Red squiggles make my blood hurt.7 -
Atom to VSCode, should I do it? I'm assuming it is Linux friendly.
Need it to lint using am eslint config.8 -
I actually do have something to rant about!
The people I've decided to work with... are complete and utter fools. They don't want to keep updated with new practices and merely talk about awesome stuff... Let me elaborate.
The first person is someone I spent really many hours just writing with, I've helped him build on his personal project, which has now become our project (which I've done most of the work on now). He keeps writing about things that aren't fucking relevant for the current task - furthermore, he completely refuses to use any type of collaboration software in order to keep an eye on tasks we want to, and already have completed. He likes Git but doesn't provide helpful git messages, sometimes even stuff like 'forgot this'.. never any freaking description of what's actually been done! Not even after agreeing it should be done, he just doesn't understand what a helpful message is apparently.
I might be a bit special regarding wanting to follow practices, but how the fuck do you make any amount of money by being so ignorant!? He was a WP 'developer' a while ago, and has since changed to JS and are using a framework which he doesn't understand - he can't even remember what the documentation states.
So why do I 'work' with him? He knows a lot of phrases he's read in books, blogs, and the likes. That makes him really inspirational and positive and he really wants to become successful(like me!). But over the last few months, I've realized how bad he is at programming - he doesn't know basic programming concepts and have a hard time applying any sort of knowledge to his programming. If it's not pre-built, he can't use it, not even if the documentation has specific examples. He barely grasps the concept of binding data to a variable. He wouldn't know how to access it again though, it's just for the sake of binding it to some existing functionality.
The other guy really likes his old style. He hired me to maintain some application. Which has turned out to be a hell of several small tasks he needs to be finished or reworked - with no clear definition of the task. Most of the time, he'll do some initial changes, show the changes to me, vaguely explain what they do (not what he's trying to achieve) and first THEN ask me to do these changes, most often in some files that don't exist (he uses the wrong filenames so I have to guess/ask where the changes need to be made).
To top it all off, old syntax is used and don't get me started on the spaces+tabs for indenting lines... Because I've already added a great ESLint+Prettier conf and everything should be nicely formatted according to pre-defined rules.
But he won't take the time to install some plugins in his editor and I'm left with sometimes buggy, badly formatted code (the code I have to make changes with!) - that's while he several times have agreed that I can do what I want and that he even questions his own ways when looking at my changes which he calls by-the-book.
So why the motherfucking fuck do I keep working with him?
Well, he keeps paying so that's really nice - I haven't been able to properly execute the bigger tasks(which pays more) though, due to a lack of information or some badly written code I couldn't quite figure out how works (at a glance).
He also keeps talking about these new projects he wants to make.. he even has these freaking papers with descriptions and data-structures and we converse really good about these new awesome projects. He also likes cryptocurrencies(which is an interest of mine he has inflamed quite a bit) and lastly, he seems like a genuinely nice guy who I'd like to spend some time with even besides coding and work.
So now I stand here - stuck with people that make me feel like a demi-god or something because I use a git style-guide and ESLint+Prettier with the Airbnb style-guide.
What should I do? I'd really like some remote work and have a desperate need for money... So much so, that I might even have to pick up a fulltime job, in order to save my sorry ass - all because I like speaking with people who just like the thought of programming...
I'm actually quite lonely with my thoughts and they are the two only people I've had some sort of relationship with - who has an invested interest in programming/dev... I really like that, despite having to follow their thoughts as they surely can't follow mine.
Please be my friend or give me some paid work lol.
Also, I've been moving the last couple weeks - those weeks has been the most stressful of my life and have not contributed to my overall wellbeing and relations with people... It's good to be back at the computer again and be reading some devRant though!1 -
A former team lead decided the team should review any open PR before proceeding with their own tasks after their breaks. Any open PR also meant reviewing refinements in an ongoing discussion. Several times, we wasted time for review, coding, and discussing when the second reviewer asked to revert the changes introduced according to the requests of the first reviewer.
Now as a freelancer, in smaller projects, I sometimes have no coworkers to review my code. So, apart from testing, I try to pay more attention to linters, static code analysis and automated coding assistance. I have stylelint, eslint, SonarLint, and possibly some more IDE inspections. For the infamous popular blogging software, I also have a so-called PHP code sniffer that checks all PHP and JavaScript code for compliance with the WordPress coding styles, so finally, I got the team experience back: SonarLint suggests removing unnecessary spaces and reformating my code, which in turn makes PHPCS complain that the code violates the legacy code style. -
Yeah, making rockets is hard and all but have you tried correctly integrating eslint-prettier settings with your IDE settings..5
-
Setting up ts linting is a pain in the ass..
Until you realize you could try to reload the window. So your settings actually pick up you know.. -
Context:
I recently joined a team and we are working on a fairly large mobile app using RN, they started a month ago. And I noticed, they don't have any fucking tests and static typings like Typescript.
I have this pretentious team leader that acts like he's the BeSt dEveLopEr in ThE woRld, and act like he always know what he's doing. But in reality, he code like crap, the formatting is shit because the ESLint config is not working, he's not even aware of it until I've fixed it. He's using every BAD Practice available, unused variables and imports are scattered everywhere, etc. And the directory structure is crap and no consistency.
How can I convince this ignorant mofo to use tests and typescript? He believes that adding those will take us longer and cost more money to the client, based on my experience, this is not the case, it's only slow on the first 2 weeks and it is worth it in the long run.13 -
Fuck you eslint:
* Missing semicolon.eslintsemi
* Unnecessary semicolon.eslint@typescript-eslint/no-extra-semi4 -
The adventurous world of javascript and typescript never ceases to amaze me.
I'm investigating some paths to take for migrating this legacy project which has incurred some technical debt. Because of... reasons... even the frontend Vue project needs to be built on a Windows system. No, you can take your hands down, even wsl or docker aren't alternatives here. It's a long story and ties in with said debt.
I'm keen on rebooting the entire frontend using a newer Vue cli and scaffold up all the essentials like eslint and typescript which is currently not used. This is gonna be sweet.
Except, typescript (BY Microsoft) doesn't play well on a Windows (BY Microsoft) filesystem because of a recent change to support - get this - wsl. I can't decide if it's hilariously ironic or genius.
This response about sums up my current mood. https://github.com/Microsoft/...
Of course, further digging in other repos like node only turns up issues closed due to it being on Windows' end.
So now my readme has a troubleshooting section describing how to make changes to your filesystem if you run into issues in Windows and I want to go home.6 -
Setting up eslint is driving me nuts.
This shit never works for me.
Every two months:
I read why eslint is important to have in development workflow. I get convinced of it's benefit. I decide to give it few hours to do this correctly this time.
3-4 hours passby, still nothing. I run into problems that only I face. My vscode setup is a complete mess now. My code formatter wants one way if writing code which eslint doesn't like for some reason.
Fuck this shit.
Am I the only one?3 -
Why the fuck why are tslint and prettier are always sucking their dicks and fuck each others asses.
Do you know this moment when you think:.... 🤔 They have millions of downloads, why do I bother formatting my code so much. Mabye all this people are smarter and saving so much time.
Then you set up eslint and prettier adjusting 10000k rules just to find eslint and prettier five minutes later in one file fucking their asses again how to indent on save😠😱7 -
I'm sorry, but who thought eslint or any linters for that matter were a good idea.
Started a new vue project using the cli, installed tailwind... oh what's that you don't like the line length... get out of here. It's an SVG and using a class-based framework. The hell.
Any way of removing eslint? I just want to code and not get bs warnings because of an svg length or because I add one to many classes.16 -
Got a guy trying to convince bosses of enforcing ESlint rules or whatever
This is the same guy that came into our repository forcing this shit on every single file he touched, when we had a different, established style
I shouldn't have let his new style enforced by ESlint defaults pass the first time in code review
Like, WHY the fuck do you want to be the enforcer of styles when you started shitting on what was there in the first place
Jesus fucking Christ5 -
Oops! Something went wrong! :(
ESLint: 8.57.0
TypeError: require(...).pathToFileURL
Did someone move fast and break things again? -
Me to team: eslint-plugin-import is tripling the time it takes to lint our project (literally adding minutes to the linting process). Do we really need it?
Boss: what does it do?
Me: ensures import paths are correct; reorders imports; ...
Teammate: imports should NEVER be reordered!
*cue debate about reordering imports that is still raging - my question is never answered*5 -
Biggest annoyance when working with JavaScript ?
Overconfigured ESLint.
Space here NOT allowed!
Mandatory here, forbidden there.
COME ON! -
I don’t know if I’m fucking stupid but ESLint is so unbelievably hard to setup. Too many fucking plug-ins, configs and rules. All I want is my Airbnb config on my React Typescript project and nothing else. I can’t even fucking get that sorted. Not to mention the hundreds of Medium tutorials that all do things just slightly differently to the point that I can’t mix and match a config.2
-
We decided to use ESlint as our style guide. Then comes this guy and starts adding exceptions. Dude if you keep adding exceptions, there's no need for a guide anyways.
-
About a year ago I had the great idea to enforce ago I had the great idea of proposing that we all lint our legacy code base using eslint to increase the overall quality of our JS.
I distributed the task of initially fixing all the errors eslint would find to the whole Frontend team (Luckily we only use JS there). I've finished my part in a couple of weeks and came across this piece of spaghetti.
One of the guys who has been with the company for over 10 years said, that the guy who wrote this monster was very proud of it...
In case you cannot understand what this does: It calculates the distance between 2 points on earth.9 -
Why does React have dependency arrays in all hooks if they basically always need to be filled with every single dependency? Just figure this shit out yourself, eslint can do this, why can't react?1
-
Trying to update and add to my skills. Let's try angular,. Visual Studio sucks for this. Hey look vs code, this looks great.... Install, add some recommended extensions... Cool. Add eslint, hey look at these errors awesome I'm getting somewhere. WTF dont use var use let.. Ok why... Hours later and one drink, okay that makes sense. Change code.....
Unexpected declaration wtf why. Switch to var... Dont use var..... Fuck me... Google, read, google, read...... Wtf why why why won't this fucking work... I just want to code something using best practices2 -
JavaScript still doesn't have proper types, but eslint insists that I should use let and const instead of var. Thanks for the hint, but when I care to code properly, I will use TypeScript, otherwise I don't care.
Wish the warnings in my editor would be more helpful with less noise by default, without taking time and effort to tune their settings.8 -
i dont know npm
today i learned `npm install` in root project directory doesn't do what running `npm install` in a subdirectory that actually has a package.json
in this case there was no package.json at the root project directory if it matters
shoutout to fucking eslint not telling me to try installing the fucking packages it can't fucking find, as im a monkey who doesnt know what their doing
well i suppose this is irrelevant since there's yarn, gulp, webpack or whatever is the new hot front end package manager thing1 -
I need help structuring a new TypeScript project built on a MERN stack. I used CRA for the client, so I opted to have separate tsconfig files -- one for client (auto-generated by CRA) and one for server (extends node12 tsconfig). However, I'm trying to setup eslint and prettier globally so that the lint/style rules are uniform across the codebase. CRA adds an eslint config that extends react-app, which is fine, but I'd like to still have my global rules. I have written my eslintrc.json file and am happy with it, so I placed it in the project root directory. I figured I would install eslint, prettier, etc. in the project root, then when I run eslint globally, it would lint the server code with the global rules and the client code with the global rules and the react-scripts rules.
However, react-scripts complains that I've installed a newer version of eslint in a parent directory. I can either ignore that rule or use the same version as react-scripts, but it seems like react-scripts is going to run eslint on its own when I run npm start, regardless of if I have a global config. What should I do? Is there a better way to structure the app?1 -
Is there any tool that generates an eslint config interactively? E.g. I would start off with airbnb style (but not required) and then toggle different options and see what changes and what will be highlighted. In the end I can save the config. I know eclipse provides such a wizard for java, but haven't found an equivalent one for JS/TS. Anything better than ESLint playground?1
-
student: eh, eslint is only to enforce our code to be more readable to you, you're a lazy teacher!
*sigh*2 -
Anyone know of a good non-opinionated ESlint default config that does a little more than eslint:recommended? I find eslint-config-airbnb-base & eslint-config-standard to be way too annoying and restrictive1