Commit graph

2039 commits

Author SHA1 Message Date
glacambre
c03b483261
TSLint: re-enable no-unenclosed-multiline-block rule 2019-04-04 06:47:14 +02:00
glacambre
8f77bdc0fe
TSLint: re-enable no-try-promise rule 2019-04-04 06:41:25 +02:00
glacambre
fd09bd6c1d
TSLint: re-enable no-string-literal rule 2019-04-03 19:09:49 +02:00
glacambre
600a324941
TSLint: re-enable no-self-assignment rule 2019-04-03 18:34:19 +02:00
glacambre
0734798c45
TSLint: re-enable no-misleading-array-reverse rule
The no-misleading-array-reverse rule prevents using .sort() and
.reverse() in chains because this make these calls look like they return
a new sorted/reversed slice. But the truth is, these functions modify
the array in place and return that same array, which could cause quite a
lot of confusion if you don't expect that.
2019-04-03 18:27:50 +02:00
glacambre
e3c6c13573
TSLint: re-enable no-ignored-return rule 2019-04-03 18:16:59 +02:00
glacambre
5ae3f501a2
TSLint: re-enable no-small-switch rule 2019-04-03 13:49:38 +02:00
glacambre
8716fcaba3
TSLint: re-enable no-redundant-jump rule 2019-04-03 13:41:26 +02:00
glacambre
94a6f240ea
TSLint: re-enable no-redundant-boolean rule 2019-04-03 13:38:55 +02:00
glacambre
a943081f3b
TSLint: re-enable no-nested-template-literals rule 2019-04-03 13:33:03 +02:00
glacambre
270a1dbf9c
TSLint: re-enable no-dead-store rule
No point in storing things that we're not going to use.
2019-04-03 07:45:09 +02:00
glacambre
7240444d9a
TSLint: re-enable no-consecutive-blank-lines rule
Deactivated in excmds.ts as it is used to generate
.excmds_{background,content}.generated.ts which are full of consecutive
blank lines.
2019-04-03 07:17:48 +02:00
glacambre
15b627c340
TSLint: re-enable no-collapsible-if rule
This rule detects unnecessary nesting of if/else statements and tells
you to remove them.
2019-04-03 07:03:03 +02:00
glacambre
cb7c5f2932
TSLint: re-enable no-bitwise rule
Bitwise operations can be confusing so let's not use them.
2019-04-03 06:55:37 +02:00
glacambre
9119944bd9
TSLint: re-enable no-angle-bracket-type-assertion rule
This rule enforces using `x as y` instead of `<y>x` in order to cast
elements. This makes things easier to read and protects against
conflicts with tsx.
2019-04-03 06:33:13 +02:00
glacambre
2ccd6bd4a4
Fix completions broken by prettier 2019-04-02 18:59:47 +02:00
glacambre
673bf6f280
TSLint: re-enable member-ordering rule
The member-ordering rule enforces declaring public functions before
private functions.
2019-04-02 18:37:02 +02:00
glacambre
f8419b20ed
TSLint: re-enable interface-over-type-literal rule
The interface-over-type-literal rule specifies that object types should
be represented with `interface` instead of `type` if possible.
2019-04-02 18:22:54 +02:00
glacambre
3c9c3867e2
TSLint: re-enable forin rule
The forin rule forbids using the `for (let key in object)` syntax. This
is because iterating with `for in` also iterates over keys obtained from
prototypal inheritance. This is most of the time wrong and using `for
(let key of Object.keys(object)` protects against that.
2019-04-02 18:17:12 +02:00
glacambre
7733149e03
messaging.ts: Make sure owntab_background listener is only for bg script 2019-04-02 06:42:57 +02:00
glacambre
8545efdf3f
TSLint: re-enable comment-format rule
This rule requires that all single line comments must start with a
space, i.e. `//hello` is forbidden and `// hello` is allowed.
This made me discover a few pre-processor macro in files that aren't
taken into account by the macro-preprocessor and so I've decided to
remove these directives.
Note that this rule must stay disabled for excmds.ts as it would break
our preprocessor macros.
2019-04-02 06:38:59 +02:00
glacambre
f2630ea047
TSLint: re-enable callable-types rule
This rule specifies that if an interface defines a simple function, it
should be represented as a `type` rather than an `interface`.
2019-04-02 06:16:00 +02:00
glacambre
f11f5481e2
TSLint: re-enable bool-param-default rule
The bool-param-default rule requires all optional boolean parameters to
have a default value.
2019-04-01 18:06:13 +02:00
glacambre
8ed07362e0
TSLint: re-enable ban-types rule
This rule disallows using Number, String or Boolean constructors as
types and instead forces using the actual type, `number`, `string` or
`boolean`.
2019-04-01 12:57:19 +02:00
glacambre
f5563c3d3e
TSLint: re-activate array-type rule
This rule stipulates that complex array types should be represented as
Array<T> rather than T[].
2019-04-01 05:28:21 +02:00
glacambre
d36eedf05b
Add tslint and sonarts to Travis
Tslint and sonarts are pretty cool linters/static analyzers. Currently,
we ask them to ignore any of the rules that Tridactyl might not respect.
This enables progressively re-enabling rules and submitting small,
reviewable PRs that fix things.
2019-03-31 16:08:31 +02:00
Oliver Blanthorn
9956c3b0f5 Document allowautofocus gotchas 2019-03-26 14:14:20 +00:00
glacambre
b2e88f8a02
Fix :winopen -private about:addons not working 2019-03-26 08:27:38 +01:00
Oliver Blanthorn
1f12c31615
Merge pull request #1414 from glacambre/fix_editor_doc
Fix editor documentation
2019-03-25 13:30:19 +00:00
glacambre
018c247dae
Fix editor documentation
You shouldn't single-quote values you give to editorcmd.

Closes #1413.
2019-03-25 05:21:00 +01:00
Oliver Blanthorn
8539840eb3
release 1.14.9 2019-03-21 15:22:46 +00:00
Oliver Blanthorn
83b0613be1
Update min version to 65 2019-03-21 15:21:55 +00:00
Colin Caine
618f7f6446 excmds: document composite 2019-03-12 23:45:08 +00:00
Oliver Blanthorn
4d3b86f5ee
Merge branch 'remove_commandline_background' 2019-03-12 15:15:58 +00:00
glacambre
03bfb3f825
controller_content.ts: Fix typo in variable name 2019-03-09 18:07:57 +01:00
glacambre
6a4e2e3c41
excmds.ts: Fix nativeopen using wrong escaping scheme on windows
See comment in patch for explanations.
2019-03-06 06:49:47 +01:00
glacambre
5dd1ec3a74
completions: Make sure completion computation has ended before resizeArea
Before this commit, Tridactyl had a bug where resizeArea could be called
before completion computation had ended, which resulted in completions
pushing the input field out of the viewport (easy way to reproduce this:
open a lot of tabs and press `b` to open buffer completions).
This happened because for some of the completion sources, `filter`
returned before completion computation had actually ended. This is fixed
by making sure that filter() (and all underlying calls to updateOptions,
onInput, updateChain...) return a promise that will only be resolved
once completion computation has actually ended.
2019-03-05 07:45:07 +01:00
Oliver Blanthorn
5e13b87ebd
Merge branch 'request_review' 2019-03-04 20:02:59 +00:00
Oliver Blanthorn
d34af73746
Update packages and fix build errors 2019-03-03 13:13:01 +00:00
glacambre
689994eda5
native.ts: Fix profiledir != "auto" not working on windows
Somehow () => profiledir works on linux but doesn't on windows. () =>
profiledir doesn't make sense anyway.
2019-03-01 12:59:12 +01:00
glacambre
4e6e9aadac
Resize command line only once per available completion source
One of the problems of the command line was that it made a resizeArea()
call for each enabled completion, no matter whether its status was
"hidden" or "normal". This was a problem because a resizeArea call
results in 2 cross-script messages: a "show" and a "focus" message. This
means that for each keystroke, we sent 28 messages. This commit fixes
that thanks to modifications in multiple files:

- commandline_frame.ts: Stop accumulating event listeners on resizeArea
  calls. Make sure completion sources actually need a refresh before
  calling resizeArea().
- completions.ts: Add logic to know whether a completion source needs a
  refresh or not.
- {Rss,Sessions,Tab,TabAll,Window}.ts: Make sure that completions are
  actually needed before computing them.

This seems to make opening the command line slightly faster for me,
although I can't tell if this is placebo or not.
2019-03-01 06:18:07 +01:00
glacambre
bdd3e04199
Implement deselect_completion ex command
Left unbound by default.
2019-02-28 18:27:21 +01:00
glacambre
4ff992f49e
excmds.ts: Fix hint -j
https://github.com/tridactyl/tridactyl/pull/1381 inverted the behavior
of -J. This commit fixes that.
2019-02-27 06:17:15 +01:00
glacambre
85b3e33719
Remove commandline_background
This commit removes commandline_background.ts. I believe this is useful
because the only thing it did was provide recvExStr, which just
triggered a synthetic "onLine" event the only consumer of which was the
parser. Since we already used controller_background + acceptExCmd in
some places, it made sense to me to directly use controller_background +
acceptExCmd everywhere.
2019-02-26 08:41:19 +01:00
glacambre
295471d592
excmds.ts: Fix hint -pipe not working
https://github.com/tridactyl/tridactyl/pull/1381 broke `hint -pipe`
(just try `:composite hint -pipe a href | tabopen` for example).
This commit makes `-pipe` work again.
2019-02-26 06:24:18 +01:00
glacambre
1d12fb614c
native.ts: Fix buggy profile detection
This happened because of a refactoring gone wrong.
2019-02-25 13:08:19 +01:00
Oliver Blanthorn
026f409add
Merge pull request #1381 from nfvs/hint_t
Added `hint -t`, `hint -tc` and `hint -Jtc`, to open links in a new tab.
2019-02-24 14:03:11 +00:00
Nuno Santos
31c1d52641 Added hint -t, hint -tc and hint -Jtc, to open links in a new tab.
Using `-w newtab` wouldn't allow us to use selectors with `-c`, and
using composite would always open a new empty tab on cancel (esc).

Other changes:
- Better flag handling in hint().
- `-c` is now a flag (can be combined with others like `-t`), and is
handled in the `default` case
- support flags `-c`, `-J` and `-t` in any position
2019-02-23 23:08:26 +01:00
Oliver Blanthorn
ba2b47c1f3
Merge pull request #1384 from glacambre/guiset_completions
Implement guiset completions
2019-02-23 15:24:17 +00:00
glacambre
f9fa447a24
Implement guiset completions 2019-02-23 16:17:05 +01:00