oakmac / oakmac/standard-clojure-style-js

Semantics of :standard-clj/ignore

Open
#199 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
137
Forks
8
PR merge metrics
No merged PRs in 30d

Description

The naming of :standard-clj/ignore feels somewhat off - someone unfamiliar with the language ecosystem could misinterpret it as referring to something much broader like official language features / standards, rather than being the name of a formatting tool.

At the same time it suggests too limited a scope – if one marks a form or file with :standard-clj/ignore is that really a tool-specific directive? I imagine the intent is not for a specific formatter to 'ignore' the expression and its formatting, but to express something like "We have carefully formatted this in a way that conveys something useful / important, please don't touch it!"

Imagining that other formatters implemented a similar feature, it would seem silly to have to say

#_:standard-clj/ignore
#_:cljfmt/ignore
#_:zprint/ignore
(def something
  [ with
  , { non
    , standard
    }
  , formatting
  ])

I think a more descriptive and tool-agnostic keyword to convey the intent would be something like :style/preserve or :style/keep-formatting.
There is some precedent for the style namespace in Cider's use of the :style/indent metadata key, intended for use across different tools.

(I wasn't previously aware of this feature, apologies for bringing it up only now - but hopefully any proposed change would be simply additive and non-breaking)

Contributor guide

No contributing guide indexed for this repository

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

No files, tests, or entry points are named. Start by reviewing the existing handling of :standard-clj/ignore and the issue discussion, then determine whether a tool-agnostic replacement such as :style/preserve is wanted and what additive, non-breaking behavior would count as done.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, javascript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.