Skip to content

Commit d3779fe

Browse files
committed
feat: use typescript
1 parent f24cc72 commit d3779fe

18 files changed

+4782
-1674
lines changed

.eslintrc.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// .eslintrc
2+
module.exports = {
3+
parser: '@typescript-eslint/parser',
4+
ignorePatterns: ['.eslintrc.js'],
5+
parserOptions: {
6+
ecmaVersion: 12,
7+
sourceType: 'module',
8+
},
9+
plugins: ['@typescript-eslint'],
10+
extends: [
11+
'eslint:recommended',
12+
'plugin:@typescript-eslint/recommended',
13+
'prettier',
14+
],
15+
16+
rules: {
17+
'@typescript-eslint/no-unused-vars': 'error',
18+
// to enforce using type for object type definitions, can be type or interface
19+
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
20+
},
21+
22+
env: {
23+
browser: true,
24+
es2021: true,
25+
},
26+
};

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
npm-debug.log*
88
.DS_Store
99
.netlify
10-
.npmrc
10+
.npmrc
11+
/build

.prettierrc.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
{}
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"bracketSpacing": true,
5+
"tabWidth": 2
6+
}

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
23
"editor.formatOnSave": true,
3-
"files.insertFinalNewline": true
4+
"files.insertFinalNewline": true,
5+
"editor.formatOnPaste": false,
6+
"cSpell.words": ["emailaddress"]
47
}

nwb.config.js

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

0 commit comments

Comments
 (0)