Skip to content

Commit a826d09

Browse files
committed
Reformat codebase
This modifies basically every file to create a consistent formatting. It was a mix of tabs vs spaces everywerhe
1 parent 2eac920 commit a826d09

23 files changed

+779
-786
lines changed

.changeset/config.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3-
"changelog": "@changesets/cli/changelog",
4-
"commit": false,
5-
"fixed": [],
6-
"linked": [],
7-
"access": "restricted",
8-
"baseBranch": "main",
9-
"updateInternalDependencies": "patch",
10-
"ignore": []
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
1111
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
# Set up tabs as indent style for a11y reasons
4+
# This will be the default for prettier in >=v3
5+
[*]
6+
indent_style = tab
7+
indent_size = 2
8+
9+
# Yaml does not support tabs
10+
[*.{yml,yaml}]
11+
indent_style = space
12+
indent_size = 2

.eslintrc.cjs

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11
module.exports = {
2-
extends: [
3-
'eslint:recommended',
4-
'plugin:@typescript-eslint/recommended',
5-
],
6-
plugins: ['unused-imports'],
7-
rules: {
8-
'@typescript-eslint/ban-ts-comment': 'off',
9-
'@typescript-eslint/no-explicit-any': 'off',
10-
'@typescript-eslint/no-empty-function': 'off',
11-
'@typescript-eslint/no-unused-vars': [
12-
'warn',
13-
{
14-
args: 'none',
15-
argsIgnorePattern: '^_',
16-
},
17-
],
18-
'unused-imports/no-unused-imports': 'error',
19-
'arrow-body-style': ['error', 'as-needed'],
20-
'no-console': [
21-
'error',
22-
{
23-
allow: ['warn', 'error', 'info'],
24-
},
25-
],
26-
},
27-
}
2+
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
3+
plugins: ["unused-imports"],
4+
rules: {
5+
"@typescript-eslint/ban-ts-comment": "off",
6+
"@typescript-eslint/no-explicit-any": "off",
7+
"@typescript-eslint/no-empty-function": "off",
8+
"@typescript-eslint/no-unused-vars": [
9+
"warn",
10+
{
11+
args: "none",
12+
argsIgnorePattern: "^_",
13+
},
14+
],
15+
"unused-imports/no-unused-imports": "error",
16+
"arrow-body-style": ["error", "as-needed"],
17+
"no-console": [
18+
"error",
19+
{
20+
allow: ["warn", "error", "info"],
21+
},
22+
],
23+
},
24+
};

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
uses: actions/setup-node@v3
8282
with:
8383
node-version: 20
84-
cache: 'pnpm'
84+
cache: "pnpm"
8585

8686
- name: Create and publish versions
8787
uses: changesets/action@v1

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"test": "vitest run",
1818
"test:ci": "vitest run --coverage",
1919
"tsc": "tsc --noEmit",
20+
"format": "prettier --write src/",
2021
"lint": "eslint *.ts"
2122
},
2223
"files": [

src/fingerprint.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import { randomBytes } from "crypto";
22
import { createHash } from "node:crypto";
33

44
export const generateFingerprint = (): string => {
5-
const length = 32;
6-
const buffer = randomBytes(Math.ceil(length / 2));
7-
return buffer.toString("hex").slice(0, length);
5+
const length = 32;
6+
const buffer = randomBytes(Math.ceil(length / 2));
7+
return buffer.toString("hex").slice(0, length);
88
};
99

1010
export const hashFingerprint = (fingerprint: string): string => {
11-
const hash = createHash("sha256");
12-
hash.update(fingerprint);
13-
return hash.digest("hex");
11+
const hash = createHash("sha256");
12+
hash.update(fingerprint);
13+
return hash.digest("hex");
1414
};
1515

1616
export const validateFingerprint = (
17-
fingerprint: string,
18-
hashedFingerprint: string
17+
fingerprint: string,
18+
hashedFingerprint: string
1919
) => hashFingerprint(fingerprint) === hashedFingerprint;

0 commit comments

Comments
 (0)