Unverified Commit 2162a033 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

vscode-extensions.esbenp.prettier-vscode: refactor (#407386)

parents f8c342ad a6049de7
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
{
  jq,
  lib,
  moreutils,
  vscode-utils,
  eslint,
}:

vscode-utils.buildVscodeMarketplaceExtension {
  mktplcRef = {
    name = "vscode-eslint";
    publisher = "dbaeumer";
    version = "3.0.13";
    hash = "sha256-l5VvhQPxPaQsPhXUbFW2yGJjaqnNvijn4QkXPjf1WXo=";
  };

  nativeBuildInputs = [
    jq
    moreutils
  ];

  buildInputs = [ eslint ];

  postInstall = ''
    cd "$out/$installPrefix"
    jq '.contributes.configuration.properties."eslint.nodePath".default = "${eslint}/lib/node_modules"' package.json | sponge package.json
  '';

  meta = {
    changelog = "https://marketplace.visualstudio.com/items/dbaeumer.vscode-eslint/changelog";
    description = "Integrates ESLint JavaScript into VS Code";
    downloadPage = "https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint";
    homepage = "https://github.com/Microsoft/vscode-eslint";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.datafoo ];
  };
}
+2 −32
Original line number Diff line number Diff line
@@ -1308,22 +1308,7 @@ let
        };
      };

      dbaeumer.vscode-eslint = buildVscodeMarketplaceExtension {
        mktplcRef = {
          name = "vscode-eslint";
          publisher = "dbaeumer";
          version = "3.0.13";
          hash = "sha256-l5VvhQPxPaQsPhXUbFW2yGJjaqnNvijn4QkXPjf1WXo=";
        };
        meta = {
          changelog = "https://marketplace.visualstudio.com/items/dbaeumer.vscode-eslint/changelog";
          description = "Integrates ESLint JavaScript into VS Code";
          downloadPage = "https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint";
          homepage = "https://github.com/Microsoft/vscode-eslint";
          license = lib.licenses.mit;
          maintainers = [ lib.maintainers.datafoo ];
        };
      };
      dbaeumer.vscode-eslint = callPackage ./dbaeumer.vscode-eslint { };

      dendron.adjust-heading-level = callPackage ./dendron.adjust-heading-level { };

@@ -1789,22 +1774,7 @@ let
        };
      };

      esbenp.prettier-vscode = buildVscodeMarketplaceExtension {
        mktplcRef = {
          name = "prettier-vscode";
          publisher = "esbenp";
          version = "11.0.0";
          hash = "sha256-pNjkJhof19cuK0PsXJ/Q/Zb2H7eoIkfXJMLZJ4lDn7k=";
        };
        meta = {
          changelog = "https://marketplace.visualstudio.com/items/esbenp.prettier-vscode/changelog";
          description = "Code formatter using prettier";
          downloadPage = "https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode";
          homepage = "https://github.com/prettier/prettier-vscode";
          license = lib.licenses.mit;
          maintainers = [ lib.maintainers.datafoo ];
        };
      };
      esbenp.prettier-vscode = callPackage ./esbenp.prettier-vscode { };

      ethansk.restore-terminals = buildVscodeMarketplaceExtension {
        mktplcRef = {
+37 −0
Original line number Diff line number Diff line
{
  jq,
  lib,
  moreutils,
  vscode-utils,
  nodePackages,
}:

vscode-utils.buildVscodeMarketplaceExtension {
  mktplcRef = {
    name = "prettier-vscode";
    publisher = "esbenp";
    version = "11.0.0";
    hash = "sha256-pNjkJhof19cuK0PsXJ/Q/Zb2H7eoIkfXJMLZJ4lDn7k=";
  };

  nativeBuildInputs = [
    jq
    moreutils
  ];

  buildInputs = [ nodePackages.prettier ];

  postInstall = ''
    cd "$out/$installPrefix"
    jq '.contributes.configuration.properties."prettier.prettierPath".default = "${nodePackages.prettier}/lib/node_modules/prettier"' package.json | sponge package.json
  '';

  meta = {
    changelog = "https://marketplace.visualstudio.com/items/esbenp.prettier-vscode/changelog";
    description = "Code formatter using prettier";
    downloadPage = "https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode";
    homepage = "https://github.com/prettier/prettier-vscode";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.datafoo ];
  };
}