Skip to content

Commit a6049de

Browse files
committed
vscode-extensions.dbaeumer.vscode-eslint: refactor, move into its own directory, provide default working configuration
1 parent b1c1948 commit a6049de

File tree

2 files changed

+38
-16
lines changed

2 files changed

+38
-16
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
jq,
3+
lib,
4+
moreutils,
5+
vscode-utils,
6+
eslint,
7+
}:
8+
9+
vscode-utils.buildVscodeMarketplaceExtension {
10+
mktplcRef = {
11+
name = "vscode-eslint";
12+
publisher = "dbaeumer";
13+
version = "3.0.13";
14+
hash = "sha256-l5VvhQPxPaQsPhXUbFW2yGJjaqnNvijn4QkXPjf1WXo=";
15+
};
16+
17+
nativeBuildInputs = [
18+
jq
19+
moreutils
20+
];
21+
22+
buildInputs = [ eslint ];
23+
24+
postInstall = ''
25+
cd "$out/$installPrefix"
26+
jq '.contributes.configuration.properties."eslint.nodePath".default = "${eslint}/lib/node_modules"' package.json | sponge package.json
27+
'';
28+
29+
meta = {
30+
changelog = "https://marketplace.visualstudio.com/items/dbaeumer.vscode-eslint/changelog";
31+
description = "Integrates ESLint JavaScript into VS Code";
32+
downloadPage = "https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint";
33+
homepage = "https://github.com/Microsoft/vscode-eslint";
34+
license = lib.licenses.mit;
35+
maintainers = [ lib.maintainers.datafoo ];
36+
};
37+
}

pkgs/applications/editors/vscode/extensions/default.nix

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,22 +1308,7 @@ let
13081308
};
13091309
};
13101310

1311-
dbaeumer.vscode-eslint = buildVscodeMarketplaceExtension {
1312-
mktplcRef = {
1313-
name = "vscode-eslint";
1314-
publisher = "dbaeumer";
1315-
version = "3.0.13";
1316-
hash = "sha256-l5VvhQPxPaQsPhXUbFW2yGJjaqnNvijn4QkXPjf1WXo=";
1317-
};
1318-
meta = {
1319-
changelog = "https://marketplace.visualstudio.com/items/dbaeumer.vscode-eslint/changelog";
1320-
description = "Integrates ESLint JavaScript into VS Code";
1321-
downloadPage = "https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint";
1322-
homepage = "https://github.com/Microsoft/vscode-eslint";
1323-
license = lib.licenses.mit;
1324-
maintainers = [ lib.maintainers.datafoo ];
1325-
};
1326-
};
1311+
dbaeumer.vscode-eslint = callPackage ./dbaeumer.vscode-eslint { };
13271312

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

0 commit comments

Comments
 (0)