Skip to content

Commit

Permalink
Remove ci preset (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer authored Dec 16, 2022
1 parent 77d7ae5 commit 88be0df
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 183 deletions.
5 changes: 5 additions & 0 deletions .changeset/lovely-snakes-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/foundry': major
---

Removed the `ci` preset. Refer to the official [GitHub Actions documentation](https://docs.github.com/en/actions) to write your own workflow.
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![NPM version](https://img.shields.io/npm/v/@sumup/foundry)](https://www.npmjs.com/package/@sumup/foundry) [![Code coverage](https://img.shields.io/codecov/c/github/sumup-oss/foundry)](https://codecov.io/gh/sumup-oss/foundry) [![License](https://img.shields.io/github/license/sumup-oss/foundry)](https://github.com/sumup-oss/foundry/blob/main/LICENSE) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.1%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)

A toolkit that makes it a breeze to set up and maintain JavaScript + TypeScript applications. Foundry has presets for [🔍 linting](#-lint) and [🤖 continuous integration (CI)](#-continuous-integration-ci), and currently supports [Next.js](https://nextjs.org), [React](https://reactjs.org), [Emotion](https://emotion.sh/), [Jest](https://jestjs.io/), [Testing Library](https://testing-library.com/), [Cypress](https://www.cypress.io/), [Playwright](https://playwright.dev/) and [Node](https://nodejs.org/en/).
A toolkit that makes it a breeze to set up and maintain JavaScript + TypeScript applications. Foundry has presets for [🔍 linting](#-lint) and currently supports [Next.js](https://nextjs.org), [React](https://reactjs.org), [Emotion](https://emotion.sh/), [Jest](https://jestjs.io/), [Testing Library](https://testing-library.com/), [Cypress](https://www.cypress.io/), [Playwright](https://playwright.dev/) and [Node](https://nodejs.org/en/).

</div>

Expand All @@ -16,7 +16,6 @@ A toolkit that makes it a breeze to set up and maintain JavaScript + TypeScript
- [Configuration](#configuration)
- [Presets](#presets)
- [🔍 Lint](#-lint)
- [🤖 Continuous Integration (CI)](#-continuous-integration-ci)
- [Running a tool](#running-a-tool)
- [Why?](#why)
- [Code of conduct (CoC)](#code-of-conduct-coc)
Expand Down Expand Up @@ -123,12 +122,6 @@ The preset includes the following tools:
- **[lint-staged](https://www.npmjs.com/package/lint-staged)** is a tool for running linters on files staged for your next commit in git. Together with Husky (see below) it prevents problematic code from being committed.
- **[Husky](https://github.com/typicode/husky)** makes setting up git hooks very easy. Whenever someone installs your project, Husky will automatically set up git hooks as part of its `postinstall` script.

### 🤖 Continuous Integration (CI)

Validate the code on every push using the [🔍 linting](#-lint) preset (if configured). The supported CI providers are:

- **[GitHub Actions](https://github.com/features/actions)** builds, tests, and publishes your code right from GitHub.

## Running a tool

Foundry manages all supported tools for you and exposes them via the `run` command. As an example, to run ESLint through Foundry, execute:
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-testing-library": "^5.9.1",
"handlebars": "^4.7.3",
"husky": "^4.0.0",
"inquirer": "^8.2.4",
"is-ci": "^3.0.0",
Expand Down
61 changes: 0 additions & 61 deletions src/configs/ci/github-actions.ts

This file was deleted.

31 changes: 0 additions & 31 deletions src/configs/ci/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ import * as eslint from './eslint';
import * as husky from './husky';
import * as lintStaged from './lint-staged';
import * as prettier from './prettier';
import * as ci from './ci';

export const tools: { [key in Tool]?: ToolOptions } = {
[Tool.ESLINT]: eslint,
[Tool.HUSKY]: husky,
[Tool.LINT_STAGED]: lintStaged,
[Tool.PRETTIER]: prettier,
[Tool.CI]: ci,
};
40 changes: 0 additions & 40 deletions src/lib/handlebars.spec.ts

This file was deleted.

26 changes: 0 additions & 26 deletions src/lib/handlebars.ts

This file was deleted.

14 changes: 2 additions & 12 deletions src/presets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,9 @@ const lint: PresetConfig = {
prompts: [Prompt.OPEN_SOURCE],
};

const ci: PresetConfig = {
name: formatName(
'Continuous Integration',
'Validate the code on every push using the configured presets',
),
value: Preset.CI,
short: 'CI',
tools: [Tool.CI],
};

function formatName(name: string, description: string): string {
return [`${chalk.bold(name)}:`, description].join(' ');
}

export const presets = { lint, ci };
export const presetChoices = [lint, ci];
export const presets = { lint };
export const presetChoices = [lint];
2 changes: 0 additions & 2 deletions src/types/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ import type { NormalizedPackageJson } from 'read-pkg-up';

export enum Preset {
LINT = 'lint',
CI = 'ci',
}

export enum Tool {
ESLINT = 'eslint',
PRETTIER = 'prettier',
HUSKY = 'husky',
LINT_STAGED = 'lint-staged',
CI = 'ci',
}

export enum Prompt {
Expand Down

0 comments on commit 88be0df

Please sign in to comment.