Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add basic functionality #1

Merged
merged 1 commit into from
Jun 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
indent_style = tab
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = false
max_line_length = 100

[*.yaml]
indent_style = space
indent_size = 2
66 changes: 66 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"ecmaFeatures": {
"jsx": true
},
"project": "./deno.jsonc",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"import",
"unused-imports",
"consistent-default-export-name",
"prefer-arrow-functions"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"prefer-arrow-functions/prefer-arrow-functions": "warn",
"no-fallthrough": "off",
"no-constant-condition": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-unnecessary-condition": "warn",
"no-empty-pattern": "off",
"import/first": "warn",
"import/exports-last": "warn",
"import/no-anonymous-default-export": "warn",
"import/newline-after-import": "warn",
"import/order": [
"warn",
{
"alphabetize": { "order": "asc" },
"groups": [],
"newlines-between": "never"
}
],
"unused-imports/no-unused-imports": "warn",
"consistent-default-export-name/default-export-match-filename": "warn",
"consistent-default-export-name/default-import-match-filename": "warn"
},
"overrides": [
{
"files": ["*.route.ts", "*.route.tsx"],
"rules": {
"import/no-anonymous-default-export": "off"
}
}
]
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/* linguist-documentation=true
**/*.ts linguist-documentation=false
4 changes: 4 additions & 0 deletions .githooks/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*

!.git*
!pre-commit
10 changes: 10 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

pnpm lint-staged || exit 1

for FILE in `git diff --cached --name-only`; do
if [ -f $FILE ]; then
perl -pi -e 'chomp if eof' $FILE
git add $FILE
fi
done
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.*
*.log
node_modules

!.git*
!.*rc
!.eslint
!.editorconfig
!.vscode
!.tool-versions
!*.route.ts
!*.route.tsx

dist
deno.lock
8 changes: 8 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"*.ts": ["eslint --fix", "prettier --write", "eclint fix"],
"*.(json|jsonc|md|yaml)": ["prettier --write", "eclint fix"],
".env*": ["eclint fix"],
".!(env)rc": ["prettier --write", "eclint fix"],
".*ignore": ["eclint fix"],
".editorconfig": ["eclint fix"]
}
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"semi": false,
"trailingComma": "all",
"arrowParens": "avoid",
"proseWrap": "never",
"overrides": [
{
"files": ".*rc",
"options": { "parser": "json" }
}
]
}
3 changes: 3 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
deno 1.33.3
nodejs 20.1.0
pnpm 8.5.0
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": { "source.fixAll.eslint": true },
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.removeFinalNewlines": true,
"files.associations": {
".*rc": "json",
".eslintrc": "jsonc"
},
"typescript.tsdk": "node_modules/typescript/lib",
"deno.enable": true,
"deno.lint": false
}
Loading