Enable Vue attribute formatting rules without changing rendered behavior

Đang mở
#9,499 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
70/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript

Hướng nghiên cứu

Start in eslint.config.mjs under the libresign/disabled-during-migration block and remove only the 'off' entries for vue/first-attribute-linebreak and vue/max-attributes-per-line. Run the dry-run layout preview on src/**/*.vue and check that the proposed edits only split or join attribute lines. Done when both rules are enabled, the diff changes only attribute layout, and npm run lint, npm run ts:check and npm run build pass.

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

Mô tả

frontend good first issue help wanted javascript technical debt

Goal

Enable two Vue template attribute-layout ESLint rules without changing HTML content, component behavior or visible UI. The work is layout-only and uses the existing ESLint preset and autofix workflow.

Rules

  • vue/first-attribute-linebreak (historical estimate: ~435 hits)
  • vue/max-attributes-per-line (historical estimate: ~68 hits)

Counts are historical and may overlap; measure the current main before starting.

Good first issue

Start at eslint.config.mjs, inside libresign/disabled-during-migration, and at existing .vue templates under src/. This is similar to the merged formatting contribution in #9145. You do not need to design a Vue component, change business logic or modify APIs. Check ongoing work and discuss a genuine ambiguity with maintainers; no advance permission or assignment is required.

Step-by-step implementation

  1. Create a branch based on the latest main and confirm a clean working tree.

  2. Verify the effective Nextcloud preset options for both rules. Remove only their 'off' entries from eslint.config.mjs and leave their preset severity unchanged.

  3. Preview layout-only fixes without changing files:

    npx eslint 'src/**/*.vue' --fix-dry-run --fix-type layout \
      --format json > /tmp/eslint-vue-preview.json
    
  4. Record the current warning/error count and files affected. If the preview is limited to attribute line breaks and formatting, apply:

    npx eslint 'src/**/*.vue' --fix --fix-type layout
    
  5. Review git diff -- src/ eslint.config.mjs. Confirm changes only split/join attribute lines or adjust harmless layout. Verify every attribute name and value, Vue directive, binding expression, aria-* value, slot, event, selector and visible text is unchanged. Revert unrelated fixes produced by other already-enabled rules.

  6. Keep rule-specific commits separately reviewable with valid DCO sign-off. If a fix for one rule overlaps the other, explain the overlap rather than manufacturing meaningless edits.

  7. Open one focused PR linking this issue. Report the changed-file count, before/after ESLint diagnostics and executed checks.

Verification

git diff --check
npm run lint
npm run ts:check
npm run build

Run npm test or the focused Vitest tests for any modified component whose rendering behavior needs verification. If a change unexpectedly affects rendered markup, include a sanitized screenshot or short video and request review before claiming success. A screenshot alone does not replace automated tests.

Done when

  • Both layout rules inherit the intended Nextcloud preset options and applicable violations are resolved.
  • Only attribute layout changes; props, slots, events, directives, CSS classes, accessible labels and user-visible text remain identical.
  • The PR includes a reviewed diff, current diagnostics, file count, appropriate passing checks and signed-off commits.
  • No generated code, translations, tests' assertions, new dependencies or unneeded suppressions are introduced.

Out of scope

Do not enable vue/attribute-hyphenation, event/slot casing rules, component-renaming rules, or introduce unrelated template refactors.

Additional context

Development workflow: https://docs.libresign.coop/developer_manual/development-workflow.html
Questions and community support: https://t.me/LibreSign

Ngôn ngữ chính
PHP
Star
844
Fork
176
Merge trung bình
14 giờ 3 phút
Pull request đã merge (30 ngày)
344

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của LibreSign/libresign

Tất cả issue của LibreSign/libresign

Issue tương tự

Thêm issue về PHP

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.