Skip to content

Commit 33f73a8

Browse files
authored
Merge pull request #1 from jay-es/typescript
Typescript
2 parents 2a38b0d + ff58345 commit 33f73a8

File tree

12 files changed

+1190
-64
lines changed

12 files changed

+1190
-64
lines changed

.eslintrc.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1+
/** @type {import('eslint/lib/shared/types').ConfigData} */
12
module.exports = {
3+
ignorePatterns: "lib/*",
24
env: {
35
commonjs: true,
46
es2021: true,
57
node: true,
68
},
7-
extends: ["eslint:recommended", "airbnb-base", "prettier"],
9+
extends: [
10+
"eslint:recommended",
11+
"airbnb-base",
12+
"plugin:@typescript-eslint/recommended",
13+
"prettier",
14+
],
815
parserOptions: {
916
ecmaVersion: "latest",
1017
},
1118
rules: {
12-
strict: "off",
19+
"import/extensions": "off",
20+
"import/prefer-default-export": "off",
21+
},
22+
settings: {
23+
"import/resolver": {
24+
node: {
25+
extensions: [".js", ".ts"],
26+
},
27+
},
1328
},
1429
};

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ jobs:
3131
run: npm run format
3232
- name: Test
3333
run: npm run test
34+
- name: Type Check
35+
run: npm run type-check

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules/
2+
lib/

.lintstagedrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
"*.[jt]s": ["prettier --check", "eslint"],
3+
"*.ts": [() => "npm run type-check", "mocha"],
4+
};

.mocharc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
require: "ts-node/register",
3+
spec: "tests/**/*.spec.ts",
4+
"watch-files": ["src/**/*.ts", "tests/**/*.spec.ts"],
5+
};

.prettierignore

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

0 commit comments

Comments
 (0)