Prettier vs Eslint - Which One Is Better?

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ค. 2024
  • Learn correct Prettierrc configuration for any project. Prettier is the most needed tool that I use in every single project. It is an opinionated formatter that you almost don't need to configure. We will also talk what is the difference between Eslint and Prettier and which one is better.
    TIMESTAMPS
    0:00 Introduction
    0:26 What is Prettier?
    2:20 Prettierrc configuration
    5:19 Prettier vs Eslint
    6:12 Bonus
    ► CHECK MY COURSES - monsterlessons-academy.com/co...
    FOLLOW ME
    ► TWITTER - / monster_lessons
    RECOMMENDED VIDEOS
    ► My editor setup for web development - • Best Text Editor for W...
    ► Angular Tutorial for Beginners - • Angular Tutorial for B...
    ► Vue JS Crash Course - • Vue JS Crash Course fo...
    ► React Hooks Full Course - • React Hooks Tutorial f...
    ► Typescript Course for Beginners - • Typescript Crash Cours...
    ► Build a Todo App with Angular - • Build a Todo App With ...
    ► Creating custom select library - • Custom Javascript Drop...
    ► HTML Price comparison - • Practice CSS and HTML ...
    ► How to build Quiz with React hooks - • How to Build a Quiz Wi...
    MY COURSES
    ► NestJS course - • Nest JS Project From S...
    ► Docker + Docker compose course - • Docker Compose Tutoria...
    ► Angular + NgRx course - • Angular Course 2021 - ...
    ► Vue + Vuex course - • Vue Course With Projec...
    ► React hooks course - • React Hooks tutorial b...

ความคิดเห็น • 20

  • @boycovclub
    @boycovclub 2 ปีที่แล้ว +2

    You are the best teacher!

  • @khanafzal1343
    @khanafzal1343 2 ปีที่แล้ว

    Gone through some of your videos . Nice content
    👍👍.

  • @developer4818
    @developer4818 ปีที่แล้ว +1

    Is there any way configure prettier to format the html file even with errors?? For example to ignore errors like use of void elements like tag.

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  ปีที่แล้ว +2

      I don't think so. If it can't be parsed it can't be prettified. Also you always know that your markup is invalid when prettier doesn't format.

  • @damagee8141
    @damagee8141 ปีที่แล้ว

    Great video! I recently bought your NestJS course on Udemy and have to say that I enjoy your content a lot. I have one question regarding the prettier config. Do you have your config stored on your PC and just copy it into every new project or is there a better way to keep your configs consistent throughout different projects?

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  ปีที่แล้ว +1

      I'm happy that you like my content!
      I just copy prettier config from one project to another. If you want to share you want that it was bindded to your project so it work for any developer. You can't just extend some file from your machine this is why the most correct way would be to pack config in npm package which will be a dependency of every project. But then you need to manage it, publish, etc.

    • @damagee8141
      @damagee8141 ปีที่แล้ว

      @@MonsterlessonsAcademy Thanks. This makes a lot more sense to me now.

  • @PowWowVideo
    @PowWowVideo ปีที่แล้ว

    Hi, but what if it need to use eslint AND/with prettier ? does they conflicted together?

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  ปีที่แล้ว +1

      This is standard. They might have different rules so I prefer to use eslint without fix just to see warnings and prettier to format code.

  • @tamasmolnar4157
    @tamasmolnar4157 3 หลายเดือนก่อน

    Hi, ESLint 9.0.0 is out (breaking changes). If you have time/will, please make a video on ESLint and Prettier in a node.js typescript project (e.g. Nest.js).
    It would be really appreciated. Thanks in advance.

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  3 หลายเดือนก่อน +1

      I will add it to the list of ideas

    • @beastnighttv
      @beastnighttv 2 หลายเดือนก่อน

      ikr... eslint@v9 migration is giving me a hard time

  • @vishnuvardhanuppunuthula2789
    @vishnuvardhanuppunuthula2789 2 ปีที่แล้ว

    Which editor u are using.. if it's not vscode why not it.

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 ปีที่แล้ว +1

      Hi it's Vim, I have a whole video about that
      th-cam.com/video/YrLiugDhCuk/w-d-xo.html

  • @keyboardbasher5769
    @keyboardbasher5769 ปีที่แล้ว

    Thanks boss

  • @dvidsvijdsvijodsvijdsv
    @dvidsvijdsvijodsvijdsv 9 ชั่วโมงที่ผ่านมา

    okay, now configure it so it makes a line after each require. that's actually teaching stuff, everything else is just showing how to install an extension...

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  5 ชั่วโมงที่ผ่านมา

      You are missing a point. Prettier is an opinionated code formatter. It's goal is not to be configurable but to be suitable to everybody out of the box.