From f7dd8bb5a93a99ebd674b5d6d4a22fabdb6a1833 Mon Sep 17 00:00:00 2001 From: capitnflam Date: Thu, 21 Mar 2024 00:35:54 +0100 Subject: [PATCH 1/3] feat(ci): use common release config (#27) --- package-lock.json | 90 ++++++++++++++++++++++++++++++++++++++++++----- package.json | 1 + release.config.js | 2 +- 3 files changed, 84 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3acb558..c8fcf58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "@commitlint/cli": "19.2.0", "@commitlint/config-conventional": "19.1.0", "@commitlint/types": "19.0.3", + "@flaminc/semantic-release-configs": "1.0.0", "@types/eslint": "8.56.5", "@types/node": "20.11.28", "husky": "9.0.11", @@ -580,6 +581,24 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@flaminc/semantic-release-configs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@flaminc/semantic-release-configs/-/semantic-release-configs-1.0.0.tgz", + "integrity": "sha512-bDulFLRcO7K3+1cUZx60gRK2IBywZTcbiztGfzfH/rN/1WpqBEcXi4u42e7pUtru8Lchfmgww7CrfpGhU0sFFw==", + "dev": true, + "dependencies": { + "conventional-changelog-writer": "7.0.1" + }, + "peerDependencies": { + "@semantic-release/changelog": ">=6.0.0", + "@semantic-release/commit-analyzer": ">=12.0.0", + "@semantic-release/git": ">=10.0.0", + "@semantic-release/github": ">=10.0.0", + "@semantic-release/npm": ">=12.0.0", + "@semantic-release/release-notes-generator": ">=12.0.0", + "semantic-release": ">=23.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -956,10 +975,11 @@ } }, "node_modules/@semantic-release/commit-analyzer": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-11.1.0.tgz", - "integrity": "sha512-cXNTbv3nXR2hlzHjAMgbuiQVtvWHTlwwISt60B+4NZv01y/QRY7p2HcJm8Eh2StzcTJoNnflvKjHH/cjFS7d5g==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-12.0.0.tgz", + "integrity": "sha512-qG+md5gdes+xa8zP7lIo1fWE17zRdO8yMCaxh9lyL65TQleoSv8WHHOqRURfghTytUh+NpkSyBprQ5hrkxOKVQ==", "dev": true, + "peer": true, "dependencies": { "conventional-changelog-angular": "^7.0.0", "conventional-commits-filter": "^4.0.0", @@ -970,7 +990,7 @@ "micromatch": "^4.0.2" }, "engines": { - "node": "^18.17 || >=20.6.1" + "node": ">=20.8.1" }, "peerDependencies": { "semantic-release": ">=20.1.0" @@ -1230,10 +1250,11 @@ } }, "node_modules/@semantic-release/npm": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-11.0.3.tgz", - "integrity": "sha512-KUsozQGhRBAnoVg4UMZj9ep436VEGwT536/jwSqB7vcEfA6oncCUU7UIYTRdLx7GvTtqn0kBjnkfLVkcnBa2YQ==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-12.0.0.tgz", + "integrity": "sha512-72TVYQCH9NvVsO/y13eF8vE4bNnfls518+4KcFwJUKi7AtA/ZXoNgSg9gTTfw5eMZMkiH0izUrpGXgZE/cSQhA==", "dev": true, + "peer": true, "dependencies": { "@semantic-release/error": "^4.0.0", "aggregate-error": "^5.0.0", @@ -1250,7 +1271,7 @@ "tempy": "^3.0.0" }, "engines": { - "node": "^18.17 || >=20" + "node": ">=20.8.1" }, "peerDependencies": { "semantic-release": ">=20.1.0" @@ -1261,6 +1282,7 @@ "resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-4.0.0.tgz", "integrity": "sha512-mgdxrHTLOjOddRVYIYDo0fR3/v61GNN1YGkfbrjuIKg/uMgCd+Qzo3UAXJ+woLQQpos4pl5Esuw5A7AoNlzjUQ==", "dev": true, + "peer": true, "engines": { "node": ">=18" } @@ -1270,6 +1292,7 @@ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-5.0.0.tgz", "integrity": "sha512-gOsf2YwSlleG6IjRYG2A7k0HmBMEo6qVNk9Bp/EaLgAJT5ngH6PXbqa4ItvnEwCm/velL5jAnQgsHsWnjhGmvw==", "dev": true, + "peer": true, "dependencies": { "clean-stack": "^5.2.0", "indent-string": "^5.0.0" @@ -1286,6 +1309,7 @@ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-5.2.0.tgz", "integrity": "sha512-TyUIUJgdFnCISzG5zu3291TAsE77ddchd0bepon1VVQrKLGKFED4iXFEDQ24mIPdPBbyE16PK3F8MYE1CmcBEQ==", "dev": true, + "peer": true, "dependencies": { "escape-string-regexp": "5.0.0" }, @@ -1301,6 +1325,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "dev": true, + "peer": true, "engines": { "node": ">=12" }, @@ -1313,6 +1338,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", "dev": true, + "peer": true, "engines": { "node": ">=12" }, @@ -10138,6 +10164,27 @@ "semantic-release": ">=20.0.0" } }, + "node_modules/semantic-release/node_modules/@semantic-release/commit-analyzer": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-11.1.0.tgz", + "integrity": "sha512-cXNTbv3nXR2hlzHjAMgbuiQVtvWHTlwwISt60B+4NZv01y/QRY7p2HcJm8Eh2StzcTJoNnflvKjHH/cjFS7d5g==", + "dev": true, + "dependencies": { + "conventional-changelog-angular": "^7.0.0", + "conventional-commits-filter": "^4.0.0", + "conventional-commits-parser": "^5.0.0", + "debug": "^4.0.0", + "import-from-esm": "^1.0.3", + "lodash-es": "^4.17.21", + "micromatch": "^4.0.2" + }, + "engines": { + "node": "^18.17 || >=20.6.1" + }, + "peerDependencies": { + "semantic-release": ">=20.1.0" + } + }, "node_modules/semantic-release/node_modules/@semantic-release/error": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-4.0.0.tgz", @@ -10147,6 +10194,33 @@ "node": ">=18" } }, + "node_modules/semantic-release/node_modules/@semantic-release/npm": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-11.0.3.tgz", + "integrity": "sha512-KUsozQGhRBAnoVg4UMZj9ep436VEGwT536/jwSqB7vcEfA6oncCUU7UIYTRdLx7GvTtqn0kBjnkfLVkcnBa2YQ==", + "dev": true, + "dependencies": { + "@semantic-release/error": "^4.0.0", + "aggregate-error": "^5.0.0", + "execa": "^8.0.0", + "fs-extra": "^11.0.0", + "lodash-es": "^4.17.21", + "nerf-dart": "^1.0.0", + "normalize-url": "^8.0.0", + "npm": "^10.5.0", + "rc": "^1.2.8", + "read-pkg": "^9.0.0", + "registry-auth-token": "^5.0.0", + "semver": "^7.1.2", + "tempy": "^3.0.0" + }, + "engines": { + "node": "^18.17 || >=20" + }, + "peerDependencies": { + "semantic-release": ">=20.1.0" + } + }, "node_modules/semantic-release/node_modules/aggregate-error": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-5.0.0.tgz", diff --git a/package.json b/package.json index 5c63b7c..8af9cd5 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "@commitlint/cli": "19.2.0", "@commitlint/config-conventional": "19.1.0", "@commitlint/types": "19.0.3", + "@flaminc/semantic-release-configs": "1.0.0", "@types/eslint": "8.56.5", "@types/node": "20.11.28", "husky": "9.0.11", diff --git a/release.config.js b/release.config.js index b6343b1..ebc6065 100644 --- a/release.config.js +++ b/release.config.js @@ -2,6 +2,6 @@ * @type {import('semantic-release').Options} */ module.exports = { - extends: ['semantic-release-npm-github-publish'], + extends: ['@flaminc/semantic-release-configs/npm-github-publish'], branches: ['main'], } From 381cfd4123772f9c0735e8c1085a3dd2c77c50d7 Mon Sep 17 00:00:00 2001 From: capitnflam Date: Thu, 21 Mar 2024 00:51:33 +0100 Subject: [PATCH 2/3] chore(deps): remove semantic-release-npm-github-publish (#28) --- package-lock.json | 16 ---------------- package.json | 1 - 2 files changed, 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index c8fcf58..e098404 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,6 @@ "prettier": "3.2.5", "rimraf": "5.0.5", "semantic-release": "23.0.3", - "semantic-release-npm-github-publish": "1.5.5", "syncpack": "12.3.0", "typescript": "5.4.2" }, @@ -10149,21 +10148,6 @@ "node": ">=20.8.1" } }, - "node_modules/semantic-release-npm-github-publish": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/semantic-release-npm-github-publish/-/semantic-release-npm-github-publish-1.5.5.tgz", - "integrity": "sha512-VDXPQGFL9kJ26m4usq4N4+n4xe6bJ1MaQkwCNlVnz9LCJch33bFCCLLP7tNZk73T8E7GUjkq+Z24wnA5clO7wA==", - "dev": true, - "peerDependencies": { - "@semantic-release/changelog": ">=6.0.0", - "@semantic-release/commit-analyzer": ">=9.0.0", - "@semantic-release/git": ">=10.0.0", - "@semantic-release/github": ">=8.0.0", - "@semantic-release/npm": ">=9.0.0", - "@semantic-release/release-notes-generator": ">=10.0.0", - "semantic-release": ">=20.0.0" - } - }, "node_modules/semantic-release/node_modules/@semantic-release/commit-analyzer": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-11.1.0.tgz", diff --git a/package.json b/package.json index 8af9cd5..794b523 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "prettier": "3.2.5", "rimraf": "5.0.5", "semantic-release": "23.0.3", - "semantic-release-npm-github-publish": "1.5.5", "syncpack": "12.3.0", "typescript": "5.4.2" }, From ddbf60e30f4f180d2e26c89f39d96a7468a046ea Mon Sep 17 00:00:00 2001 From: capitnflam Date: Thu, 21 Mar 2024 01:05:24 +0100 Subject: [PATCH 3/3] feat(recommended): disable some rules (#29) --- src/configs/recommended.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/configs/recommended.ts b/src/configs/recommended.ts index fdc8e20..b37ca61 100644 --- a/src/configs/recommended.ts +++ b/src/configs/recommended.ts @@ -43,6 +43,10 @@ export const recommended: ESLintConfig = { warnOnUnassignedImports: true, }, ], + 'unicorn/no-array-reduce': 'off', + 'unicorn/no-null': 'off', + 'unicorn/prefer-top-level-await': 'off', + 'unicorn/prefer-string-replace-all': 'off', }, overrides: [ { @@ -63,5 +67,11 @@ export const recommended: ESLintConfig = { }, }, }, + { + files: ['*.js'], + rules: { + 'unicorn/prefer-module': 'off', + }, + }, ], }