Skip to content

Commit

Permalink
Rebrand from eslint-config-harmony to ultracite (#129)
Browse files Browse the repository at this point in the history
* Restore website

* Switch from Yarn to pnpm, remove old deps

* Bump deps

* Linting fixes

* Remove gradient

* Misc ref fixes

* Update package.json

* Add temp graphics, misc cleanup

* Update font, colors and logo

* Merge all content into Page

* Misc cleanup

* Fetch readme, fix syntax highlighting

* Start working on rebuild

* Scrap all changelog junk

* Install shadcn/ui accordion

* Rework changelog into accordion

* Authenticate octokit, finish accordion

* Fix responsive design

* Finish website design

* Rename project

* Update README.md

* Create .npmignore
  • Loading branch information
haydenbleasel authored May 27, 2024
1 parent 209d698 commit 1c1feda
Show file tree
Hide file tree
Showing 32 changed files with 12,686 additions and 136 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
website/
204 changes: 102 additions & 102 deletions CHANGELOG.md

Large diffs are not rendered by default.

48 changes: 20 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,21 @@

<br />

# Harmony
# Ultracite

**Strict, opinionated ESLint config for modern TypeScript apps.**
Ultracite is a robust linting preset for modern TypeScript apps. It's comprised of configuration files for [ESLint](https://eslint.org/), [Prettier](https://prettier.io/) and [Stylelint](https://stylelint.io/). It is incredibly opinionated and strict, enforcing the maximum amount of type safety and code quality through ESLint rules and TypeScript compiler options. It is designed for [Next.js](https://nextjs.org/) apps, but can be used with any TypeScript project, such as [React Native](https://reactnative.dev/) or [Node.js](https://nodejs.org/).

<img src="https://img.shields.io/github/actions/workflow/status/haydenbleasel/eslint-config-harmony/push.yaml" alt="" />
<img src="https://img.shields.io/github/actions/workflow/status/haydenbleasel/ultracite/push.yaml" alt="" />

<img src="https://img.shields.io/npm/dy/eslint-config-harmony" alt="" />
<img src="https://img.shields.io/npm/dy/ultracite" alt="" />

<img src="https://img.shields.io/npm/v/eslint-config-harmony" alt="" />
<img src="https://img.shields.io/npm/v/ultracite" alt="" />

<img src="https://img.shields.io/github/license/haydenbleasel/eslint-config-harmony" alt="" />

<hr />

## Overview

Harmony is an ESLint config for modern TypeScript apps. It's designed to be used with [Prettier](https://prettier.io/) and [Stylelint](https://stylelint.io/). It is incredibly opinionated and strict, enforcing the maximum amount of type safety and code quality through ESLint rules and TypeScript compiler options. It is designed for [Next.js](https://nextjs.org/) apps, but can be used with any TypeScript project, such as [React Native](https://reactnative.dev/) or [Node.js](https://nodejs.org/).

Harmony is designed to be used with [VS Code](https://code.visualstudio.com/), and includes a `.vscode/settings.json` file that enables full formatting on save.
<img src="https://img.shields.io/github/license/haydenbleasel/ultracite" alt="" />

## Features

By default, Harmony combines with pre-defined rulesets for [ESLint](https://eslint.org/), as well as:
By default, Ultracite combines with pre-defined rulesets for [ESLint](https://eslint.org/), as well as:

- [Import](https://www.npmjs.com/package/eslint-plugin-import)
- [jsx-a11y](https://www.npmjs.com/package/eslint-plugin-jsx-a11y)
Expand All @@ -43,10 +35,10 @@ By default, Harmony combines with pre-defined rulesets for [ESLint](https://esli

## Installation

Run the command below to install Harmony with peer dependencies:
Run the command below to install Ultracite with peer dependencies:

```sh
pnpm add -D eslint-config-harmony eslint@8 prettier stylelint typescript jest
pnpm add -D ultracite eslint@8 prettier stylelint typescript jest
```

If you're running [VS Code](https://code.visualstudio.com/), ensure you have the following extensions installed:
Expand All @@ -63,23 +55,23 @@ code --install-extension stylelint.vscode-stylelint
Create an `eslint.config.mjs` with the following contents:

```js
import harmony from 'eslint-config-harmony';
import ultracite from 'ultracite';

export default harmony;
export default ultracite;
```

Add the following to your `package.json`:

```json
{
"prettier": "eslint-config-harmony/prettier",
"prettier": "ultracite/prettier",
"stylelint": {
"extends": "eslint-config-harmony/stylelint"
"extends": "ultracite/stylelint"
}
}
```

Create a `.vscode/settings.json` file with the following contents:
Ultracite is designed to be used with [VS Code](https://code.visualstudio.com/), and includes a `.vscode/settings.json` file that enables full formatting on save. Create a `.vscode/settings.json` file with the following contents:

```json
{
Expand Down Expand Up @@ -116,35 +108,35 @@ Lastly, ensure your `tsconfig.json` (if it exists) includes your new ESLint conf

## Usage

Once Harmony is set up, it will automatically format your code on save.
Once Ultracite is set up, it will automatically format your code on save.

## Configuration

You can opt-out of certain rules by modifying your `eslint.config.mjs` file. For example, here's a common exception I use to avoid linting [shadcn/ui](https://ui.shadcn.com/) components:

```js
import harmony from 'eslint-config-harmony';
import ultracite from 'ultracite';

harmony.forEach((config) => {
ultracite.forEach((config) => {
if (config.ignores) {
config.ignores.push('./components/ui/**/*');
} else {
config.ignores = ['./components/ui/**/*'];
}
});

export default harmony;
export default ultracite;
```

## Debugging

If you're having issues with Harmony, you can open the ESLint Output panel in VS Code to see what's going on. Optimally, it should look something like this:
If you're having issues with Ultracite, you can open the ESLint Output panel in VS Code to see what's going on. Optimally, it should look something like this:

```
[Info - 10:42:49 PM] ESLint server is starting.
[Info - 10:42:49 PM] ESLint server running in node v18.15.0
[Info - 10:42:49 PM] ESLint server is running.
[Info - 10:42:50 PM] ESLint library loaded from: /Users/haydenbleasel/GitHub/harmony/node_modules/.pnpm/eslint@8.51.0/node_modules/eslint/lib/unsupported-api.js
[Info - 10:42:50 PM] ESLint library loaded from: /Users/haydenbleasel/GitHub/ultracite/node_modules/.pnpm/eslint@8.51.0/node_modules/eslint/lib/unsupported-api.js
```

If you see any errors, it could be related to peer dependencies or changes in dependency versions. Feel free to report these as issues.
Expand Down
2 changes: 1 addition & 1 deletion logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"stylelint": "^16.0.2",
"typescript": "^5.3.3"
},
"name": "eslint-config-harmony",
"name": "ultracite",
"description": "Strict, opinionated ESLint config for modern TypeScript apps.",
"version": "3.1.11",
"publishConfig": {
Expand All @@ -46,11 +46,11 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/haydenbleasel/eslint-config-harmony.git"
"url": "git+https://github.com/haydenbleasel/ultracite.git"
},
"main": "./eslint.config.mjs",
"keywords": [
"harmony",
"ultracite",
"eslint",
"prettier",
"stylelint",
Expand All @@ -59,9 +59,9 @@
"author": "Hayden Bleasel <hello@haydenbleasel.com>",
"license": "ISC",
"bugs": {
"url": "https://github.com/haydenbleasel/eslint-config-harmony/issues"
"url": "https://github.com/haydenbleasel/ultracite/issues"
},
"homepage": "https://github.com/haydenbleasel/eslint-config-harmony#readme",
"homepage": "https://github.com/haydenbleasel/ultracite#readme",
"prettier": "./prettier.js",
"stylelint": {
"extends": "./stylelint.js"
Expand Down
32 changes: 32 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel
19 changes: 19 additions & 0 deletions website/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"emmet.showExpandedAbbreviation": "never",
"editor.codeActionsOnSave": {
"source.fixAll.esbenp.prettier-vscode": "explicit",
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"eslint.useFlatConfig": true,
"eslint.options": {
"overrideConfigFile": "eslint.config.mjs"
}
}
Loading

0 comments on commit 1c1feda

Please sign in to comment.