RN: Cleanup Existing ESLint Warnings

Summary:
Sometime over the past few months (and with changes such as migrating to the `hermes-eslint` parser), a bunch of lint warnings crept into the codebase.

This does a pass to clean them all up, ignore generated files, and refactor some code to be... better.

There should be no observable behavior changes as a result of this.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D38646643

fbshipit-source-id: a7b55d1e4cd5700340cc5c21f928baf3ea1d5a58
This commit is contained in:
Tim Yung
2022-08-12 17:16:40 -07:00
committed by Facebook GitHub Bot
parent 459b25ce43
commit b8425c8ee5
23 changed files with 45 additions and 32 deletions
@@ -12,20 +12,18 @@
const sut = require('../generate-specs-cli-executor');
const fixtures = require('../__test_fixtures__/fixtures');
const path = require('path');
const {normalize} = require('path');
describe('generateSpec', () => {
it('invokes RNCodegen with the right params', () => {
const platform = 'ios';
const libraryType = 'all';
const schemaPath = './';
const componentsOutputDir = path.normalize(
const componentsOutputDir = normalize(
'app/ios/build/generated/ios/react/renderer/components/library',
);
const modulesOutputDir = path.normalize(
'app/ios/build/generated/ios/library',
);
const outputDirectory = path.normalize('app/ios/build/generated/ios');
const modulesOutputDir = normalize('app/ios/build/generated/ios/library');
const outputDirectory = normalize('app/ios/build/generated/ios');
const libraryName = 'library';
const packageName = 'com.library';
const generators = ['componentsIOS', 'modulesIOS'];