Skip to content

Commit

Permalink
enable no-unsafe-call rule
Browse files Browse the repository at this point in the history
  • Loading branch information
bgawkuc committed May 22, 2024
1 parent c8ca386 commit 8f019fd
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ module.exports = {
__DEV__: 'readonly',
},
rules: {
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const run = () => {
}

if (current.name && current.meanDuration && current.meanCount && timestamp) {
const formattedName = current.name.split(' ').join('-');
const currentName = current.name as string;
const formattedName = currentName.split(' ').join('-');

const renderDurationString = `${GRAPHITE_PATH}.${formattedName}.renderDuration ${current.meanDuration} ${timestamp}`;
const renderCountString = `${GRAPHITE_PATH}.${formattedName}.renderCount ${current.meanCount} ${timestamp}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ type SwitchToCurrentReportProps = {
callback: () => void;
};

const {RNTextInputReset} = NativeModules;
type RNTextInputResetProps = {
resetKeyboardInput: (nodeHandle: number | null) => void;
};

const RNTextInputReset: RNTextInputResetProps = NativeModules.RNTextInputReset;

const isIOSNative = getPlatform() === CONST.PLATFORM.IOS;

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/markPullRequestsAsDeployedTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type CommitData = {
};
};

let run;
let run: () => Promise<void>;

const mockGetInput = jest.fn();
const mockGetPullRequest = jest.fn();
Expand Down
3 changes: 2 additions & 1 deletion workflow_tests/utils/ExtendedAct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ type ActOptions = {
// @ts-expect-error Override shouldn't be done on private methods wait until https://github.com/kiegroup/act-js/issues/77 is resolved or try to create a params workaround
class ExtendedAct extends Act {
async parseRunOpts(opts?: ExtendedActOpts): Promise<ActOptions> {
const {cwd, actArguments, proxy} = await super['parseRunOpts'](opts);
const parseSuperRunOpts: (opts?: ExtendedActOpts) => Promise<ActOptions> = super['parseRunOpts'];
const {cwd, actArguments, proxy} = await parseSuperRunOpts(opts);

if (opts?.actor) {
actArguments.push('--actor', opts.actor);
Expand Down
3 changes: 2 additions & 1 deletion workflow_tests/utils/preGenerateTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ const getMockFileContent = (workflowName: string, jobs: Record<string, YamlMockJ
let mockStepsContent = `\n// ${jobId.toLowerCase()}`;
const stepMocks: string[] = [];
job.steps.forEach((step) => {
const stepMockName = `${workflowName.toUpperCase()}__${jobId.toUpperCase()}__${step.name
const stepName = step.name as string;
const stepMockName = `${workflowName.toUpperCase()}__${jobId.toUpperCase()}__${stepName
.replaceAll(' ', '_')
.replaceAll('-', '_')
.replaceAll(',', '')
Expand Down

0 comments on commit 8f019fd

Please sign in to comment.