aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/settings
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-12-22 17:11:21 +0100
committerGitHub <noreply@github.com>2016-12-22 17:11:21 +0100
commitbc07b29494abd5dff7875175df91df38d0b908ac (patch)
tree05f82f8ca3787011e2a0810e7d85c9d81e4b222f /server/sonar-web/src/main/js/apps/settings
parente52ca10a4a1b07d05c894e0d8564ffa1b5af3e47 (diff)
downloadsonarqube-bc07b29494abd5dff7875175df91df38d0b908ac.tar.gz
sonarqube-bc07b29494abd5dff7875175df91df38d0b908ac.zip
upgrade eslint and its plugins, tune rules (#1481)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/settings')
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/App.js2
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/Definition.js5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js4
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js2
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/EmailForm.js4
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js1
-rw-r--r--server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js4
-rw-r--r--server/sonar-web/src/main/js/apps/settings/store/values/actions.js1
-rw-r--r--server/sonar-web/src/main/js/apps/settings/store/values/reducer.js2
9 files changed, 13 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/js/apps/settings/components/App.js b/server/sonar-web/src/main/js/apps/settings/components/App.js
index 9a55ff3b008..a2a5ffd14c9 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/App.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/App.js
@@ -32,7 +32,7 @@ import '../styles.css';
type Props = {
component: { key: string },
defaultCategory: ?string,
- fetchSettings(componentKey: ?string): Promise<any>,
+ fetchSettings(componentKey: ?string): Promise<*>,
location: { query: {} }
};
diff --git a/server/sonar-web/src/main/js/apps/settings/components/Definition.js b/server/sonar-web/src/main/js/apps/settings/components/Definition.js
index 7f607de7f78..1fcc33d6c26 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/Definition.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/Definition.js
@@ -28,7 +28,7 @@ import DefinitionChanges from './DefinitionChanges';
import { getPropertyName, getPropertyDescription, getSettingValue, isDefaultOrInherited } from '../utils';
import { translateWithParameters, translate } from '../../../helpers/l10n';
import { resetValue, saveValue } from '../store/actions';
-import { failValidation, passValidation } from '../store/settingsPage/validationMessages/actions';
+import { passValidation } from '../store/settingsPage/validationMessages/actions';
import { cancelChange, changeValue } from '../store/settingsPage/changedValues/actions';
import { TYPE_PASSWORD } from '../constants';
import {
@@ -52,7 +52,6 @@ class Definition extends React.Component {
cancelChange: React.PropTypes.func.isRequired,
saveValue: React.PropTypes.func.isRequired,
resetValue: React.PropTypes.func.isRequired,
- failValidation: React.PropTypes.func.isRequired,
passValidation: React.PropTypes.func.isRequired
};
@@ -197,5 +196,5 @@ const mapStateToProps = (state, ownProps) => ({
export default connect(
mapStateToProps,
- { changeValue, saveValue, resetValue, failValidation, passValidation, cancelChange }
+ { changeValue, saveValue, resetValue, passValidation, cancelChange }
)(Definition);
diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js b/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js
index 97d48d20d8b..2e1afc3adbf 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionChanges.js
@@ -32,13 +32,13 @@ export default class DefinitionChanges extends React.Component {
return shallowCompare(this, nextProps, nextState);
}
- handleSaveClick (e: any) {
+ handleSaveClick (e: Object) {
e.preventDefault();
e.target.blur();
this.props.onSave();
}
- handleCancelChange (e: any) {
+ handleCancelChange (e: Object) {
e.preventDefault();
e.target.blur();
this.props.onCancel();
diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js b/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js
index 9d561ac6174..830bcac102f 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js
@@ -29,7 +29,7 @@ export default class DefinitionDefaults extends React.Component {
onReset: React.PropTypes.func.isRequired
};
- handleReset (e: any) {
+ handleReset (e: Object) {
e.preventDefault();
e.target.blur();
this.props.onReset();
diff --git a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js
index 1af5a0a8014..f4e551206b7 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js
@@ -77,7 +77,7 @@ class EmailForm extends React.Component {
<input
id="test-email-to"
type="email"
- required
+ required={true}
value={this.state.recipient}
disabled={this.state.loading}
onChange={e => this.setState({ recipient: e.target.value })}/>
@@ -100,7 +100,7 @@ class EmailForm extends React.Component {
</label>
<textarea
id="test-email-title"
- required
+ required={true}
rows="5"
value={this.state.message}
disabled={this.state.loading}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js
index 02fcbfacef2..b2ddc8e6959 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js
+++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.js
@@ -26,6 +26,7 @@ import { TYPE_PROPERTY_SET } from '../../constants';
export default class Input extends React.Component {
static propTypes = {
+ /* eslint-disable react/no-unused-prop-types */
setting: React.PropTypes.object.isRequired,
value: React.PropTypes.any,
onChange: React.PropTypes.func.isRequired
diff --git a/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js b/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js
index 8474bbaa581..d1c301302bd 100644
--- a/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js
+++ b/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdApp.js
@@ -103,7 +103,7 @@ export default class ServerIdApp extends React.Component {
<input
id="server-id-organization"
type="text"
- required
+ required={true}
value={this.state.organization}
disabled={this.state.loading}
onChange={e => this.setState({ organization: e.target.value })}/>
@@ -122,7 +122,7 @@ export default class ServerIdApp extends React.Component {
<input
id="server-id-ip"
type="text"
- required
+ required={true}
value={this.state.ip}
disabled={this.state.loading}
onChange={e => this.setState({ ip: e.target.value })}/>
diff --git a/server/sonar-web/src/main/js/apps/settings/store/values/actions.js b/server/sonar-web/src/main/js/apps/settings/store/values/actions.js
index e088215d7fd..08b98237090 100644
--- a/server/sonar-web/src/main/js/apps/settings/store/values/actions.js
+++ b/server/sonar-web/src/main/js/apps/settings/store/values/actions.js
@@ -19,6 +19,7 @@
*/
// @flow
import type { SettingValue } from '../../types';
+
export const RECEIVE_VALUES: string = 'RECEIVE_VALUES';
/**
diff --git a/server/sonar-web/src/main/js/apps/settings/store/values/reducer.js b/server/sonar-web/src/main/js/apps/settings/store/values/reducer.js
index c57ed067c36..55f2182af2c 100644
--- a/server/sonar-web/src/main/js/apps/settings/store/values/reducer.js
+++ b/server/sonar-web/src/main/js/apps/settings/store/values/reducer.js
@@ -24,7 +24,7 @@ import { actions as appStateActions } from '../../../../store/appState/duck';
type State = { [key: string]: {} };
-const reducer = (state: State = {}, action: any) => {
+const reducer = (state: State = {}, action: Object) => {
if (action.type === RECEIVE_VALUES) {
const settingsByKey = keyBy(action.settings, 'key');
return { ...state, ...settingsByKey };