Giter VIP home page Giter VIP logo

Comments (19)

Khanhtran47 avatar Khanhtran47 commented on May 29, 2024 1

@ctuanle done with b953cd4

from sora.

ctuanle avatar ctuanle commented on May 29, 2024 1

@Khanhtran47

vậy thống nhất dùng chấm phẩy nha

  • nếu m dùng vscode, thích thì để t push .vscode/settings chung lên luôn, kiểu format on save, fix on save đồ rứa ?

from sora.

ctuanle avatar ctuanle commented on May 29, 2024

image

@Khanhtran47 What are these weird looking errors 😅 ?
m chạy lint cho hết lỗi rồi push lên lại thử

ps: cài thêm "eslint-config-airbnb-typescript" nữa k eslint nó k biết

from sora.

Khanhtran47 avatar Khanhtran47 commented on May 29, 2024

@ctuanle ủa sao tối qua t run xong k bị lỗi chi cả nơi -.-

from sora.

ctuanle avatar ctuanle commented on May 29, 2024

@Khanhtran47 run chi, yarn dev á hay yarn eslint ?

from sora.

Khanhtran47 avatar Khanhtran47 commented on May 29, 2024

@ctuanle k eslint nó tự tìm lỗi luôn, t nhớ k thấy lỗi chi cả :v m thử thoát vscode sau vào lại thử

from sora.

ctuanle avatar ctuanle commented on May 29, 2024

@Khanhtran47 vậy à, t cx chịu nơi 🥴

image

nguyên cây bên develop, code vẫn chạy bình thường, đều nếu chạy eslint kiểm tra lỗi thì ra lỗi thiếu "airbnb-typescript" như này, IDE k hiện lỗi đỏ.
Nhưng nếu cài cái "airbnb-typescript" này vào thì chạy ra lỗi khác, với IDE hiện lỗi đỏ như hình ban nãy

@ctuanle k eslint nó tự tìm lỗi luôn, t nhớ k thấy lỗi chi cả :v

có thể IDE k hiện lỗi, nhưng chạy eslint cho chắc

from sora.

Khanhtran47 avatar Khanhtran47 commented on May 29, 2024

@ctuanle ừ để tối về t xem lại, m khoan lại merge develop vô branch

from sora.

ctuanle avatar ctuanle commented on May 29, 2024

ukay 👍 , thấy chạy yarn eslint --fix nó cũng sửa gần hết đều để m làm cho chắc

from sora.

Khanhtran47 avatar Khanhtran47 commented on May 29, 2024

@ctuanle m fix đc luôn thì cứ fix đi 😅

from sora.

ctuanle avatar ctuanle commented on May 29, 2024

@Khanhtran47 cũng được 🥲, đều fix xong là nó có chấm phẩy "semi", và t không biết làm răng để tránh cái ni cả, thấy m code không để dấu chấm phẩy

đã thử thêm "semi": ["error", "never"], thì nó hiện ra 2 lỗi khác nhau, 1 lỗi vì răng không có ";", lỗi kia vì răng lại có ";" :v

from sora.

Khanhtran47 avatar Khanhtran47 commented on May 29, 2024

@ctuanle à bth t thêm chấm phẩy cả nơi, do prettier nó format xóa hết chấm phẩy

from sora.

Khanhtran47 avatar Khanhtran47 commented on May 29, 2024
  • nếu m dùng vscode, thích thì để t push .vscode/settings chung lên luôn, kiểu format on save, fix on save đồ rứa ?

@ctuanle t có file setting riêng rùi nơi, m thêm 1 file .prettierrc là đc rồi

from sora.

ctuanle avatar ctuanle commented on May 29, 2024

@Khanhtran47 có một số lỗi mà phải sửa code đáng chú ý như này:

react/function-component-definition
image
đổi thành dùng keyword function

no-empty-interface/
image
comment dòng này và tạm thời bỏ một số code k cần thiết

không biết thư mục api này làm gì, check k qua nên tạm thời bỏ thư mục này vào ignorePatterns
image

cái trailing comma bỏ cũng lỗi mà không bỏ cũng lỗi nên chuyển thành "all" luôn

from sora.

Khanhtran47 avatar Khanhtran47 commented on May 29, 2024

@ctuanle
ủa bth typescript mà arrow function t toàn viết kiểu rứa cả mà lần đầu thấy rule ni luôn :v
mấy cái empty thì cmt lại sau xài thì mở cmt
thư mục api nớ của sẵn trong template thằng kia á, m xóa luôn đi :v
trailing comma thì chắc prettier nó format hết cả nơi, k sao mô

from sora.

ctuanle avatar ctuanle commented on May 29, 2024

@Khanhtran47

ủa bth typescript mà arrow function t toàn viết kiểu rứa cả mà lần đầu thấy rule ni luôn :v

t cx chịu nơi, chắc do extends nhiều quá, thấy có một chỗ mà tận 3 4 dòng show lỗi :v

trailing comma thì chắc prettier nó format hết cả nơi, k sao mô

ừm đều eslint nó hiện lỗi nên t đổi r

from sora.

Khanhtran47 avatar Khanhtran47 commented on May 29, 2024

@ctuanle k xài đc arrow function với typescript đc à 😥

from sora.

ctuanle avatar ctuanle commented on May 29, 2024

@Khanhtran47 😅 chắc được chứ, tìm rule để set lại chắc dùng đc

ơ mà nó chỉ áp dụng vô react functional component thôi, mấy chỗ khác dùng đc

from sora.

ctuanle avatar ctuanle commented on May 29, 2024

@Khanhtran47 t có chỉnh lại rule ở đây a2f4ef6

đều như vậy thì nó force mình dùng mỗi arrow function cho mọi react FC nên m muốn set rule lại thành "warn" hay "off" gì cũng đc

from sora.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.