refactor: rename source files extension to .ts (#219)

This commit is contained in:
Alfi Maulana 2024-03-04 20:01:48 +07:00 committed by GitHub
parent 1afc1f6198
commit e0f6aeea02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 7 additions and 4 deletions

View File

@ -4,7 +4,7 @@
"extends": ["eslint:recommended"], "extends": ["eslint:recommended"],
"overrides": [ "overrides": [
{ {
"files": ["**/*.?([cm])ts"], "files": ["**/*.ts"],
"extends": ["plugin:@typescript-eslint/recommended"] "extends": ["plugin:@typescript-eslint/recommended"]
} }
] ]

2
.gitignore vendored
View File

@ -5,4 +5,4 @@
build/ build/
node_modules/ node_modules/
src/**/*.mjs src/**/*.js

View File

@ -52,4 +52,4 @@ outputs:
value: ${{ steps.process-inputs.outputs.build-dir }} value: ${{ steps.process-inputs.outputs.build-dir }}
runs: runs:
using: node20 using: node20
main: dist/index.mjs main: dist/index.js

0
dist/index.mjs → dist/index.js generated vendored
View File

3
dist/package.json generated vendored Normal file
View File

@ -0,0 +1,3 @@
{
"type": "module"
}

View File

@ -2,7 +2,7 @@
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "tsc && ncc build src/index.mjs -o dist", "build": "tsc && ncc build src/index.js -o dist",
"format": "prettier --write --cache . !dist !README.md", "format": "prettier --write --cache . !dist !README.md",
"lint": "eslint --ignore-path .gitignore ." "lint": "eslint --ignore-path .gitignore ."
}, },