mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 06:00:06 +02:00
style: update root lint rules
This commit is contained in:
parent
0667ca8ad3
commit
61d1df94c1
@ -1,3 +1,7 @@
|
||||
{
|
||||
"extends": "./packages/eslint-config/index.js"
|
||||
"extends": "./packages/eslint-config/index.js",
|
||||
"rules": {
|
||||
"new-cap": 0,
|
||||
"no-console": 0
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,8 @@ const getDeploymentGroups = query =>
|
||||
.filter(find(cleanQuery(query)))
|
||||
.map(getDeploymentGroupServices);
|
||||
|
||||
const getPortal = () => Object.assign({}, portal, {
|
||||
const getPortal = () =>
|
||||
Object.assign({}, portal, {
|
||||
datacenter,
|
||||
deploymentGroups: getDeploymentGroups()
|
||||
});
|
||||
@ -42,8 +43,10 @@ const getServices = query =>
|
||||
|
||||
module.exports = {
|
||||
portal: (options, request, fn) => fn(null, getPortal()),
|
||||
deploymentGroups: (options, request, fn) => fn(null, getDeploymentGroups(options)),
|
||||
deploymentGroup: (options, request, fn) => fn(null, getDeploymentGroups(options).shift()),
|
||||
deploymentGroups: (options, request, fn) =>
|
||||
fn(null, getDeploymentGroups(options)),
|
||||
deploymentGroup: (options, request, fn) =>
|
||||
fn(null, getDeploymentGroups(options).shift()),
|
||||
services: (options, request, fn) => fn(null, getServices()),
|
||||
service: (options, request, fn) => fn(null, getServices(options).shift())
|
||||
};
|
||||
|
@ -24,7 +24,8 @@
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint . --fix --format=tap",
|
||||
"lint": "eslint . --fix",
|
||||
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/pseudo-yaml-ast.xml",
|
||||
"test:run": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text ava",
|
||||
"test-ci:run": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text ava --tap | tap-xunit > $CIRCLE_TEST_REPORTS/test/pseudo-yaml-ast.xml",
|
||||
"test": "redrun build test:run",
|
||||
|
@ -9,7 +9,7 @@
|
||||
"scripts": {
|
||||
"lint:css": "exit 0",
|
||||
"lint-ci:css": "exit 0",
|
||||
"lint:js": "eslint . --fix --format=tap",
|
||||
"lint:js": "eslint . --fix",
|
||||
"lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/ui-toolkit.xml",
|
||||
"lint": "redrun -s lint:*",
|
||||
"lint-ci": "redrun -s lint-ci:*",
|
||||
|
@ -34,7 +34,7 @@ const StyledButton = styled(Button)`
|
||||
}
|
||||
`;
|
||||
|
||||
const TooltipButton = (props) => (
|
||||
const TooltipButton = props => (
|
||||
<li>
|
||||
<StyledButton {...props} />
|
||||
</li>
|
||||
|
@ -8,10 +8,10 @@ import { border, borderRadius, tooltipShadow } from '../boxes';
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
position: absolute;
|
||||
top: ${(props) => props.top};
|
||||
left: ${(props) => props.left};
|
||||
bottom: ${(props) => props.bottoms};
|
||||
right: ${(props) => props.right};
|
||||
top: ${props => props.top};
|
||||
left: ${props => props.left};
|
||||
bottom: ${props => props.bottoms};
|
||||
right: ${props => props.right};
|
||||
`;
|
||||
|
||||
const StyledList = styled.ul`
|
||||
@ -61,12 +61,7 @@ const Tooltip = ({
|
||||
bottom = 'auto',
|
||||
right = 'auto'
|
||||
}) => (
|
||||
<StyledContainer
|
||||
top={top}
|
||||
left={left}
|
||||
bottom={bottom}
|
||||
right={right}
|
||||
>
|
||||
<StyledContainer top={top} left={left} bottom={bottom} right={right}>
|
||||
<StyledList>
|
||||
{children}
|
||||
</StyledList>
|
||||
@ -79,6 +74,6 @@ Tooltip.propTypes = {
|
||||
left: PropTypes.number,
|
||||
bottom: PropTypes.number,
|
||||
right: PropTypes.number
|
||||
}
|
||||
};
|
||||
|
||||
export default Tooltip;
|
||||
|
@ -344,15 +344,12 @@ const tasks = [
|
||||
const tagName = `${pkg.name}-${releaseType}@${version}`;
|
||||
const tagBody = `${EOL}${lastCommits}`;
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
`${prefix}${chalk.yellow('Tag Name: ')}\n${prefix}${prefix}${chalk.dim(tagName)}`
|
||||
);
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`${prefix}${chalk.yellow('Tag Description: ')}`);
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
`${chalk.dim(lastCommits
|
||||
.split(/\n/)
|
||||
@ -441,12 +438,10 @@ const run = (tasks = [], ctx = {}, prefix = '') =>
|
||||
}
|
||||
|
||||
if (isString(title)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`${prefix}${chalk.green(figures.arrowRight)} ${title}`);
|
||||
}
|
||||
|
||||
if (isString(description)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
`${chalk.dim(`${prefix}${figures.arrowRight} ${description}`)}`
|
||||
);
|
||||
@ -459,10 +454,8 @@ const run = (tasks = [], ctx = {}, prefix = '') =>
|
||||
const [err, nCtx] = await intercept(task(context));
|
||||
|
||||
if (err) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`${chalk.red(figures.cross)} ${chalk.dim(err.message)}`);
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
`${chalk.dim(err.stack.replace(`Error: ${err.message}`, '').trim())}`
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user