Skip to content

Commit 38aad45

Browse files
committed
Basic build strucutre
1 parent c62974b commit 38aad45

11 files changed

Lines changed: 7204 additions & 76 deletions

File tree

.eslintrc.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"env": {
4+
"browser": true,
5+
"node": true
6+
},
7+
"plugins": [
8+
"prettier",
9+
"@typescript-eslint",
10+
"jest",
11+
"import"
12+
],
13+
"extends": [
14+
"prettier",
15+
"plugin:prettier/recommended",
16+
"plugin:@typescript-eslint/recommended",
17+
"plugin:import/typescript"
18+
],
19+
"parserOptions": {
20+
"sourceType": "module",
21+
"ecmaVersion": 2018
22+
},
23+
"rules": {
24+
"import/namespace": "off",
25+
"import/order": [
26+
"error"
27+
],
28+
"no-unused-vars": "off",
29+
"@typescript-eslint/no-unused-vars": "error",
30+
"@typescript-eslint/member-delimiter-style": "off",
31+
"@typescript-eslint/explicit-function-return-type": "off"
32+
},
33+
"overrides": [
34+
{
35+
// enable the rule specifically for TypeScript files
36+
"files": [
37+
"*.ts",
38+
"*.tsx"
39+
],
40+
"rules": {
41+
"@typescript-eslint/explicit-function-return-type": [
42+
"error"
43+
]
44+
}
45+
}
46+
]
47+
}

.githooks/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
set -e
4+
set -o pipefail
5+
6+
npm run lint

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
# IDE
55
/.idea
66
/.vscode
7+
8+
# Project
9+
/node_modules
10+
/lib

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"semi": false
4+
}

__test__/pagination.test.ts

Lines changed: 0 additions & 75 deletions
This file was deleted.

jestconfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"transform": {
3+
"^.+\\.(t|j)sx?$": "ts-jest"
4+
},
5+
"testRegex": "(/__tests?__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
6+
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
7+
}

0 commit comments

Comments
 (0)