-
Notifications
You must be signed in to change notification settings - Fork 10
[risk=no][RW-7280] Enable some Prettier-compatible eslint rules #6199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
133e936
9be7c6b
ca730ed
06a3563
cee94ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,10 +83,18 @@ module.exports = { | |
|
||
'prettier/prettier': 'warn', | ||
|
||
'max-len': [ | ||
'warn', | ||
{ | ||
code: 140, | ||
ignorePattern: '^import |^export\\{(.*?)\\}', | ||
ignoreComments: true, | ||
}, | ||
], | ||
|
||
// temp disable others. re-enable if desired after determining that they don't conflict with prettier. | ||
|
||
// 'eol-last': 'warn', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. redundant |
||
// 'max-len': ['warn', {code: 140, ignorePattern: '^import |^export\\{(.*?)\\}', ignoreComments: true}], | ||
// 'no-trailing-spaces': 'warn', | ||
// 'quotes': ['warn', 'single'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. redundant |
||
// // 'brace-style': ['warn', '1tbs'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. redundant |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -557,85 +557,96 @@ describe('RuntimePanel', () => { | |
expect(runtimeApiStub.runtime.gceConfig).toBeFalsy(); | ||
}); | ||
|
||
it('should set runtime preset values in customize panel instead of getRuntime values if configurationType is GeneralAnalysis', async () => { | ||
// skip this test after enabling pd | ||
if (enablePd) { | ||
return; | ||
it( | ||
'should set runtime preset values in customize panel instead of getRuntime values ' + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. line was too long |
||
'if configurationType is GeneralAnalysis', | ||
async () => { | ||
// skip this test after enabling pd | ||
if (enablePd) { | ||
return; | ||
} | ||
const runtime = { | ||
...runtimeApiStub.runtime, | ||
status: RuntimeStatus.Deleted, | ||
configurationType: RuntimeConfigurationType.GeneralAnalysis, | ||
gceConfig: { | ||
...defaultGceConfig(), | ||
machineType: 'n1-standard-16', | ||
diskSize: 1000, | ||
}, | ||
dataprocConfig: null, | ||
}; | ||
runtimeApiStub.runtime = runtime; | ||
runtimeStoreStub.runtime = runtime; | ||
|
||
const wrapper = await component(); | ||
await mustClickButton(wrapper, 'Customize'); | ||
|
||
expect(getMainCpu(wrapper)).toEqual( | ||
findMachineByName( | ||
runtimePresets.generalAnalysis.runtimeTemplate.gceConfig.machineType | ||
).cpu | ||
); | ||
expect(getMainRam(wrapper)).toEqual( | ||
findMachineByName( | ||
runtimePresets.generalAnalysis.runtimeTemplate.gceConfig.machineType | ||
).memory | ||
); | ||
expect(getMainDiskSize(wrapper)).toEqual( | ||
runtimePresets.generalAnalysis.runtimeTemplate.gceConfig.diskSize | ||
); | ||
} | ||
const runtime = { | ||
...runtimeApiStub.runtime, | ||
status: RuntimeStatus.Deleted, | ||
configurationType: RuntimeConfigurationType.GeneralAnalysis, | ||
gceConfig: { | ||
...defaultGceConfig(), | ||
machineType: 'n1-standard-16', | ||
diskSize: 1000, | ||
}, | ||
dataprocConfig: null, | ||
}; | ||
runtimeApiStub.runtime = runtime; | ||
runtimeStoreStub.runtime = runtime; | ||
|
||
const wrapper = await component(); | ||
await mustClickButton(wrapper, 'Customize'); | ||
|
||
expect(getMainCpu(wrapper)).toEqual( | ||
findMachineByName( | ||
runtimePresets.generalAnalysis.runtimeTemplate.gceConfig.machineType | ||
).cpu | ||
); | ||
expect(getMainRam(wrapper)).toEqual( | ||
findMachineByName( | ||
runtimePresets.generalAnalysis.runtimeTemplate.gceConfig.machineType | ||
).memory | ||
); | ||
expect(getMainDiskSize(wrapper)).toEqual( | ||
runtimePresets.generalAnalysis.runtimeTemplate.gceConfig.diskSize | ||
); | ||
}); | ||
|
||
it('should set runtime preset values in customize panel instead of getRuntime values if configurationType is HailGenomicsAnalysis', async () => { | ||
const runtime = { | ||
...runtimeApiStub.runtime, | ||
status: RuntimeStatus.Deleted, | ||
configurationType: RuntimeConfigurationType.HailGenomicAnalysis, | ||
gceConfig: null, | ||
dataprocConfig: { | ||
...defaultDataprocConfig(), | ||
masterMachineType: 'n1-standard-16', | ||
masterDiskSize: 999, | ||
workerDiskSize: 444, | ||
numberOfWorkers: 5, | ||
}, | ||
}; | ||
runtimeApiStub.runtime = runtime; | ||
runtimeStoreStub.runtime = runtime; | ||
|
||
const wrapper = await component(); | ||
await mustClickButton(wrapper, 'Customize'); | ||
|
||
expect(getMainCpu(wrapper)).toEqual( | ||
findMachineByName( | ||
); | ||
|
||
it( | ||
'should set runtime preset values in customize panel instead of getRuntime values ' + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. line was too long |
||
'if configurationType is HailGenomicsAnalysis', | ||
async () => { | ||
const runtime = { | ||
...runtimeApiStub.runtime, | ||
status: RuntimeStatus.Deleted, | ||
configurationType: RuntimeConfigurationType.HailGenomicAnalysis, | ||
gceConfig: null, | ||
dataprocConfig: { | ||
...defaultDataprocConfig(), | ||
masterMachineType: 'n1-standard-16', | ||
masterDiskSize: 999, | ||
workerDiskSize: 444, | ||
numberOfWorkers: 5, | ||
}, | ||
}; | ||
runtimeApiStub.runtime = runtime; | ||
runtimeStoreStub.runtime = runtime; | ||
|
||
const wrapper = await component(); | ||
await mustClickButton(wrapper, 'Customize'); | ||
|
||
expect(getMainCpu(wrapper)).toEqual( | ||
findMachineByName( | ||
runtimePresets.hailAnalysis.runtimeTemplate.dataprocConfig | ||
.masterMachineType | ||
).cpu | ||
); | ||
expect(getMainRam(wrapper)).toEqual( | ||
findMachineByName( | ||
runtimePresets.hailAnalysis.runtimeTemplate.dataprocConfig | ||
.masterMachineType | ||
).memory | ||
); | ||
expect(getMainDiskSize(wrapper)).toEqual( | ||
runtimePresets.hailAnalysis.runtimeTemplate.dataprocConfig | ||
.masterMachineType | ||
).cpu | ||
); | ||
expect(getMainRam(wrapper)).toEqual( | ||
findMachineByName( | ||
.masterDiskSize | ||
); | ||
expect(getWorkerDiskSize(wrapper)).toEqual( | ||
runtimePresets.hailAnalysis.runtimeTemplate.dataprocConfig | ||
.masterMachineType | ||
).memory | ||
); | ||
expect(getMainDiskSize(wrapper)).toEqual( | ||
runtimePresets.hailAnalysis.runtimeTemplate.dataprocConfig.masterDiskSize | ||
); | ||
expect(getWorkerDiskSize(wrapper)).toEqual( | ||
runtimePresets.hailAnalysis.runtimeTemplate.dataprocConfig.workerDiskSize | ||
); | ||
expect(getNumWorkers(wrapper)).toEqual( | ||
runtimePresets.hailAnalysis.runtimeTemplate.dataprocConfig.numberOfWorkers | ||
); | ||
}); | ||
.workerDiskSize | ||
); | ||
expect(getNumWorkers(wrapper)).toEqual( | ||
runtimePresets.hailAnalysis.runtimeTemplate.dataprocConfig | ||
.numberOfWorkers | ||
); | ||
} | ||
); | ||
|
||
it('should allow configuration via dataproc preset from modified form', async () => { | ||
runtimeApiStub.runtime = null; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -429,7 +429,9 @@ describe('WorkspaceEdit', () => { | |
CdrVersionsStubVariables.DEFAULT_WORKSPACE_CDR_VERSION_ID | ||
); | ||
|
||
const expectedUpgradeMessage = `${CdrVersionsStubVariables.ALT_WORKSPACE_CDR_VERSION} to ${CdrVersionsStubVariables.DEFAULT_WORKSPACE_CDR_VERSION}.`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. line too long |
||
const { ALT_WORKSPACE_CDR_VERSION, DEFAULT_WORKSPACE_CDR_VERSION } = | ||
CdrVersionsStubVariables; | ||
const expectedUpgradeMessage = `${ALT_WORKSPACE_CDR_VERSION} to ${DEFAULT_WORKSPACE_CDR_VERSION}.`; | ||
const cdrUpgradeMessage = wrapper | ||
.find('[data-test-id="cdr-version-upgrade"]') | ||
.first() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,7 +177,9 @@ describe('resources.tsx', () => { | |
}); | ||
|
||
it('should return resource URLs', () => { | ||
const WORKSPACE_URL_PREFIX = `/workspaces/${WorkspaceStubVariables.DEFAULT_WORKSPACE_NS}/${WorkspaceStubVariables.DEFAULT_WORKSPACE_ID}`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. line too long |
||
const { DEFAULT_WORKSPACE_NS, DEFAULT_WORKSPACE_ID } = | ||
WorkspaceStubVariables; | ||
const WORKSPACE_URL_PREFIX = `/workspaces/${DEFAULT_WORKSPACE_NS}/${DEFAULT_WORKSPACE_ID}`; | ||
const EXPECTED_COHORT_URL = `${WORKSPACE_URL_PREFIX}/data/cohorts/build?cohortId=${COHORT_ID}`; | ||
const EXPECTED_COHORT_REVIEW_URL = `${WORKSPACE_URL_PREFIX}/data/cohorts/${COHORT_REVIEW_COHORT_ID}/review`; | ||
const EXPECTED_CONCEPT_SET_URL = `${WORKSPACE_URL_PREFIX}/data/concepts/sets/${CONCEPT_SET_ID}`; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 2 are compatible and non-redundant to Prettier