Require explicit public modifier

This commit is contained in:
hensm
2019-03-07 02:14:44 +00:00
parent 04a5284fdc
commit 0fef3fd98c
7 changed files with 29 additions and 29 deletions

View File

@@ -138,7 +138,7 @@ export default class Bridge extends Component<BridgeProps, BridgeState> {
this.onPackageTypeChange = this.onPackageTypeChange.bind(this);
}
render () {
public render () {
return (
<div className="bridge">
{ this.props.loading

View File

@@ -46,7 +46,7 @@ export default class EditableList extends Component<
this.handleNewItemEdit = this.handleNewItemEdit.bind(this);
}
render () {
public render () {
const items = Array.from(this.state.items.values());
return (

View File

@@ -40,7 +40,7 @@ export default class EditableListItem extends Component<
this.handleInputKeyPress = this.handleInputKeyPress.bind(this);
}
render () {
public render () {
const selected = this.state.editing
? "editable-list__item--selected" : "";

View File

@@ -77,7 +77,7 @@ class OptionsApp extends Component<{}, OptionsAppState> {
= this.getWhitelistItemPatternError.bind(this);
}
async componentDidMount () {
public async componentDidMount () {
const { options } = await browser.storage.sync.get("options");
this.setState({
@@ -95,7 +95,7 @@ class OptionsApp extends Component<{}, OptionsAppState> {
});
}
render () {
public render () {
if (!this.state.hasLoaded) {
return;
}

View File

@@ -58,7 +58,7 @@ class PopupApp extends Component<{}, PopupAppState> {
this.onCast = this.onCast.bind(this);
}
componentDidMount () {
public componentDidMount () {
const backgroundPort = browser.runtime.connect({
name: "popup"
});
@@ -71,7 +71,7 @@ class PopupApp extends Component<{}, PopupAppState> {
});
}
render () {
public render () {
const shareMedia =
this.state.selectedMedia === "tab"
|| this.state.selectedMedia === "screen";
@@ -188,25 +188,10 @@ class Receiver extends Component<ReceiverProps, ReceiverState> {
, ellipsis: ""
};
this.onClick = this.onClick.bind(this);
this.handleCast = this.handleCast.bind(this);
}
onClick () {
this.props.onCast(this.props.receiver);
this.setState({
isLoading: true
});
setInterval(() => {
this.setState(state => ({
ellipsis: getNextEllipsis(state.ellipsis)
}));
}, 500);
}
render () {
public render () {
return (
<li className="receiver">
<div className="receiver-name">
@@ -220,7 +205,7 @@ class Receiver extends Component<ReceiverProps, ReceiverState> {
`- ${this.props.receiver.currentApp}` }
</div>
<button className="receiver-connect"
onClick={ this.onClick }
onClick={ this.handleCast }
disabled={this.props.isLoading}>
{ this.state.isLoading
? _("popupCastingButtonLabel") +
@@ -232,6 +217,21 @@ class Receiver extends Component<ReceiverProps, ReceiverState> {
</li>
);
}
private handleCast () {
this.props.onCast(this.props.receiver);
this.setState({
isLoading: true
});
setInterval(() => {
this.setState(state => ({
ellipsis: getNextEllipsis(state.ellipsis)
}));
}, 500);
}
}

View File

@@ -95,7 +95,7 @@ class UpdaterApp extends Component<{}, UpdaterAppState> {
};
}
async componentDidMount () {
public async componentDidMount () {
this.port = browser.runtime.connect({
name: "updater"
});
@@ -104,7 +104,7 @@ class UpdaterApp extends Component<{}, UpdaterAppState> {
browser.downloads.onChanged.addListener(this.onDownloadChanged);
}
componentDidUpdate () {
public componentDidUpdate () {
// Size window to content
browser.windows.update(this.win.id, {
width: document.body.clientWidth + this.frameWidth
@@ -112,7 +112,7 @@ class UpdaterApp extends Component<{}, UpdaterAppState> {
});
}
render () {
public render () {
if (!this.state.hasLoaded) {
return;
}

View File

@@ -13,7 +13,7 @@
"limit": 80
, "ignore-pattern": "//|.*(\"|`);?$"
}]
, "member-access": [ true, "no-public" ]
, "member-access": [ true ]
, "no-console": [ true, "log" ]
, "no-namespace": [ true, "allow-declarations" ]
, "object-literal-sort-keys": false