generated from stscoundrel/node-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Replaces Yarn with Bun - Replaces Node CI/CD actions with Bun - Replaces Eslint with Biome & Prettier. Eslint 9 migration still seems far away. - Removes Striker, as I seem to use it so rarely nowadays.
- Loading branch information
1 parent
daf5b95
commit f1bf6cf
Showing
23 changed files
with
76 additions
and
5,788 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json", | ||
"vcs": { | ||
"enabled": false, | ||
"clientKind": "git", | ||
"useIgnoreFile": false | ||
}, | ||
"files": { | ||
"ignoreUnknown": false, | ||
"ignore": [] | ||
}, | ||
"formatter": { | ||
"enabled": false | ||
}, | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "single" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[test] | ||
|
||
coverageThreshold = 0.9 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "typescript-template", | ||
"version": "1.0.0", | ||
"description": "Template repo for generic TypeScript / Node.js library with tests & lint", | ||
"description": "Template repo for generic TypeScript / Node.js library with tests, lint and CI", | ||
"repository": "https://github.com/stscoundrel/typescript-template.git", | ||
"author": "stscoundrel <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -15,34 +15,21 @@ | |
"node": ">=12.0.0" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@babel/core": "^7.23.0", | ||
"@babel/preset-env": "^7.22.20", | ||
"@babel/preset-typescript": "^7.23.0", | ||
"@stryker-mutator/core": "^7.1.1", | ||
"@stryker-mutator/jest-runner": "^7.1.1", | ||
"@types/jest": "^29.5.5", | ||
"devDependencies": { | ||
"@biomejs/biome": "1.9.2", | ||
"@types/bun": "latest", | ||
"@types/node": "^20.8.0", | ||
"@typescript-eslint/eslint-plugin": "^6.7.3", | ||
"@typescript-eslint/parser": "^6.7.3", | ||
"babel-jest": "^29.7.0", | ||
"eslint": "^8.50.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-jest": "^27.4.2", | ||
"jest": "^29.7.0", | ||
"ts-jest": "^29.1.1", | ||
"ts-node": "^10.9.1", | ||
"prettier": "^3.3.3", | ||
"typescript": "^5.2.2" | ||
}, | ||
"scripts": { | ||
"lint": "eslint .", | ||
"fix": "eslint . --fix", | ||
"jest": "jest --verbose --runInBand --passWithNoTests", | ||
"test:unit": "yarn jest", | ||
"test:mutation": "stryker run", | ||
"test:coverage": "jest --coverage --coverageThreshold='{\"global\":{\"statements\":\"90\", \"functions\":\"90\", \"branches\":\"90\", \"lines\":\"90\"}}'", | ||
"build": "tsc", | ||
"prepublishOnly": "yarn build && yarn test:unit" | ||
"prettier:fix": "prettier src tests --write", | ||
"prettier:check": "prettier src tests --check", | ||
"biome:check": "bunx biome lint src tests", | ||
"biome:fix": "bunx biome lint --write src tests", | ||
"lint": "bun run prettier:check && bun run biome:check", | ||
"build": "bun tsc", | ||
"prepublishOnly": "npm run build", | ||
"test:coverage": "bun run test --coverage" | ||
} | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import exampleModule from '../src'; | ||
import { describe, test, expect } from "bun:test"; | ||
import exampleModule from "../src"; | ||
|
||
describe('Example tests', () => { | ||
test('Test suite runs', () => { | ||
describe("Example tests", () => { | ||
test("Test suite runs", () => { | ||
expect(true).toBeTruthy(); | ||
expect(false).toBeFalsy(); | ||
}); | ||
|
||
test('Example function returns correct string', () => { | ||
test("Example function returns correct string", () => { | ||
const result = exampleModule.example(); | ||
|
||
expect(result).toBe('test string'); | ||
expect(result).toBe("test string"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.