Skip to content

Commit

Permalink
Merge pull request #45 from DeterminateSystems/prettier-config
Browse files Browse the repository at this point in the history
Add prettier config
  • Loading branch information
lucperkins authored Apr 22, 2024
2 parents 6718417 + 3f91a4c commit ab33fc2
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install pnpm dependencies
run: nix develop --command pnpm install
- name: Check formatting
run: nix develop --command pnpm run format
run: nix develop --command pnpm run check-fmt
- name: Lint
run: nix develop --command pnpm run lint
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist
pnpm-lock.yaml

44 changes: 22 additions & 22 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"build": "tsup",
"format": "prettier --write .",
"check-fmt": "prettier --check .",
"lint": "eslint src/**/*.ts",
"package": "ncc build",
"all": "pnpm run format && pnpm run lint && pnpm run build && pnpm run package"
Expand Down
12 changes: 12 additions & 0 deletions prettier.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @type {import('prettier').Config} */
module.exports = {
plugins: [require.resolve("@trivago/prettier-plugin-sort-imports")],
semi: true,
singleQuote: false,
tabWidth: 2,
trailingComma: "all",
useTabs: false,
// Import sorting
importOrderSeparation: true,
importOrderSortSpecifiers: true,
};
13 changes: 6 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import * as core from "@actions/core";
import { IdsToolbox } from "detsys-ts";
import got from "got";
import * as http from "http";
import { SpawnOptions, exec, spawn } from "node:child_process";
import { openSync, readFileSync } from "node:fs";
import * as fs from "node:fs/promises";
import * as os from "node:os";
import * as path from "node:path";
import { spawn, exec, SpawnOptions } from "node:child_process";
import { openSync, readFileSync } from "node:fs";
import { inspect, promisify } from "node:util";
import * as http from "http";

import * as core from "@actions/core";
import { Tail } from "tail";
import got from "got";
import { IdsToolbox } from "detsys-ts";

const ENV_CACHE_DAEMONDIR = "MAGIC_NIX_CACHE_DAEMONDIR";

Expand Down

0 comments on commit ab33fc2

Please sign in to comment.