aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projectsManagement
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-10-23 20:38:19 +0200
committerStas Vilchik <stas.vilchik@sonarsource.com>2017-10-30 09:20:37 +0100
commit3aeea07185ebb2eceeab4a0ec520f7d641d02f39 (patch)
tree0406942e88fa3ae9d9539186ff31520beaac90ac /server/sonar-web/src/main/js/apps/projectsManagement
parent973d117229fc17176e9ea3384ec4a737178b28c2 (diff)
downloadsonarqube-3aeea07185ebb2eceeab4a0ec520f7d641d02f39.tar.gz
sonarqube-3aeea07185ebb2eceeab4a0ec520f7d641d02f39.zip
use eslint for typescript, update eslint configuration (#2742)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectsManagement')
-rw-r--r--server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx1
-rw-r--r--server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx1
-rw-r--r--server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx1
-rw-r--r--server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Projects-test.tsx1
7 files changed, 9 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx
index 314988d7eed..3e81e28cb5c 100644
--- a/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx
+++ b/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx
@@ -69,7 +69,7 @@ export default class BulkApplyTemplateModal extends React.PureComponent<Props, S
loading: false,
permissionTemplate:
permissionTemplates.length > 0 ? permissionTemplates[0].id : undefined,
- permissionTemplates: permissionTemplates
+ permissionTemplates
});
}
},
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx
index d41a5c5e1bb..94318dbae7c 100644
--- a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx
+++ b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx
@@ -22,8 +22,7 @@ import * as Select from 'react-select';
import { sortBy } from 'lodash';
import BulkApplyTemplateModal from './BulkApplyTemplateModal';
import DeleteModal from './DeleteModal';
-import { QUALIFIERS_ORDER } from './utils';
-import { Project } from './utils';
+import { QUALIFIERS_ORDER, Project } from './utils';
import { Organization } from '../../app/types';
import Checkbox from '../../components/controls/Checkbox';
import { translate } from '../../helpers/l10n';
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx
index 0fb6b1d21d0..dadd3a45a1b 100644
--- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx
+++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx
@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+/* eslint-disable import/first, import/order */
jest.mock('lodash', () => {
const lodash = require.requireActual('lodash');
lodash.debounce = (fn: Function) => (...args: any[]) => fn(args);
@@ -25,6 +26,7 @@ jest.mock('lodash', () => {
// actual version breaks `mount`
jest.mock('rc-tooltip', () => ({
+ // eslint-disable-next-line
default: function Tooltip() {
return null;
}
@@ -81,7 +83,7 @@ it('searches', () => {
expect(getComponents).lastCalledWith({ ...defaultSearchParameters, q: 'foo', qualifiers: 'TRK' });
});
-it('loads more', async () => {
+it('loads more', () => {
const wrapper = mountRender();
wrapper.find('ListFooter').prop<Function>('loadMore')();
expect(getComponents).lastCalledWith({ ...defaultSearchParameters, p: 2, qualifiers: 'TRK' });
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx
index cdb33cf7f33..75368168411 100644
--- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx
+++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx
@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+/* eslint-disable import/first, import/order */
jest.mock('../../../api/permissions', () => ({
bulkApplyTemplate: jest.fn(() => Promise.resolve()),
getPermissionTemplates: jest.fn(() => Promise.resolve({ permissionTemplates: [] }))
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx
index bd8c3114b4e..c514345b78a 100644
--- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx
+++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx
@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+/* eslint-disable import/first, import/order */
jest.mock('../../../api/components', () => ({
createProject: jest.fn(({ name }: { name: string }) =>
Promise.resolve({ project: { key: name, name } })
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx
index 976be4403a8..d73e5306632 100644
--- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx
+++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx
@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+/* eslint-disable import/first, import/order */
jest.mock('../../../api/components', () => ({
bulkDeleteProjects: jest.fn(() => Promise.resolve())
}));
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Projects-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Projects-test.tsx
index 792e29ccc48..cc29a0e243d 100644
--- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Projects-test.tsx
+++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Projects-test.tsx
@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+/* eslint-disable import/first */
jest.mock('../../permissions/project/views/ApplyTemplateView');
import * as React from 'react';