Git Product home page Git Product logo

Comments (2)

nene avatar nene commented on July 22, 2024 1

Implemented in 15.1.0 release.

from sql-formatter.

nene avatar nene commented on July 22, 2024

SQL Formatter is not Prettier. It has not been developed to be compatible with Prettier. Heck, the first version of SQL Formatter was released before Prettier existed.

I know there exists prettier-plugin-sql, which uses SQL Formatter under the hood, but I have no control over that project.

If you're interested in more Prettier-compatible SQL formatting solution, I suggest you try prettier-plugin-sql-cst. This doesn't support the ignore-comments, but there exists more of a chance that such a feature gets implemented.

In this project, the best one could hope for would be a feature where you mark both start and end of the code you don't want to be formatted, like:

/* sql-formatter-disable */
SELECT * FROM tbl
/* sql-formatter-enable */

There could be a point for implementing something like this, as it would help in working around scenarios where the formatter currently fails to produce a sensible output or even crashes. Like:

from sql-formatter.

Related Issues (20)

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.