airbnb / airbnb/javascript

React eslint not catching the use of underscore with internal methods

Đang mở
#577 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
pull request wanted
Ngôn ngữ chính
JavaScript
Star
148k
Fork
26.6k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

In the [React/JSX Styleguide 'Methods' section](https://github.com/airbnb/javascript/blob/master/react/README.md#methods) it says you shouldn't use `_` to prefix internal methods. However, some of my code contains this convention and it isn't being caught by the linter. I double-checked the eslint rules for react/jsx files and there doesn't seem to be a rule defined for this convention.

Is this intentional? If so, why specify the rule in your documentation? I found a related issue (#490), but it wasn't clearly stated whether or not this rule should definitely be adhered to but rather that it's more or less up to the programmer.

Any clarification would be greatly appreciated.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu với phần “Methods” của React/JSX Styleguide trong react/README.md và kiểm tra các quy tắc ESLint hiện có dành cho các tệp React/JSX. Xem xét issue #490 liên quan và xác định xem quy ước underscore đã được ghi lại có nên được thực thi hay không; công việc được xem là hoàn tất khi đã quyết định một policy và thực hiện các thay đổi tương ứng về tài liệu hoặc linting.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
eslint, javascript
Lĩnh vực
documentation, tooling
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.