De-lint a few more files

& remove them from the ignored list
This commit is contained in:
David Baker 2019-01-11 13:54:11 +00:00
parent e0bc0494fa
commit fe4778b28b
4 changed files with 8 additions and 7 deletions

View file

@ -1,8 +1,5 @@
# autogenerated file: run scripts/generate-eslint-error-ignore-file to update. # autogenerated file: run scripts/generate-eslint-error-ignore-file to update.
src/autocomplete/AutocompleteProvider.js
src/autocomplete/Autocompleter.js
src/autocomplete/UserProvider.js
src/component-index.js src/component-index.js
src/components/structures/BottomLeftMenu.js src/components/structures/BottomLeftMenu.js
src/components/structures/CompatibilityPage.js src/components/structures/CompatibilityPage.js

View file

@ -41,8 +41,12 @@ export default class AutocompleteProvider {
/** /**
* Of the matched commands in the query, returns the first that contains or is contained by the selection, or null. * Of the matched commands in the query, returns the first that contains or is contained by the selection, or null.
* @param {string} query The query string
* @param {SelectionRange} selection Selection to search
* @param {boolean} force True if the user is forcing completion
* @return {object} { command, range } where both onjects fields are null if no match
*/ */
getCurrentCommand(query: string, selection: SelectionRange, force: boolean = false): ?string { getCurrentCommand(query: string, selection: SelectionRange, force: boolean = false) {
let commandRegex = this.commandRegex; let commandRegex = this.commandRegex;
if (force && this.shouldForceComplete()) { if (force && this.shouldForceComplete()) {

View file

@ -60,8 +60,8 @@ const PROVIDER_COMPLETION_TIMEOUT = 3000;
export default class Autocompleter { export default class Autocompleter {
constructor(room: Room) { constructor(room: Room) {
this.room = room; this.room = room;
this.providers = PROVIDERS.map((p) => { this.providers = PROVIDERS.map((Prov) => {
return new p(room); return new Prov(room);
}); });
} }

View file

@ -41,7 +41,7 @@ export default class UserProvider extends AutocompleteProvider {
users: Array<RoomMember> = null; users: Array<RoomMember> = null;
room: Room = null; room: Room = null;
constructor(room) { constructor(room: Room) {
super(USER_REGEX, FORCED_USER_REGEX); super(USER_REGEX, FORCED_USER_REGEX);
this.room = room; this.room = room;
this.matcher = new QueryMatcher([], { this.matcher = new QueryMatcher([], {