eslint-remote-tester
Version:
Tool for running ESLint on multiple repositories
14 lines (13 loc) • 596 B
JavaScript
import React from 'react';
import { render } from 'ink';
import config from '../config/index.js';
import AppCI from './components/AppCI.js';
import AppCLI from './components/AppCLI.js';
export default function renderApplication() {
// Both stdout and stdin need to be TTY in order to get scrollbox working
const isTTY = !!(process.stdout.isTTY && process.stdin.isTTY);
render(config.CI ? React.createElement(AppCI, null) : React.createElement(AppCLI, { isTTY: isTTY }), {
// CLIs will exit by useScroll hook, CIs by default
exitOnCtrlC: config.CI || !isTTY,
});
}