Skip to content

Commit df3d04e

Browse files
authored
Enhance code quality and consistency (#236)
Introduce an ESLint rule for explicit member accessibility, update type definitions for clarity, and standardize formatting across various files to improve overall code quality and maintainability.
2 parents 58ccafd + c6f8fdc commit df3d04e

File tree

49 files changed

+77
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+77
-141
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ updates:
4040
patterns:
4141
- '*'
4242
ignore:
43-
- dependency-name: "@types/node"
43+
- dependency-name: '@types/node'
4444
update-types:
4545
- version-update:semver-major
46-
- dependency-name: "eslint"
46+
- dependency-name: 'eslint'
4747
update-types:
4848
- version-update:semver-major
49-
- dependency-name: "@typescript-eslint/eslint-plugin"
49+
- dependency-name: '@typescript-eslint/eslint-plugin'
5050
update-types:
5151
- version-update:semver-major
52-
- dependency-name: "@typescript-eslint/parser"
52+
- dependency-name: '@typescript-eslint/parser'
5353
update-types:
5454
- version-update:semver-major
55-
- dependency-name: "conventional-changelog-conventionalcommits"
55+
- dependency-name: 'conventional-changelog-conventionalcommits'
5656
update-types:
5757
- version-update:semver-major

.vscode/settings.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,9 @@
2929
// "**/*.tsbuildinfo": true
3030
},
3131
"git.autoStash": true,
32-
"git.branchProtection": [
33-
"main",
34-
"next"
35-
],
36-
"githubPullRequests.ignoredPullRequestBranches": [
37-
"main",
38-
"next"
39-
],
40-
"markdownlint.ignore": [
41-
"**/CHANGELOG.md"
42-
],
32+
"git.branchProtection": ["main", "next"],
33+
"githubPullRequests.ignoredPullRequestBranches": ["main", "next"],
34+
"markdownlint.ignore": ["**/CHANGELOG.md"],
4335
"npm.packageManager": "yarn",
4436
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
4537
"prettier.useEditorConfig": true,

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,3 @@ The following companies, organizations, and individuals support Nanolib ongoing
3333
### Contributing
3434

3535
Contributions are welcome! Please read our [contribution guidelines](https://github.com/Alwatr/.github/blob/next/CONTRIBUTING.md) before submitting a pull request.
36-
37-

lerna.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
"version": "independent",
44
"npmClient": "yarn",
55
"useWorkspaces": true,
6-
"packages": [
7-
"packages/*"
8-
],
6+
"packages": ["packages/*"],
97
"loglevel": "verbose",
108
"command": {
119
"version": {
1210
"conventionalCommits": true,
13-
"ignoreChanges": [
14-
"**/docs/**",
15-
"**/*.test.js"
16-
],
11+
"ignoreChanges": ["**/docs/**", "**/*.test.js"],
1712
"skipBumpOnlyReleases": true,
1813
"message": "release:",
1914
"forceGitTag": true,
@@ -29,9 +24,7 @@
2924
"changelogPreset": {
3025
"name": "conventionalcommits",
3126
"issueUrlFormat": "{{host}}/{{owner}}/{{repository}}/issues/{{id}}",
32-
"issuePrefixes": [
33-
"#"
34-
],
27+
"issuePrefixes": ["#"],
3528
"commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commit/{{hash}}",
3629
"compareUrlFormat": "{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}",
3730
"userUrlFormat": "{{host}}/{{user}}",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"clean": "git add -v . && git clean -d -x -f --exclude=node_modules --exclude='*.env' --exclude=_data --exclude='.pnp*' --exclude=.yarn",
4444
"f": "yarn run format",
4545
"format": "yarn run format:prettier && yarn run format:eslint",
46-
"format:eslint": "yarn run lint --fix",
46+
"format:eslint": "yarn run lint:es --fix",
4747
"format:prettier": "prettier . --ignore-path .gitignore --write",
4848
"l": "yarn run lint",
4949
"lint": "yarn run lint:ts && yarn run lint:es",

packages/async-queue/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,3 @@ The following companies, organizations, and individuals support Nanolib ongoing
5959
### Contributing
6060

6161
Contributions are welcome! Please read our [contribution guidelines](https://github.com/Alwatr/.github/blob/next/CONTRIBUTING.md) before submitting a pull request.
62-
63-

packages/async-queue/src/main.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class AsyncQueue {
4040
* });
4141
* ```
4242
*/
43-
async push<T>(taskId: string, task: () => Promise<T>): Promise<T> {
43+
public async push<T>(taskId: string, task: () => Promise<T>): Promise<T> {
4444
const flatomise = newFlatomise<T>();
4545

4646
const previousTaskPromise = this.queue__[taskId];
@@ -78,7 +78,7 @@ export class AsyncQueue {
7878
* }
7979
* ```
8080
*/
81-
isRunning(taskId: string): boolean {
81+
public isRunning(taskId: string): boolean {
8282
return this.queue__[taskId] !== undefined;
8383
}
8484

@@ -92,7 +92,7 @@ export class AsyncQueue {
9292
* await queue.waitForFinish('longTaskId');
9393
* ```
9494
*/
95-
waitForFinish(taskId: string): Promise<unknown> {
95+
public waitForFinish(taskId: string): Promise<unknown> {
9696
return this.queue__[taskId] ?? Promise.resolve();
9797
}
9898

@@ -104,7 +104,7 @@ export class AsyncQueue {
104104
* await queue.waitForAllFinish();
105105
* ```
106106
*/
107-
waitForAllFinish(): Promise<unknown[]> {
107+
public waitForAllFinish(): Promise<unknown[]> {
108108
return Promise.all(Object.values(this.queue__));
109109
}
110110
}

packages/dedupe/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,3 @@ The following companies, organizations, and individuals support Nanolib ongoing
2323
### Contributing
2424

2525
Contributions are welcome! Please read our [contribution guidelines](https://github.com/Alwatr/.github/blob/next/CONTRIBUTING.md) before submitting a pull request.
26-
27-

packages/deep-clone/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,3 @@ The following companies, organizations, and individuals support Nanolib ongoing
3434
### Contributing
3535

3636
Contributions are welcome! Please read our [contribution guidelines](https://github.com/Alwatr/.github/blob/next/CONTRIBUTING.md) before submitting a pull request.
37-
38-

packages/env/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,3 @@ The following companies, organizations, and individuals support Nanolib ongoing
7474
### Contributing
7575

7676
Contributions are welcome! Please read our [contribution guidelines](https://github.com/Alwatr/.github/blob/next/CONTRIBUTING.md) before submitting a pull request.
77-
78-

0 commit comments

Comments
 (0)