Skip to content

Commit

Permalink
feat: migrate to typescript (#253)
Browse files Browse the repository at this point in the history
* migrate to typescript

* update all deps

* use ts-node for tests

* update nodejs testing targets

---------

Co-authored-by: yutak23 <yutapilafu@gmail.com>
  • Loading branch information
mindhells and yutak23 committed Nov 25, 2023
1 parent b143463 commit add7b9c
Show file tree
Hide file tree
Showing 19 changed files with 4,094 additions and 8,862 deletions.
35 changes: 17 additions & 18 deletions .eslintrc
@@ -1,39 +1,38 @@
{
"extends": ["airbnb-base", "plugin:jasmine/recommended", "prettier"],
"plugins": ["jasmine", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:jasmine/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"plugins": ["jasmine", "@typescript-eslint", "prettier"],
"ignorePatterns": [
"dist/**/*"
],
"rules": {
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"prettier/prettier": [
"error",
{
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"semi": true,
"parser": "babel"
"parser": "typescript"
}
],
"jasmine/no-spec-dupes": ["warn", "branch"],
"jasmine/no-suite-dupes": ["warn", "branch"],

"valid-jsdoc": [
"warn",
{
"requireReturn": false,
"requireParamDescription": false,
"requireReturnDescription": false,
"prefer": {
"returns": "return",
"params": "param"
}
}
],
"complexity": ["warn", 7],
"no-param-reassign": ["error", { "props": false }],
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
"object-shorthand": ["error", "always", { "avoidQuotes": true }],
"comma-dangle": ["warn", "never"],
"consistent-return": "off",
"no-restricted-properties":"off"

"no-restricted-properties":"off",
"no-unused-vars": "off",
}
}
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 16.x, 18.x]
node-version: [16.x, 18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
@@ -1,6 +1,6 @@
node_modules
npm-debug.log
docs
lib
dist
.eslintcache
.npmrc
.npmrc
7 changes: 7 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,7 @@
{
"[typescript]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
},
}
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -81,5 +81,5 @@ npm test
2. Create your feature branch: `git checkout -b feature/my-new-feature`
3. Commit your changes: `git commit -am 'Added some feature'`
4. Check the build: `npm run build`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
5. Push to the branch: `git push origin my-new-feature`
6. Submit a pull request :D
12 changes: 0 additions & 12 deletions babel.config.cjs.json

This file was deleted.

13 changes: 0 additions & 13 deletions babel.config.json

This file was deleted.

270 changes: 0 additions & 270 deletions es/index.mjs

This file was deleted.

0 comments on commit add7b9c

Please sign in to comment.