-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add eslint, prettier, and commitlint
- Loading branch information
1 parent
fb5752d
commit 04cf627
Showing
12 changed files
with
4,078 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"], | ||
"formatter": "@commitlint/format", | ||
"rules": { | ||
"scope-enum": [ | ||
2, "always", [ "client" ] | ||
], | ||
"header-max-length": [ | ||
0, "always", 256 | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"ignorePatterns": ["**/*.js"], | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript" | ||
], | ||
"rules": { | ||
// evidently doesn't resolve esm, real issues should break builds anyways | ||
"import/no-unresolved": ["off"], | ||
// this rule is stupid | ||
"no-restricted-globals": ["off"], | ||
"prettier/prettier": ["error", {}, { "usePrettierrc": true }], | ||
"import/order": [ | ||
"error", | ||
{ | ||
"alphabetize": { "order": "asc" }, | ||
"groups": [ | ||
"builtin", | ||
"external", | ||
"internal", | ||
"parent", | ||
"sibling", | ||
"index" | ||
], | ||
"newlines-between": "always", | ||
"pathGroupsExcludedImportTypes": ["builtin"] | ||
} | ||
], | ||
"@typescript-eslint/no-non-null-assertion": ["off"], | ||
"@typescript-eslint/explicit-module-boundary-types": ["off"], | ||
"@typescript-eslint/ban-ts-comment": ["off"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"parser": "typescript", | ||
"quotes": "double", | ||
"printWidth": 100, | ||
"semi": true, | ||
"trailingComma": "all" | ||
} |
Oops, something went wrong.