Skip to content

Commit b8ed64a

Browse files
committed
feat(wip): ts rewrite
1 parent d54a270 commit b8ed64a

27 files changed

+3374
-2620
lines changed

.eslintignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/dist/
2+
/build/
3+
4+
*.js
5+
*.mjs

.eslintrc.js

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
plugins: ['@typescript-eslint/eslint-plugin'],
4+
env: {
5+
browser: true,
6+
commonjs: true,
7+
es2021: true,
8+
node: true,
9+
worker: true,
10+
},
11+
extends: [
12+
'airbnb-base',
13+
'airbnb-typescript/base',
14+
'plugin:prettier/recommended',
15+
'plugin:@typescript-eslint/recommended'
16+
],
17+
parserOptions: {
18+
project: 'tsconfig.json',
19+
sourceType: 'module',
20+
tsconfigRootDir: __dirname
21+
},
22+
rules: {
23+
'global-require': 'off',
24+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
25+
'no-unused-vars': 'off',
26+
'no-underscore-dangle': 'off',
27+
'no-param-reassign': 'off',
28+
'no-restricted-syntax': 'off',
29+
camelcase: 'off',
30+
'default-case': 'off',
31+
'consistent-return': 'off',
32+
'import/order': 'off',
33+
'max-classes-per-file': 'off',
34+
'no-plusplus': 'off',
35+
'guard-for-in': 'off',
36+
'no-bitwise': 'off',
37+
'class-methods-use-this': 'off',
38+
'no-continue': 'off',
39+
'prefer-destructuring': 'off',
40+
'no-use-before-define': 'off',
41+
// Typescript rules
42+
'@typescript-eslint/interface-name-prefix': 'off',
43+
'@typescript-eslint/explicit-function-return-type': 'off',
44+
'@typescript-eslint/explicit-module-boundary-types': 'off',
45+
'@typescript-eslint/no-explicit-any': 'off',
46+
'@typescript-eslint/no-unused-vars': 'off',
47+
'@typescript-eslint/naming-convention': 'off',
48+
'@typescript-eslint/dot-notation': 'off',
49+
'@typescript-eslint/no-use-before-define': 'off',
50+
}
51+
}

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ build/Release
2323
# Deployed apps should consider commenting this line out:
2424
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
2525
node_modules
26+
27+
/build/
28+
/dist/

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.md
2+
README.md
3+
/dist/
4+
/build/

.prettierrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
semi: false,
3+
singleQuote: true,
4+
useTabs: true,
5+
tabWidth: 4,
6+
endOfLine: "lf",
7+
};

.vscode/settings.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"eslint.format.enable": true,
3+
"eslint.lintTask.enable": true,
4+
"editor.defaultFormatter": "esbenp.prettier-vscode",
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll.eslint": "explicit",
7+
"source.fixAll.markdownlint": "explicit"
8+
},
9+
}

constants.js

-291
This file was deleted.

0 commit comments

Comments
 (0)