Skip to content

Commit

Permalink
feat: add basic functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhr committed Dec 7, 2021
1 parent 7bd997c commit ac5802f
Show file tree
Hide file tree
Showing 34 changed files with 4,502 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = false
68 changes: 68 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"import",
"unused-imports",
"consistent-default-export-name"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-fallthrough": "off",
"no-constant-condition": "off",
"@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": "off",
"no-empty-pattern": "off",
"import/no-anonymous-default-export": "error",
"import/newline-after-import": "warn",
"import/order": [
"warn",
{
"alphabetize": { "order": "asc", "caseInsensitive": true },
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object"
],
"newlines-between": "never"
}
],
"unused-imports/no-unused-imports": "warn"
},
"globals": {
"globalThis": false,
"jest": false
},
"overrides": [
{
"rules": {
"import/order": "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
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.*
*.log
node_modules

!.git*
!.*rc
!.eslint
!.husky
!.editorconfig
!.vscode

dist
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
13 changes: 13 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"*.(ts|tsx|js|jsx)": [
"eslint . --ext .js,.ts,.jsx,.tsx --rulesdir .eslint/rules --fix",
"prettier --write",
"eclint fix"
],
"*.(json|yml|md|mdx)": ["prettier --write", "eclint fix"],
".env*": ["eclint fix"],
".!(env)rc": ["prettier --write", "eclint fix"],
".*ignore": ["eclint fix"],
".editorconfig": ["eclint fix"],
".husky/**/*": ["eclint fix"]
}
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"semi": false,
"singleQuote": false,
"trailingComma": "all",
"arrowParens": "avoid",
"overrides": [
{
"files": ".*rc",
"options": { "parser": "json" }
},
{
"files": "*.md",
"options": { "parser": "markdown-nocjsp" }
}
]
}
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": { "source.fixAll.eslint": true },
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.removeFinalNewlines": true,
"files.associations": {
"entry": "typescript",
".*rc": "json",
".eslintrc": "jsonc"
},
"deno.enable": true,
"deno.unstable": true,
"deno.importMap": "tests/import-map.json",
"typescript.tsdk": "node_modules/typescript/lib",
"deno.suggest.imports.hosts": {
"https://deno.land": false,
"https://esm.sh": false
}
}
Loading

0 comments on commit ac5802f

Please sign in to comment.