mirror of
https://github.com/OutlineFoundation/outline-server.git
synced 2026-08-27 03:42:01 +00:00
Clear unused imports and variables (#473)
* Clear unused imports and variables * Add trailing newline
This commit is contained in:
parent
710320ec3e
commit
0445af0a95
7 changed files with 24 additions and 8 deletions
|
|
@ -12,8 +12,6 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import * as events from 'events';
|
||||
|
||||
import * as errors from '../infrastructure/errors';
|
||||
|
||||
export interface DigitalOceanDropletSpecification {
|
||||
|
|
|
|||
18
src/server_manager/test_action.sh
Executable file
18
src/server_manager/test_action.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2018 The Outline Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
yarn do server_manager/electron_app/test
|
||||
yarn do server_manager/web_app/test
|
||||
|
|
@ -222,7 +222,6 @@ function createTestApp(
|
|||
manualServerRepo?: server.ManualServerRepository,
|
||||
displayServerRepository?: FakeDisplayServerRepository,
|
||||
managedServerRepository?: FakeManagedServerRepository) {
|
||||
const WEB_APP_URL = 'outline://fakefakefake/';
|
||||
const VERSION = '0.0.1';
|
||||
const fakeDigitalOceanSessionFactory = (accessToken: string) => {
|
||||
return new FakeDigitalOceanSession(accessToken);
|
||||
|
|
@ -242,7 +241,7 @@ function createTestApp(
|
|||
displayServerRepository = new FakeDisplayServerRepository();
|
||||
}
|
||||
return new App(
|
||||
polymerAppRoot, WEB_APP_URL, VERSION, fakeDigitalOceanSessionFactory,
|
||||
polymerAppRoot, VERSION, fakeDigitalOceanSessionFactory,
|
||||
fakeDigitalOceanServerRepositoryFactory, manualServerRepo, displayServerRepository,
|
||||
digitalOceanTokenManager);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ interface PolymerEvent extends Event {
|
|||
|
||||
// The Outline DigitalOcean team's referral code:
|
||||
// https://www.digitalocean.com/help/referral-program/
|
||||
const DIGITALOCEAN_REFERRAL_CODE = '5ddb4219b716';
|
||||
const UNUSED_DIGITALOCEAN_REFERRAL_CODE = '5ddb4219b716';
|
||||
|
||||
interface UiAccessKey {
|
||||
id: string;
|
||||
|
|
@ -67,7 +67,7 @@ export class App {
|
|||
private serverBeingCreated: server.ManagedServer;
|
||||
|
||||
constructor(
|
||||
private appRoot: Polymer, private readonly appUrl: string, private readonly version: string,
|
||||
private appRoot: Polymer, private readonly version: string,
|
||||
private createDigitalOceanSession: DigitalOceanSessionFactory,
|
||||
private createDigitalOceanServerRepository: DigitalOceanServerRepositoryFactory,
|
||||
private manualServerRepository: server.ManualServerRepository,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
// limitations under the License.
|
||||
|
||||
import {InMemoryStorage} from './app.spec';
|
||||
import {DisplayServer, DisplayServerRepository} from './display_server';
|
||||
import {DisplayServerRepository} from './display_server';
|
||||
|
||||
// Use this helper to compare `DisplayServer`s when we don't care about the
|
||||
// `isSynced` property.
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ document.addEventListener('WebComponentsReady', () => {
|
|||
|
||||
// Create and start the app.
|
||||
new App(
|
||||
document.getElementById('appRoot'), document.URL, version,
|
||||
document.getElementById('appRoot'), version,
|
||||
digitalocean_api.createDigitalOceanSession, digitalOceanServerRepositoryFactory,
|
||||
new ManualServerRepository('manualServers'), new DisplayServerRepository(),
|
||||
new DigitalOceanTokenManager())
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
"no-reference": true,
|
||||
"no-require-imports": true,
|
||||
"no-unused-expression": true,
|
||||
"no-unused-variable": [true, {"ignore-pattern": "^UNUSED"}],
|
||||
"no-use-before-declare": false,
|
||||
"no-var-keyword": true,
|
||||
"object-literal-shorthand": true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue