ESLint + Prettier + VS Code - The Perfect Setup

  Рет қаралды 154,583

Wes Bos

Wes Bos

5 жыл бұрын

Package and docs available on github here: github.com/wesbos/eslint-conf...
Entire course available at es6.io

Пікірлер: 129
@WesBos
@WesBos 5 жыл бұрын
Y'all should smash that subscribe button, eh?
@joostschuur
@joostschuur 5 жыл бұрын
Why would I break it? Doesn't that keep me from being notified about new videos?
@davidhahn7391
@davidhahn7391 5 жыл бұрын
Keep making content, Wes! You make great videos!
@JonesDTaylor
@JonesDTaylor 5 жыл бұрын
Just did. Your plugin gave me superpowers man. Thank you so much.
@khalidskiod
@khalidskiod 5 жыл бұрын
just did it
@shafu_xyz
@shafu_xyz 4 жыл бұрын
how do you format html css etc?
@addyprogger7414
@addyprogger7414 5 жыл бұрын
I always get so confused with all these setups, thank you Wes. Excellent videol.
@SchoolforHackers
@SchoolforHackers 5 жыл бұрын
Nice production and explanation style, WesBos!
@devaccount4078
@devaccount4078 5 жыл бұрын
Thanks Wes for the updates about this very point.
@CerealTuesday
@CerealTuesday 5 жыл бұрын
Top video Wes, superb tips for a great setup, thanks very much for sharing 👍
@mahathirmohammad8635
@mahathirmohammad8635 9 ай бұрын
after 4 years this video is still useful. his library is still updated. it is very rare as a open source library by an individual.
@6Santini
@6Santini 5 ай бұрын
Man this is so helpful. Thank you Wes Bos
@christianjurt
@christianjurt 5 жыл бұрын
This help a lot. Thanks for the great video.
@SebastianPerezG
@SebastianPerezG 5 жыл бұрын
You are BACK !!!
@macokaba1964
@macokaba1964 5 жыл бұрын
Thanks a lot Wes! Great video
@ThomasFaller
@ThomasFaller 5 жыл бұрын
Great video thanks Wes!
@aks9842
@aks9842 2 ай бұрын
Life saving video, thanks alot bro ❤
@yeayeaof87
@yeayeaof87 5 жыл бұрын
My favorite guru!
@nano3546
@nano3546 5 жыл бұрын
Great job again Wesbos. Do you plan to make any video about React Hooks, loves your teaching and explaining styles.
@rounakjain5774
@rounakjain5774 4 жыл бұрын
So valuable, thanks!
@lcswillems
@lcswillems 4 жыл бұрын
Thanks a lot for sharing this!!!
@joestrkr
@joestrkr 5 жыл бұрын
Good stuff! I was fighting last night to get eslint to work with typescript. There are some additional plugins that need to be installed and configured but what ended up missing was the vscode setting "eslint.validate": ["javascript", "typescript"]. It's weird that this setting is not necessary for plain JS.
@themassagechair6785
@themassagechair6785 5 жыл бұрын
Question: Having followed the instructions in the video, I've noticed that eslint.autoFixOnSave doesn't work with typescript. This confuses me, as it works just fine for javascript-files and npm run lint:fix can format the typescript-files just fine. I have tried turning editor.formatOnSave off for typescript, but eslint.autoFixOnSave still doesn't work. Any tips?
@fgary
@fgary 5 жыл бұрын
Thank you 🙌
@jonatanramhoj
@jonatanramhoj 2 жыл бұрын
Great video thanks a lot. So much hokus pokus going on behind the scenes tho with all that extends stuff... Is that "bloat" needed?
@TheAditya64
@TheAditya64 4 жыл бұрын
The packages installed are outdated in October 2019. Should I update it or leave it the way they are in their current version ?
@alexeymind
@alexeymind 5 жыл бұрын
Just awesome!
@prashantrawal3765
@prashantrawal3765 5 жыл бұрын
Awesome Wes...i made a repo for myself too
@es_pythondevelop7981
@es_pythondevelop7981 5 жыл бұрын
thanks man you save my live
@personal1935
@personal1935 3 жыл бұрын
Many thanks for your awesome explanation and eslint configuration, I am wondering how is possible to add eslint.ignore and some more setting for Prettier and Prettier.ignore and finally some more setting for stylelint into your eslint-config-wesbos?
@TejoAgus
@TejoAgus 4 жыл бұрын
How do you do to make Prettier not change your quotes? I want it to respect double or single as I write them, but it seem to be all single or all double from config
@peterborinski
@peterborinski 5 жыл бұрын
Thank you for the video, but you are not going into how to use this with create-react-app (and I think a lot of people would like es-lint with create-react-app). CRA ships with an eslint config; how would you get that to work? And would you use it in conjunction with your package here?
@cis84muz
@cis84muz 5 жыл бұрын
That is valid question. I love this Wes config, but is it worth ejecting CRA? 🤔
@dazecm
@dazecm 3 жыл бұрын
When using CRA I find it's best to avoid having any eslint versions explicitly specified in the project package.json. It's best to simply focus on getting Prettier and the Prettier eslint configs and plugin packages installed and working with whatever eslint version is baked into the CRA and used by its scripts.
@egorshumanskii8026
@egorshumanskii8026 4 жыл бұрын
are you serious? You said "we are going to build it from scratch" and then "Oh guys, I have prepared npm package..." What? Dis!
@julianklumpers
@julianklumpers 5 жыл бұрын
i haven't watch it yet, but still wanna say your videos/courses are awesome!
@WesBos
@WesBos 5 жыл бұрын
Thanks! Glad you enjoy them! Stay tuned for more!
@mikeonthebox
@mikeonthebox Жыл бұрын
Prettier would suggest to change a let to a const? I'm more confused now, I though that was a task for eslint.
@selftaughtfullstackjourney3460
@selftaughtfullstackjourney3460 3 жыл бұрын
smashed to subscribe button faster than npm package download speed
@UnboxTek
@UnboxTek 5 жыл бұрын
Thanks for sharing.
@MarkEdwardTan
@MarkEdwardTan 4 жыл бұрын
Hi Wes, I'm having a hard time trying to make this work in React that uses typescript. Can you create also ESLint + Prettier + VS Code + Create React App with Typescript + SASS ? Thanks :)
@adrianpopescu8956
@adrianpopescu8956 4 жыл бұрын
Hey, did you manage to set up your project? I just set up mine pretty much the same way.
@Viruhemanth
@Viruhemanth 5 жыл бұрын
Thank You So Much!!
@guilhermegirardi
@guilhermegirardi 4 жыл бұрын
Thanks, God, I mean, thanks, man! Holy shit... it really helped me!
@ebrelus7687
@ebrelus7687 2 жыл бұрын
Does it block prettier plugin's autofix on save? Does quokka work normally with this setup? Gonna try it after getting more advanced.
@GastonGarciaO
@GastonGarciaO 5 жыл бұрын
Thank you!
@denniszenanywhere
@denniszenanywhere 4 жыл бұрын
What do I do if I don't see a curly bracket in 10:42? Perhaps I have a newer VS Code? Where then do I put it if I don't see a curly bracket? If it's supposed to be on settings.json, where can i find this?
@Fideliiiis
@Fideliiiis 5 жыл бұрын
Is there a way for it to work with create-react-app without ejecting?
@manjunath-vadigeri
@manjunath-vadigeri 4 жыл бұрын
I like the font of the comments in the video. How to get it in VS Code ?
@_Amilio_
@_Amilio_ 3 жыл бұрын
Legendary 👌
@tubun09
@tubun09 5 жыл бұрын
you should release a video about this on SFC Vue component
@emilemilsson72
@emilemilsson72 3 жыл бұрын
Wes, Is there a way of doing this with svelte files aswell?
@rikkrome
@rikkrome 4 жыл бұрын
🙏Thank you!!!
@shusenacademy
@shusenacademy 3 жыл бұрын
Hi, what's the theme of your shell? I guess it's zsh ?
@MarfTaylor
@MarfTaylor 4 ай бұрын
In the following configuration is there a way to make it work only with the code I write, instead of editing the entire file (I am working on big project, and I want to leave the reset of the code untouched)
@iRafaelkr
@iRafaelkr 4 жыл бұрын
When I do the first step (npx install-peerdeps --dev eslint-config-wesbos), my package.json doesn't change (the list of devDependencies)..
@samuelkiroko8393
@samuelkiroko8393 4 жыл бұрын
hi hope well do you mind sharing your settings.json file for the vs code i really love it
@antoniocarlosroque5039
@antoniocarlosroque5039 Жыл бұрын
Riiiight on!!!!! Just one thing: how to set tab width to be 4?
@abdulghaniofficial
@abdulghaniofficial 5 жыл бұрын
Thanks ❤️
@dave2938
@dave2938 5 жыл бұрын
Hi; What Terminal App are you using?
@hadikhalili6675
@hadikhalili6675 5 жыл бұрын
I think it is hyper - hyper.is
@rolandmesaros6941
@rolandmesaros6941 5 жыл бұрын
When I run the npx install-peerdeps command I get the error "ENO such option --dev" ? and when I do it with --global instead I get o such file or directory 'global'
@boeggy6639
@boeggy6639 5 жыл бұрын
Hey Bos, on VS code terminal, we have 9 problem, is it normal?
@zbera97
@zbera97 4 жыл бұрын
That is what I am looking for.
@vincecaruso6465
@vincecaruso6465 4 жыл бұрын
This was a year ago, so I'm wondering if we still need to go through all this? I just download VSC, and prettier and it worked well for formatting, However when I added ESLint and the Prettier/ESL mode, it stopped formatting. Can you point me in the right direction (preferably starting from scratch on the whole thing)? - TIA
@andyo.4039
@andyo.4039 4 жыл бұрын
I'm also wondering if this is still relevant...
@Vapornator
@Vapornator 4 жыл бұрын
Could you please tell me how to go about and add the blue bar and color to the terminal window as you have on yours? I can see that as being helpful. Thank you! Great vid by the way.
@dazecm
@dazecm 3 жыл бұрын
That's a combination of color theme and fonts. Search for Powerline fonts and you should find guides to customising your terminal prompt.
@tomaszsare8521
@tomaszsare8521 9 ай бұрын
Thank you for persuading me to uninstall ESlint 👍
@expeng5861
@expeng5861 5 жыл бұрын
pretty fine.
@vizunaldth
@vizunaldth 4 жыл бұрын
thanks!
@ShreyasSegu
@ShreyasSegu 4 жыл бұрын
Tslint+prettier setup too please!
@lysy071990
@lysy071990 4 жыл бұрын
Can you make an update of this video? Some of these settings aren't already supported.
@7huannp
@7huannp 4 жыл бұрын
Could you create a new tutorial for typescript react?
@dreznik
@dreznik 3 жыл бұрын
does this work for front end (non-npm)?
@vincesanchez7790
@vincesanchez7790 3 жыл бұрын
Does this work on create-react-app with Airbnb style
@PerfectSwingDance
@PerfectSwingDance 5 жыл бұрын
How to install class property proposal?
@jakegyllenhaal7220
@jakegyllenhaal7220 5 жыл бұрын
How can I use this with a react app? It won't launch due to a conflict between the eslint versions required
@WesBos
@WesBos 5 жыл бұрын
Hrmm - I don't use CRA but I will take a look. I thought it worked fine because of this → github.com/wesbos/eslint-config-wesbos/issues/9
@cris19951000
@cris19951000 5 жыл бұрын
create a .env file in the root and add SKIP_PREFLIGHT_CHECK=true
@theouterbrackets
@theouterbrackets 5 жыл бұрын
Or you can delete ESLint from the dev dependancies, then delete package.lock/yarn.lock file and node modules, then run npm install again
@theouterbrackets
@theouterbrackets 5 жыл бұрын
@@cris19951000 This is maybe what you need, but remember the pre-flight checklist is there for your benefit.
@theouterbrackets
@theouterbrackets 5 жыл бұрын
@@WesBos is there a reason you don't use CRA? Don't like it?
@aidanwalker7136
@aidanwalker7136 3 жыл бұрын
will this work with a react app if i follow this?
@SajidAliSoftwareEngineer
@SajidAliSoftwareEngineer 4 жыл бұрын
how you add a border around the terminal
@yoandyvillaman2790
@yoandyvillaman2790 5 жыл бұрын
What is the name of the plugin that suggests the commands? like 6:59
@zuberab5405
@zuberab5405 5 жыл бұрын
github.com/zsh-users/zsh-syntax-highlighting
@yoandyvillaman2790
@yoandyvillaman2790 5 жыл бұрын
@@zuberab5405 I mean that you complete the phrase you want to put, for example ls -a, you put ls and the terminal suggests the -a, bu thanks 😊😊
@zuberab5405
@zuberab5405 5 жыл бұрын
​@@yoandyvillaman2790 I am not sure there is a plugin for hyper but Upterm github.com/railsware/upterm does autocompletion you can also use zsh-autosuggestions github.com/zsh-users/zsh-autosuggestions
@WesBos
@WesBos 5 жыл бұрын
It's zsh-autosuggestions for ZSH
@mehrdad-ai
@mehrdad-ai 5 жыл бұрын
Wes I have a question. Do you code also as freelancer/employee? Or you devote all of your time teaching coding?
@WesBos
@WesBos 5 жыл бұрын
I was a freelance consultant for about 10 years and made courses for about 6 of those - been just working on my own course platform and making courses full time for about 2 years now
@mehrdad-ai
@mehrdad-ai 5 жыл бұрын
@@WesBos Besides one's love for teaching others, do you think that's a good way to make passive income?
@WesBos
@WesBos 5 жыл бұрын
@@mehrdad-ai Its far from passive, but it is certainly a career option if you can build up the audience and know your stuff
@mehrdad-ai
@mehrdad-ai 5 жыл бұрын
@@WesBos Really appreciate your advice. would love to hear more about this career from you. would you choose it again? what would you have done differently? +1 if you too.
@Iamclawed
@Iamclawed 4 жыл бұрын
What’s the VSCode theme?
@szymonrojek6480
@szymonrojek6480 4 жыл бұрын
Guys how to stop overwriting let for const? Sometimes I want to change a value of variable, thanks :)
@myamoto-musasi
@myamoto-musasi 5 жыл бұрын
Hi, which terminal were you used.
@weslley39
@weslley39 5 жыл бұрын
hyper.is/
@WesBos
@WesBos 5 жыл бұрын
Hyper. Check wesbos.com/uses for more
@maskahleo
@maskahleo 5 жыл бұрын
how do lint one page at the time
@Diamonddrake
@Diamonddrake 4 жыл бұрын
I wonder if they know no-sweat is not a defendable trademark because it doesn’t have a clear separate meaning from its popular phrase usage
@selftaughtfullstackjourney3460
@selftaughtfullstackjourney3460 3 жыл бұрын
wes u don't extend into prettier, is it included in wesbos? where is prettier ?
@ZombiTV1
@ZombiTV1 5 жыл бұрын
hi, thnx for the video. Can u plz share ur hyperjs custom, thnx.
@johnnyelcoste
@johnnyelcoste 5 жыл бұрын
cool
@aram5642
@aram5642 2 жыл бұрын
with small exceptions (like indent or max-len rules), Prettier is not needed. You can have lint on save with just eslint.
@karishmashaik3590
@karishmashaik3590 2 жыл бұрын
How? Can you explain clearly, Thanks!
@sidokouki670
@sidokouki670 Жыл бұрын
they solve different problems though
@zieglmeierjakob
@zieglmeierjakob 2 жыл бұрын
Doesnt work for me. "Failed to load parser 'babel-eslint' ..."
@justpassingbylearning
@justpassingbylearning 5 жыл бұрын
What terminal are you using and what theme for it>
@munyafiction
@munyafiction 5 жыл бұрын
github.com/zeit/hyper
@expeng5861
@expeng5861 5 жыл бұрын
i want your vscode font-family....so ,i got it Operator-Mono
@YunisRajab
@YunisRajab 3 жыл бұрын
Global install don't work bos!!! Eslint 7??
@yadusolparterre
@yadusolparterre 2 жыл бұрын
Why don't you simply install the VSCode Prettier extension? Looks like it would be way simpler
@ikedacripps
@ikedacripps 3 жыл бұрын
why must i go through this stress just for set up??
@whiskers08spot09
@whiskers08spot09 Жыл бұрын
maybe because im using windows but of course it doesnt work after running $ npm run lint:fix
@timtitus7861
@timtitus7861 4 жыл бұрын
airbnb is too strict
@chuyelregio5
@chuyelregio5 5 жыл бұрын
that fucked up all my settings
@dom7019
@dom7019 4 жыл бұрын
npm run:fix just hangs.. does nothing.
@prsion1925
@prsion1925 5 жыл бұрын
Only (ESlint + Sublime_3) or PHPStorm !!!!! cause VScode is the piece of virus which permanently loads memory( 5-7 process each of them about 800 Mb)
@cis84muz
@cis84muz 5 жыл бұрын
PHPStorm to JS projects? I don't think so :P
@carlosmendez3363
@carlosmendez3363 5 жыл бұрын
You just need to download some more RAM bro!
@prsion1925
@prsion1925 5 жыл бұрын
@@cis84muz Why not??? WebStorm+PHP=PHPStorm exactly the same thing
@MarcelRobitaille
@MarcelRobitaille 5 жыл бұрын
Can't eslint already fix stuff? Why the need for prettier? Personally, I hate prettier and just write eslint rules.
VSCode ESLint, Prettier & Airbnb Style Guide Setup
22:40
Traversy Media
Рет қаралды 297 М.
Luck Decides My Future Again 🍀🍀🍀 #katebrush #shorts
00:19
Kate Brush
Рет қаралды 8 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 4,7 МЛН
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 68 МЛН
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 172 МЛН
Eslint и код-стайл для React-приложения
23:55
Михаил Непомнящий
Рет қаралды 44 М.
The Best VSCode Extensions 2024
9:29
Coding With Adam
Рет қаралды 292 М.
ESLint with VSCode, Prettier, Husky and React For Beginners
35:03
Improve Your Code With ESLint + VsCode + Airbnb Styleguide
13:19
Colt Steele
Рет қаралды 51 М.
You're (Probably) Using Prettier Wrong
6:04
Theo - t3․gg
Рет қаралды 100 М.
Mastering VIM Motions in VSCode (Mouseless development)
7:41
Configuring ESLint and Prettier for TypeScript
1:10:32
LogRocket
Рет қаралды 16 М.
ESLint Quickstart - find errors automatically
8:52
freeCodeCamp.org
Рет қаралды 141 М.
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 1,4 МЛН
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00
Корнеич
Рет қаралды 3,2 МЛН
YOTAPHONE 2 - СПУСТЯ 10 ЛЕТ
15:13
ЗЕ МАККЕРС
Рет қаралды 82 М.
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 373 М.