Skip to content

feat: migration to typescript (wip)#1072

Open
simlu wants to merge 5 commits intoblackflux:devfrom
simlu:dev
Open

feat: migration to typescript (wip)#1072
simlu wants to merge 5 commits intoblackflux:devfrom
simlu:dev

Conversation

@simlu
Copy link
Copy Markdown
Contributor

@simlu simlu commented Sep 13, 2022

No description provided.

Comment thread .eslintrc.cjs Outdated
@simlu
Copy link
Copy Markdown
Contributor Author

simlu commented Sep 14, 2022

Ok, everything works high-level now. Time to comb through everything in detail, clean-up and make it pretty!

yurist38
yurist38 previously approved these changes Sep 14, 2022
Comment thread .c8rc.json Outdated
Comment thread .depunusedignore
@blackflux/robo-config-plugin
@tsconfig/node14
ts-loader
ts-node
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these all needed?

Comment thread .mocharc.yml
@@ -1 +1,4 @@
timeout: 2000
node-option:
- experimental-specifier-resolution=node
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

Comment thread package.json
"clean": "rm -rf lib",
"build": "cp -rf ./src ./lib && ncc build -m -o lib && mv lib/index.js lib/index.min.js && cp src/index.js lib/index.js && rm lib/package.json",
"compile": "tsc -p tsconfig.json",
"build": "cp -rf ./src ./lib && ncc build -m -o lib && mv lib/index.ts lib/index.min.ts && mv lib/index.js lib/index.min.js && cp src/index.ts lib/index.ts && rm lib/package.json",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need build and compile? What is the difference?

Comment thread package.json
"build": "cp -rf ./src ./lib && ncc build -m -o lib && mv lib/index.ts lib/index.min.ts && mv lib/index.js lib/index.min.js && cp src/index.ts lib/index.ts && rm lib/package.json",
"build-clean": "yarn run clean && yarn run build",
"test-simple": "c8 mocha --experimental-loader=./test/hot.js \"./test/**/*.spec.js\"",
"test-simple": "c8 mocha --experimental-loader=./test/hot.js \"./test/**/*.spec.ts\"",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this include all file extensions?

Comment thread package.json
"treeify": "1.1.0",
"ts-loader": "9.3.1",
"ts-node": "10.9.1",
"typescript": "4.7.4"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all these deps required?

Comment thread test/eslint.spec.ts
@@ -0,0 +1,57 @@
// @ts-ignore
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Way too many ts-ignore here. How can we get rid of all / most?

Comment thread test/eslint.spec.ts
const eslint = new ESLint({
cwd: dir,
// todo: fix
fix: false,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Detect cmd arg and set this to true or false here

Comment thread test/eslint.spec.ts Outdated
Comment thread test/eslint.spec.ts Outdated
Comment thread tsconfig.eslint.json
@@ -0,0 +1,24 @@
{
"compilerOptions": { "strict": true },
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

Comment thread tsconfig.eslint.json
@@ -0,0 +1,24 @@
{
"compilerOptions": { "strict": true },
"extends": "./tsconfig.json",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do? Do we need it?

Comment thread tsconfig.json
@@ -0,0 +1,33 @@
{
"include": [
"./src/**/*"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this too permissive? Still not clear what we need here? I'm assuming this works together with the compile command?

@nopeless
Copy link
Copy Markdown

is this pr still active? @simlu

@simlu simlu closed this Oct 24, 2022
@simlu simlu reopened this Oct 24, 2022
@simlu
Copy link
Copy Markdown
Contributor Author

simlu commented Oct 24, 2022

Ops accidentally hit the wrong button.

Yes,it is still active! All the major work has been done. Just need to do an in-depth review and fix up. Then abstract it.

Just haven't gotten to continuing this. Life got busy...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants