Skip to content

Commit 630e6cd

Browse files
committed
chore: Set up pre-commit and prettier.
1 parent 14a1578 commit 630e6cd

34 files changed

+188
-125
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from fedora:41
22

3-
RUN dnf update -y
3+
RUN dnf update -y
44

55
RUN dnf group list
66
RUN dnf install -y @c-development @development-tools

.devcontainer/devcontainer.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
"name": "ZMK Development",
33
"dockerFile": "Dockerfile",
44
"runArgs": ["--security-opt", "label=disable"],
5-
"mounts": [
6-
"type=bind,source=../zmk,target=/opt/zmk"
7-
],
8-
"containerEnv": {
9-
},
5+
"mounts": ["type=bind,source=../zmk,target=/opt/zmk"],
6+
"containerEnv": {},
107
"forwardPorts": [5173, 6006]
118
}

.eslintrc.cjs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
module.exports = {
22
root: true,
33
env: { browser: true, es2020: true },
4-
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'plugin:storybook/recommended'],
5-
ignorePatterns: ['dist', '.eslintrc.cjs'],
6-
parser: '@typescript-eslint/parser',
7-
plugins: ['react-refresh'],
4+
extends: [
5+
"eslint:recommended",
6+
"plugin:@typescript-eslint/recommended",
7+
"plugin:react-hooks/recommended",
8+
"plugin:storybook/recommended",
9+
],
10+
ignorePatterns: ["dist", ".eslintrc.cjs"],
11+
parser: "@typescript-eslint/parser",
12+
plugins: ["react-refresh"],
813
rules: {
9-
'react-refresh/only-export-components': [
10-
'warn',
14+
"react-refresh/only-export-components": [
15+
"warn",
1116
{ allowConstantExport: true },
1217
],
1318
},
14-
}
19+
};

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ dist-ssr
2323
*.sln
2424
*.sw?
2525

26-
*storybook.log
26+
*storybook.log

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.4.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- repo: https://github.com/pre-commit/mirrors-prettier
12+
rev: v2.7.1
13+
hooks:
14+
- id: prettier
15+
# Workaround for https://github.com/pre-commit/mirrors-prettier/issues/29
16+
additional_dependencies:
17+

.prettierrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
{
2-
}
1+
{}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ export default {
33
tailwindcss: {},
44
autoprefixer: {},
55
},
6-
}
6+
};

public/vite.svg

Lines changed: 1 addition & 1 deletion
Loading

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pre-commit

0 commit comments

Comments
 (0)