chore: combine prettier with eslint (#9348) (#9360)

Co-authored-by: Martin Guillon <martin.guillon@akylas.fr>
This commit is contained in:
Nathan Walker
2021-05-02 10:11:37 -07:00
committed by GitHub
parent a6cb46dac2
commit 0d4ccba60a
25 changed files with 14 additions and 38 deletions

View File

@@ -6,13 +6,11 @@ import { getNodeById } from './dom-node';
import { mainThreadify } from '../utils';
// Use lazy requires for core modules
// eslint-disable-next-line @typescript-eslint/no-var-requires
const getAppRootView = () => require('../application').getRootView();
let unsetValue;
function unsetViewValue(view, name) {
if (!unsetValue) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
unsetValue = require('../ui/core/properties').unsetValue;
}

View File

@@ -14,11 +14,8 @@ function lazy<T>(action: () => T): () => T {
return () => _value || (_value = action());
}
// eslint-disable-next-line @typescript-eslint/no-var-requires
const percentLengthToStringLazy = lazy<(length) => string>(() => require('../ui/styling/style-properties').PercentLength.convertToString);
// eslint-disable-next-line @typescript-eslint/no-var-requires
const getSetPropertiesLazy = lazy<(view: ViewBase) => [string, any][]>(() => require('../ui/core/properties').getSetProperties);
// eslint-disable-next-line @typescript-eslint/no-var-requires
const getComputedCssValuesLazy = lazy<(view: ViewBase) => [string, any][]>(() => require('../ui/core/properties').getComputedCssValues);
export function registerInspectorEvents(inspector: InspectorEvents) {

View File

@@ -1,5 +1,4 @@
import * as inspectorCommandTypes from './InspectorBackendCommands.ios';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const inspectorCommands: typeof inspectorCommandTypes = require('./InspectorBackendCommands');
import * as debuggerDomains from '.';

View File

@@ -1,5 +1,4 @@
import * as inspectorCommandTypes from './InspectorBackendCommands.ios';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const inspectorCommands: typeof inspectorCommandTypes = require('./InspectorBackendCommands');
import * as debuggerDomains from '.';

View File

@@ -1,5 +1,4 @@
import * as inspectorCommandTypes from './InspectorBackendCommands.ios';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const inspectorCommands: typeof inspectorCommandTypes = require('./InspectorBackendCommands');
import * as debuggerDomains from '.';