forked from lix-project/lix
manual: fix a syntax error in redirects.js that made it not do anything
lol lmao
Let's put in a syntax checker in CI so we do not have to deal with this
nonsense ever again.
Change-Id: I0fe875e0cfc59ab1783087762e5bb07e09ded105
This commit is contained in:
parent
0f998056fa
commit
700762d8b2
|
@ -345,7 +345,7 @@ const redirects = {
|
||||||
"linux": "uninstall.html#linux",
|
"linux": "uninstall.html#linux",
|
||||||
"macos": "uninstall.html#macos",
|
"macos": "uninstall.html#macos",
|
||||||
"uninstalling": "uninstall.html",
|
"uninstalling": "uninstall.html",
|
||||||
}
|
},
|
||||||
"contributing/hacking.html": {
|
"contributing/hacking.html": {
|
||||||
"nix-with-flakes": "#building-nix-with-flakes",
|
"nix-with-flakes": "#building-nix-with-flakes",
|
||||||
"classic-nix": "#building-nix",
|
"classic-nix": "#building-nix",
|
||||||
|
|
18
flake.nix
18
flake.nix
|
@ -292,6 +292,24 @@
|
||||||
werror = true;
|
werror = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Although this might be nicer to do with pre-commit, that would
|
||||||
|
# require adding 12MB of nodejs to the dev shell, whereas building it
|
||||||
|
# in CI with Nix avoids that at a cost of slower feedback on rarely
|
||||||
|
# touched files.
|
||||||
|
jsSyntaxCheck =
|
||||||
|
let
|
||||||
|
nixpkgs = nixpkgsFor.x86_64-linux.native;
|
||||||
|
inherit (nixpkgs) pkgs;
|
||||||
|
docSources = lib.fileset.toSource {
|
||||||
|
root = ./doc;
|
||||||
|
fileset = lib.fileset.fileFilter (f: f.hasExt "js") ./doc;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
pkgs.runCommand "js-syntax-check" { } ''
|
||||||
|
find ${docSources} -type f -print -exec ${pkgs.nodejs-slim}/bin/node --check '{}' ';'
|
||||||
|
touch $out
|
||||||
|
'';
|
||||||
|
|
||||||
# Make sure that nix-env still produces the exact same result
|
# Make sure that nix-env still produces the exact same result
|
||||||
# on a particular version of Nixpkgs.
|
# on a particular version of Nixpkgs.
|
||||||
evalNixpkgs =
|
evalNixpkgs =
|
||||||
|
|
Loading…
Reference in a new issue