Code Monkey home page Code Monkey logo

yaml-unist-parser's People

Contributors

fisker avatar ikatyang avatar rarkins avatar renovate-bot avatar renovate[bot] avatar sosukesuzuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

yaml-unist-parser's Issues

Incorrect documentHead position

# --
          "position": {
            "start": { "offset": 0, "line": 1, "column": 1 },
            "end": { "offset": 0, "line": 1, "column": 1 }
          },
# ---
          "position": {
            "start": { "offset": 2, "line": 1, "column": 3 },
            "end": { "offset": 5, "line": 1, "column": 6 }
          },

Prettier issue prettier/prettier#8378

Comment attach seems wired

In this, comment 1 is attached as endComments,

- a
  # comment 1
- b
  # comment 2

When next one is longer, comment 1 is attached as leadingComments,

- a
  # comment 1
- bb
  # comment 2

Same problem in map

a:
  # comment 1
b:
  # comment 2

VS

a:
  # comment 1
bb:
  # comment 2

Context: prettier/prettier#9143 (comment)

Drop Node.js <= 12.x ?

Prettier v3 supports Node.js >= 14.x so I think that yaml-unist-parser also should drop Node.js <= 12.x.

(It will be breaking change, so we need major release)

Type compatibility with `unist-util-visit`

Hi, while the parser is compatible with unist, the types do not seem to be compatible. Using the visit function from unist-util-visit, I get the following type error:

Argument of type 'Root' is not assignable to parameter of type 'Node'.
  Index signature is missing in type 'Root'.

Comment after anchor attach

key: &anchor
  # comment
  - value

comment is attached as sequence.middleComments, maybe better sequenceItem.leadingComments?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.