Merge pull request #6307 from mabashian/eslint-5-6-upgrade

Bumps eslint from 5.6 to 6.8

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-03-17 20:24:13 +00:00 committed by GitHub
commit f86cbf33aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 544 additions and 249 deletions

View File

@ -8,9 +8,7 @@
"modules": true
}
},
"plugins": [
"react-hooks"
],
"plugins": ["react-hooks"],
"extends": ["airbnb", "prettier", "prettier/react"],
"settings": {
"import/resolver": {
@ -34,7 +32,7 @@
"camelcase": "off",
"arrow-parens": "off",
"comma-dangle": "off",
"//": "https://github.com/benmosher/eslint-plugin-import/issues/479#issuecomment-252500896",
// https://github.com/benmosher/eslint-plugin-import/issues/479#issuecomment-252500896
"import/no-extraneous-dependencies": "off",
"max-len": [
"error",

File diff suppressed because it is too large Load Diff

View File

@ -36,7 +36,7 @@
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.3.5",
"eslint": "^5.6.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^5.0.0",
"eslint-import-resolver-webpack": "0.11.1",

View File

@ -117,16 +117,18 @@ function InventoryGroupsList({ i18n, location, match }) {
setIsLoading(true);
try {
/* eslint-disable no-await-in-loop, no-restricted-syntax */
/* eslint-disable no-await-in-loop */
/* Delete groups sequentially to avoid api integrity errors */
for (const group of selected) {
/* https://eslint.org/docs/rules/no-await-in-loop#when-not-to-use-it */
for (let i = 0; i < selected.length; i++) {
const group = selected[i];
if (option === 'delete') {
await GroupsAPI.destroy(+group.id);
} else if (option === 'promote') {
await InventoriesAPI.promoteGroup(inventoryId, +group.id);
}
}
/* eslint-enable no-await-in-loop, no-restricted-syntax */
/* eslint-enable no-await-in-loop */
} catch (error) {
setDeletionError(error);
}

View File

@ -81,8 +81,8 @@ describe('<OrganizationDetail />', () => {
{ label: 'Last Modified', value: '8/11/2019, 7:47:37 PM' },
{ label: 'Max Hosts', value: '0' },
];
// eslint-disable-next-line no-restricted-syntax
for (const { label, value } of testParams) {
for (let i = 0; i < testParams.length; i++) {
const { label, value } = testParams[i];
// eslint-disable-next-line no-await-in-loop
const detail = await waitForElement(wrapper, `Detail[label="${label}"]`);
expect(detail.find('dt').text()).toBe(label);

View File

@ -46,8 +46,8 @@ describe('<TeamDetail />', () => {
{ label: 'Created', value: '7/7/2015, 5:21:26 PM' },
{ label: 'Last Modified', value: '8/11/2019, 7:47:37 PM' },
];
// eslint-disable-next-line no-restricted-syntax
for (const { label, value } of testParams) {
for (let i = 0; i < testParams.length; i++) {
const { label, value } = testParams[i];
// eslint-disable-next-line no-await-in-loop
const detail = await waitForElement(wrapper, `Detail[label="${label}"]`);
expect(detail.find('dt').text()).toBe(label);