livewire / livewire/volt

Pint won't fix/format Volt files.

Open
#139 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
423
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Volt Version

1.7.1

Laravel Version

12.21.0

PHP Version

8.4.11

Database Driver & Version

sqlite 3.46.0

Description

pint.json isn't working with volt.

Steps To Reproduce

config a base pint.json

{
    "preset": "laravel",
    "rules": {
        "array_syntax": true,
        "assign_null_coalescing_to_coalesce_equal": true,
        "binary_operator_spaces": {
            "default": "at_least_single_space"
        },
        "blank_line_after_namespace": true,
        "blank_line_after_opening_tag": true,
        "blank_line_between_import_groups": true,
        "blank_lines_before_namespace": true,
        "braces_position": {
            "allow_single_line_empty_anonymous_classes": true
        },
        "class_definition": {
            "inline_constructor_arguments": false,
            "space_before_parenthesis": true
        },
        "clean_namespace": true,
        "compact_nullable_type_declaration": true,
        "constant_case": true,
        "control_structure_braces": true,
        "control_structure_continuation_position": true,
        "declare_equal_normalize": true,
        "elseif": true,
        "encoding": true,
        "full_opening_tag": true,
        "function_declaration": true,
        "heredoc_indentation": true,
        "indentation_type": true,
        "line_ending": true,
        "list_syntax": true,
        "lowercase_cast": true,
        "lowercase_keywords": true,
        "lowercase_static_reference": true,
        "method_argument_space": {
            "attribute_placement": "ignore",
            "on_multiline": "ensure_fully_multiline"
        },
        "new_with_parentheses": true,
        "no_blank_lines_after_class_opening": true,
        "no_break_comment": true,
        "no_closing_tag": true,
        "no_extra_blank_lines": {
            "tokens": [
                "use"
            ]
        },
        "no_leading_import_slash": true,
        "no_multiple_statements_per_line": true,
        "no_space_around_double_colon": true,
        "no_spaces_after_function_name": true,
        "no_trailing_whitespace": true,
        "no_trailing_whitespace_in_comment": true,
        "no_unset_cast": true,
        "no_whitespace_before_comma_in_array": {
            "after_heredoc": true
        },
        "no_whitespace_in_blank_line": true,
        "normalize_index_brace": true,
        "nullable_type_declaration_for_default_null_value": true,
        "octal_notation": true,
        "ordered_class_elements": {
            "order": [
                "use_trait"
            ]
        },
        "ordered_imports": {
            "imports_order": [
                "class",
                "function",
                "const"
            ],
            "sort_algorithm": "none"
        },
        "return_type_declaration": true,
        "short_scalar_cast": true,
        "simple_to_complex_string_variable": true,
        "single_blank_line_at_eof": true,
        "single_class_element_per_statement": {
            "elements": [
                "property"
            ]
        },
        "single_import_per_statement": {
            "group_to_single_imports": false
        },
        "single_line_after_imports": true,
        "single_space_around_construct": {
            "constructs_followed_by_a_single_space": [
                "abstract",
                "as",
                "case",
                "catch",
                "class",
                "const_import",
                "do",
                "else",
                "elseif",
                "final",
                "finally",
                "for",
                "foreach",
                "function",
                "function_import",
                "if",
                "insteadof",
                "interface",
                "namespace",
                "new",
                "private",
                "protected",
                "public",
                "static",
                "switch",
                "trait",
                "try",
                "use",
                "use_lambda",
                "while"
            ],
            "constructs_preceded_by_a_single_space": [
                "as",
                "else",
                "elseif",
                "use_lambda"
            ]
        },
        "single_trait_insert_per_statement": true,
        "spaces_inside_parentheses": true,
        "statement_indentation": true,
        "switch_case_semicolon_to_colon": true,
        "switch_case_space": true,
        "ternary_operator_spaces": true,
        "ternary_to_null_coalescing": true,
        "trailing_comma_in_multiline": {
            "after_heredoc": true
        },
        "unary_operator_spaces": {
            "only_dec_inc": true
        },
        "visibility_required": true
    }
}

run pint with .\vendor\bin\pint

resources\views\livewire\users\index.blade.php won't get touched.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with .\vendor\bin\pint and the provided pint.json configuration. Inspect how resources\views\livewire\users\index.blade.php is discovered and passed to Pint; done means the file is formatted according to the configured rules, with a regression check for this case if the project has a relevant test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.