-
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.
Merge pull request #9 from sineverba/refactor-repository
Refactor repository
- Loading branch information
Showing
17 changed files
with
2,203 additions
and
522 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,10 +1,5 @@ | ||
coverage | ||
node_modules | ||
build | ||
npm-debug.log | ||
.env | ||
.DS_Store | ||
.npmrc | ||
.nyc_output | ||
.scannerwork | ||
dist/ | ||
.scannerwork/ | ||
.test_report/ | ||
coverage/ | ||
dist/ | ||
node_modules/ |
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 @@ | ||
__tests__/ |
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,4 @@ | ||
{ | ||
"tabWidth": 2, | ||
"trailingComma": "none" | ||
} |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Next version | ||
+ Refactor repository | ||
|
||
## 1.2.0 | ||
+ Upgrade dependencies | ||
|
||
|
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,15 +1,19 @@ | ||
SONARSCANNER_VERSION=5.0.1 | ||
SONARSCANNER_VERSION=10.0.2.1398_5.0.1 | ||
|
||
sonar: | ||
docker run --rm -it \ | ||
docker run \ | ||
--rm \ | ||
-it \ | ||
--name sonarscanner \ | ||
-v $(PWD):/usr/src \ | ||
-e SONAR_HOST_URL=$(SONAR_HOST_URL) \ | ||
-e SONAR_TOKEN=$(SONAR_TOKEN) \ | ||
sonarsource/sonar-scanner-cli:$(SONARSCANNER_VERSION) | ||
|
||
upgrade: | ||
npx ncu -u | ||
npm install | ||
npx ncu \ | ||
-x eslint \ | ||
-u | ||
npx update-browserslist-db@latest | ||
npm audit fix | ||
npm install | ||
npm audit fix || exit 0; |
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 |
---|---|---|
|
@@ -58,9 +58,3 @@ console.log(newData); | |
*/ | ||
|
||
``` | ||
|
||
#### Tests | ||
|
||
`npm run test` for simple test | ||
|
||
`npm run cover` for coverage |
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,14 @@ | ||
// @ts-check | ||
|
||
import eslint from "@eslint/js"; | ||
import prettierConfig from "eslint-config-prettier"; | ||
import tseslint from "typescript-eslint"; | ||
|
||
export default tseslint.config({ | ||
files: ["src/index.ts"], | ||
extends: [ | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
prettierConfig | ||
] | ||
}); |
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,5 +1,11 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
}; | ||
preset: "ts-jest", | ||
reporters: ["default", ["jest-junit", { outputDirectory: ".test_report" }]], | ||
setupFilesAfterEnv: ["<rootDir>/setupTest.js"], | ||
testEnvironment: "jsdom", | ||
moduleNameMapper: { | ||
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451 | ||
uuid: require.resolve("uuid") | ||
} | ||
}; |
Oops, something went wrong.