diff --git a/scripts/build.sh b/scripts/build.sh index 8d5bec58..d70c50dd 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -37,8 +37,10 @@ else fi # .bracketexpr.generated.ts is needed for metadata generation -"$(npm bin)/nearleyc" src/grammars/bracketexpr.ne \ - > src/grammars/.bracketexpr.generated.ts +( +printf '/* tslint:disable:no-trailing-whitespace */\n' +"$(npm bin)/nearleyc" src/grammars/bracketexpr.ne +) > src/grammars/.bracketexpr.generated.ts # It's important to generate the metadata before the documentation because # missing imports might break documentation generation on clean builds diff --git a/src/content/hinting.ts b/src/content/hinting.ts index 2f94652c..55ce5ee7 100644 --- a/src/content/hinting.ts +++ b/src/content/hinting.ts @@ -210,7 +210,7 @@ function* hintnames_simple( So it removes them. This function is not yet clever enough to realise that if n > h ** 2 it should remove h + (n - h**2 - h) / h ** 2 and so on, but we hardly ever see that many hints, so whatever. - + */ function* hintnames_short( n: number, diff --git a/src/excmds.ts b/src/excmds.ts index a2f9be52..999b9a94 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -1,6 +1,7 @@ /* tslint:disable:array-type */ /* tslint:disable:comment-format */ /* tslint:disable:no-consecutive-blank-lines */ +/* tslint:disable:no-trailing-whitespace */ /* tslint:disable:quotemark */ // '//#' is a start point for a simple text-replacement-type macro. See excmds_macros.py diff --git a/src/lib/autocontainers.ts b/src/lib/autocontainers.ts index e0002b12..837d2b36 100644 --- a/src/lib/autocontainers.ts +++ b/src/lib/autocontainers.ts @@ -12,8 +12,8 @@ * Unescaped periods will match *anything*. `autocontain google.co.uk work` will match `google!co$uk`. Escape your periods or accept that you might get some false positives. * You can use regex in your domain pattern. `autocontain google\,(co\.uk|com) work` will match either `google.co.uk` or `google.com`. - TODO: Should try and detect Multi Account Containers and/or Contain Facebook extensions from Mozilla. - + TODO: Should try and detect Multi Account Containers and/or Contain Facebook extensions from Mozilla. + A lot of the inspiration for this code was drawn from the Mozilla `contain facebook` Extension. https://github.com/mozilla/contain-facebook/ @@ -31,7 +31,7 @@ import * as Logging from "@src/lib/logging" const logger = new Logging.Logger("containers") /** An interface for the additional object that's supplied in the BlockingResponse callback. - + Details here: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webRequest/onBeforeRequest#details diff --git a/src/lib/itertools.ts b/src/lib/itertools.ts index 14e13c56..c8965dbb 100644 --- a/src/lib/itertools.ts +++ b/src/lib/itertools.ts @@ -34,7 +34,7 @@ export function find(iter, predicate) { /** Zip some arrays together If you need variable length args, you need izip for now. - + */ export function zip(...arrays) { // Make an array of length values @@ -87,7 +87,7 @@ export function zeros(n) { return new Array(n).fill(0) } -/** islice(iter, stop) = Give the first `stop` elements +/** islice(iter, stop) = Give the first `stop` elements islice(iter, start, stop) skip `start` elements, then give `stop - start` elements, unless `stop` is null, then emit indefinitely diff --git a/src/lib/number.mod.ts b/src/lib/number.mod.ts index cf12b381..85313bca 100644 --- a/src/lib/number.mod.ts +++ b/src/lib/number.mod.ts @@ -17,7 +17,7 @@ export function my_mod(dividend, divisor) { } /** Always gives a positive result. - + Equivalent to knuth_mod when divisor is +ve Equivalent to % when dividend is +ve */ diff --git a/tslint.json b/tslint.json index 2574b127..9a0136bf 100644 --- a/tslint.json +++ b/tslint.json @@ -23,7 +23,6 @@ "no-identical-functions": false, "no-shadowed-variable": false, "no-string-throw": false, - "no-trailing-whitespace": false, "no-unnecessary-initializer": false, "no-unsafe-finally": false, "no-var-keyword": false,