Giter Club home page Giter Club logo

Comments (7)

jaydenseric avatar jaydenseric commented on May 30, 2024 1

Nice! That seems to be working again 🙌

from prettier-plugin-embed.

Sec-ant avatar Sec-ant commented on May 30, 2024 1

I'm not sure but maybe this is related?

from prettier-plugin-embed.

Sec-ant avatar Sec-ant commented on May 30, 2024

Can you provide a repro setup?

VS Code Prettier extension warnings/errors are logged by its own logging service which is not exposed to the plugins so I cannot log errors or warnings in the output panel. If you open the devtools of VS Code, the errors may appear in that window (if there're errors).

The breaking changes are the behaviors of the ruby plugin and I reduced the amount of default identifiers to only the common ones. And I've also added this line of note in the README file. Some new languages are added in v0.4.x compared to v0.3.2, but I don't see them as breaking changes. But maybe I broke something in the process.

This project is still in early stage, lacking tests, and I'm still trying to learn and find the appropriate process to maintain this repo. Any kind of contribution to help me organize this repo in a more maintainable way is welcome.

from prettier-plugin-embed.

jaydenseric avatar jaydenseric commented on May 30, 2024

The prettier.config.mjs contains:

// @ts-check
// ignore unused exports default

// The Prettier plugin config types are temporarily avoided due to this issue:
// https://github.com/Sec-ant/prettier-plugin-embed/issues/52

// @type {import("prettier-plugin-embed").PrettierPluginEmbedOptions}
/** Prettier config for the plugin `prettier-plugin-embed`. */
const prettierConfigPluginEmbed = {
  embeddedSqlIdentifiers: ["sql", "redactedSql"],
};

// @type {import("prettier-plugin-sql").SqlBaseOptions}
/** Prettier config for the plugin `prettier-plugin-sql`. */
const prettierConfigPluginSql = {
  language: "postgresql",
};

/**
 * Prettier config.
 * @type {import("prettier").Config}
 */
const prettierConfig = {
  plugins: ["prettier-plugin-embed", "prettier-plugin-sql"],
  ...prettierConfigPluginEmbed,
  ...prettierConfigPluginSql,
};

export default prettierConfig;

from prettier-plugin-embed.

Sec-ant avatar Sec-ant commented on May 30, 2024

This is indeed a regression, sorry for the trouble. Can you test v0.4.3 to confirm whether it is fixed for your use case?

from prettier-plugin-embed.

jaydenseric avatar jaydenseric commented on May 30, 2024

Hmm, something else that seems to have changed, is now the default behavior is not to format the keyword capitalization. You have to explicitly add keywordCase: "upper" in the SQL plugin config.

from prettier-plugin-embed.

jaydenseric avatar jaydenseric commented on May 30, 2024

Actually, maybe that stopped working before the v0.4 update, because now I have updated the Prettier config to enforce SQL keyword case, I'm finding Prettier formatting errors for some of the SQL committed in the last week. Maybe that default changed due to an earlier update of either prettier-plugin-embed or prettier-plugin-sql.

from prettier-plugin-embed.

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.