8000 Comparing nebulab:main...ubicloud:main · nebulab/erb-formatter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
8000 base repository: nebulab/erb-formatter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: ubicloud/erb-formatter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 6 commits
  • 7 files changed
  • 2 contributors

Commits on Aug 4, 2023

  1. Remove class multiline

    It's a bit much for Tailwind CSS projects.
    enescakir committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    a9ff000 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2024

  1. Configuration menu
    Copy the full SHA
    77e1cd9 View commit details
    Browse the repository at this point in the history
  2. Put unquoted and name only attributes on the same line when possible

    Currently, unquoted and name-only attributes are placed on a new line,
    even when they could fit on the same line. This PR modifies this
    behavior to keep them on the same line when possible.
    
    Expected output:
    
        <input type="hidden" name="my-name" value="my-value" hidden/>
    
    Current output:
    
        <input type="hidden" name="my-name" value="my-value"
          hidden/>
    enescakir committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    203cf20 View commit details
    Browse the repository at this point in the history
  3. Fix order of classes starting with digits in tailwindcss class sorter

    CSS classes cannot begin with digits. For this reason, Tailwind uses
    `\3` to escape them. For instance, `2xl:col-span-10` is transformed into
    `.\32xl\:col-span-10 { grid-column: span 10 / span 10; }` in the final
    CSS file.
    
    tailwindlabs/tailwindcss#3069
    
    The current Tailwind CSS class sorter implementation does not handle
    this correctly. As it cannot identify suitable classes beginning with
    digits, it places them at the start of the sorted list.
    
    Expected output:
    
        divide-y divide-gray-200 lg:col-span-8 xl:col-span-9 2xl:col-span-10 pb-10
    
    Current output:
    
        2xl:col-span-10 divide-y divide-gray-200 pb-10 lg:col-span-8 xl:col-span-9
    
    I simply remove the escape characters from the class name.
    enescakir committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    63c0a12 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2025

  1. Do not format ruby code in erb-formatter

    `erb-formatter` uses the `syntax_tree` gem which has its own
    formatting ideas about ruby, but, in our code base, so does Rubocop,
    the latter which we configure extensively.  When they disagree, the
    result is flip-flopping between tools, and that can fail the clover
    build, in this CI step in `.github/workflows/ci.yml`:
    
        - name: Check that source code formatters and annotations make no changes
          run: git diff --stat --exit-code
    
    This was motivated by an attempt to this `.rubocop.yml` configuration
    in clover:
    
        Layout/DotPosition:
          EnforcedStyle: trailing
    
    In this case, Rubocop moves method-chained periods to the ends of
    lines, and then `erb-formatter` moves them back to the beginning
    again.  This fails CI.
    
    Given our more extensive rubocop use, and use of the `rubocop-erb` as
    we also use it for rewriting, it's simpler to remove `syntax_tree` as
    a dependency altogether, and not attempt to format code in
    `erb-formatter`.  This keeps `erb-formatter` the rest of its
    functionality, such as tag indentation.
    fdr committed Apr 9, 2025
    Configuration menu
    Copy the full SHA
    886cb4e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    df31744 View commit details
    Browse the repository at this point in the history
Loading
0