mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-23 05:22:07 +01:00
Add prettier config
This commit is contained in:
parent
6718417fb9
commit
79316a7a03
4 changed files with 20 additions and 8 deletions
|
@ -1,2 +1,2 @@
|
||||||
|
dist
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup",
|
"build": "tsup",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
|
"check-fmt": "prettier --check .",
|
||||||
"lint": "eslint src/**/*.ts",
|
"lint": "eslint src/**/*.ts",
|
||||||
"package": "ncc build",
|
"package": "ncc build",
|
||||||
"all": "pnpm run format && pnpm run lint && pnpm run build && pnpm run package"
|
"all": "pnpm run format && pnpm run lint && pnpm run build && pnpm run package"
|
||||||
|
|
12
prettier.config.cjs
Normal file
12
prettier.config.cjs
Normal file
|
@ -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
src/index.ts
13
src/index.ts
|
@ -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 fs from "node:fs/promises";
|
||||||
import * as os from "node:os";
|
import * as os from "node:os";
|
||||||
import * as path from "node:path";
|
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 { inspect, promisify } from "node:util";
|
||||||
import * as http from "http";
|
|
||||||
|
|
||||||
import * as core from "@actions/core";
|
|
||||||
import { Tail } from "tail";
|
import { Tail } from "tail";
|
||||||
import got from "got";
|
|
||||||
import { IdsToolbox } from "detsys-ts";
|
|
||||||
|
|
||||||
const ENV_CACHE_DAEMONDIR = "MAGIC_NIX_CACHE_DAEMONDIR";
|
const ENV_CACHE_DAEMONDIR = "MAGIC_NIX_CACHE_DAEMONDIR";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue