Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): 🔧 update better tooling with release it & other changes #132

Merged
merged 4 commits into from
Feb 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .eslintignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# Optional tool caches # Optional tool caches
.eslintcache .eslintcache
.stylelintcache .stylelintcache
.prettiercache


# Dependency directories # Dependency directories
node_modules node_modules
Expand Down Expand Up @@ -67,8 +68,12 @@ package-lock.json
yarn.lock yarn.lock
pnpm-lock.yaml pnpm-lock.yaml


# Custom
release-it/commit.hbs
release-it/remote-commits.json
release-it/conventionalChangelogWriterOptsTransform.cjs

## library folder ## library folder
dist dist
CHANGELOG.md CHANGELOG.md
public public

7 changes: 2 additions & 5 deletions .github/renovate.json
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,7 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base", ":semanticCommitTypeAll(chore)"], "extends": ["config:base", ":semanticCommitTypeAll(chore)"],
"schedule": ["after 12am and before 5am every weekday", "every weekend"], "schedule": ["after 12am and before 5am on saturday"],
"commitMessageAction": "⬆️ update", "commitMessageAction": "⬆️ update",
"commitMessageTopic": "{{depName}}", "commitMessageTopic": "{{depName}}",
"pinVersions": false, "pinVersions": false,
Expand All @@ -24,10 +24,7 @@
}, },
"automergeStrategy": "squash", "automergeStrategy": "squash",
"lockFileMaintenance": { "lockFileMaintenance": {
"enabled": true, "enabled": false
"automerge": true,
"automergeType": "pr",
"platformAutomerge": true
}, },
"packageRules": [ "packageRules": [
{ {
Expand Down
5 changes: 1 addition & 4 deletions .github/settings.yml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@ branches:
# Required. Require branches to be up to date before merging. # Required. Require branches to be up to date before merging.
strict: true strict: true
# Required. The list of status checks to require in order to merge into this branch # Required. The list of status checks to require in order to merge into this branch
checks: checks: [{ context: "Install lint & test" }]
[
{ context: "Install lint & test" },
]
# Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable. # Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
enforce_admins: false enforce_admins: false
# Prevent merge commits from being pushed to matching branches # Prevent merge commits from being pushed to matching branches
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# Optional tool caches # Optional tool caches
.eslintcache .eslintcache
.stylelintcache .stylelintcache
.prettiercache


# Dependency directories # Dependency directories
node_modules node_modules
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# Optional tool caches # Optional tool caches
.eslintcache .eslintcache
.stylelintcache .stylelintcache
.prettiercache


# Dependency directories # Dependency directories
node_modules node_modules
Expand Down Expand Up @@ -67,6 +68,10 @@ package-lock.json
yarn.lock yarn.lock
pnpm-lock.yaml pnpm-lock.yaml


# Custom
release-it/commit.hbs
release-it/remote-commits.json

# Library files # Library files
dist dist
CHANGELOG.md CHANGELOG.md
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc.cjs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ module.exports = {
importOrder: [ importOrder: [
// Packages. // Packages.
// Things that start with a letter (or digit or underscore), or `@` followed by a letter. // Things that start with a letter (or digit or underscore), or `@` followed by a letter.
"^react$",
"^react-dom$",
"^next$",
"^next/+",
"^@?\\w", "^@?\\w",
"", "",
// Absolute imports and other imports such as Vue-style `@/foo`. // Absolute imports and other imports such as Vue-style `@/foo`.
Expand Down
42 changes: 13 additions & 29 deletions .release-it.cjs
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,8 @@
const {
conventionalChangelogWriterOptsTransform,
commitTemplate,
} = require("./release-it/conventionalChangelogWriterOptsTransform.cjs");

module.exports = { module.exports = {
hooks: { hooks: {
"before:init": ["pnpm lint", "pnpm test"], "before:init": ["pnpm lint", "pnpm test"],
Expand All @@ -21,37 +26,16 @@ module.exports = {
"@release-it/conventional-changelog": { "@release-it/conventional-changelog": {
ignoreRecommendedBump: true, ignoreRecommendedBump: true,
infile: "CHANGELOG.md", infile: "CHANGELOG.md",
gitRawCommitsOpts: {
format:
"%B%n-hash-%n%H%n-shortHash-%n%h%n-gitTags-%n%d%n-committerDate-%n%ci%n-authorName-%n%an%n-authorEmail-%n%ae%n-gpgStatus-%n%G?%n-gpgSigner-%n%GS",
},
writerOpts: {
commitPartial: commitTemplate,
transform: conventionalChangelogWriterOptsTransform,
},
preset: { preset: {
name: "conventionalcommits", name: "conventionalcommits",
types: [
{ type: "feat", section: "Feature Updates", hidden: false },
{ type: "fix", section: "Bug Fixes", hidden: false },
{
type: "refactor",
section: "Code Refactors",
hidden: false,
},
{
type: "docs",
section: "Documentation Changes",
hidden: false,
},
{
type: "chore",
section: "Maintanance Updates",
hidden: false,
},
{ type: "build", section: "Build Updates", hidden: false },
{ type: "test", section: "Test Updates", hidden: false },
{ type: "style", section: "Other Changes", hidden: false },
{
type: "perf",
section: "Performance Improvements",
hidden: false,
},
{ type: "ci", section: "CI Changes", hidden: false },
{ type: "revert", section: "Updates Reverted", hidden: false },
],
}, },
}, },
}, },
Expand Down
5 changes: 5 additions & 0 deletions .stylelintignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# Optional tool caches # Optional tool caches
.eslintcache .eslintcache
.stylelintcache .stylelintcache
.prettiercache


# Dependency directories # Dependency directories
node_modules node_modules
Expand Down Expand Up @@ -67,6 +68,10 @@ package-lock.json
yarn.lock yarn.lock
pnpm-lock.yaml pnpm-lock.yaml


# Custom
release-it/commit.hbs
release-it/remote-commits.json

# Library files # Library files
dist dist
CHANGELOG.md CHANGELOG.md
Expand Down
14 changes: 3 additions & 11 deletions .stylelintrc.cjs
Original file line number Original file line Diff line number Diff line change
@@ -1,16 +1,6 @@
module.exports = { module.exports = {
// add extends: ["stylelint-config-standard", "stylelint-config-clean-order"],
extends: [
"stylelint-config-standard",
"stylelint-config-prettier",
"stylelint-config-clean-order",
],
rules: { rules: {
// Suppress the following rules as they are already handled by Prettier
"value-list-comma-newline-after": null,
"declaration-colon-newline-after": null,
"max-line-length": 100,

// Add your own rules here // Add your own rules here
// Need vendor prefix in preflight css // Need vendor prefix in preflight css
"property-no-vendor-prefix": null, "property-no-vendor-prefix": null,
Expand All @@ -23,6 +13,7 @@ module.exports = {
], ],
"selector-id-pattern": "selector-id-pattern":
"^[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}$|^__[a-z]([a-z0-9-]+)$", "^[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}$|^__[a-z]([a-z0-9-]+)$",

// For Tailwind CSS // For Tailwind CSS
"at-rule-no-unknown": [ "at-rule-no-unknown": [
true, true,
Expand All @@ -39,6 +30,7 @@ module.exports = {
], ],
}, },
], ],

"function-no-unknown": [ "function-no-unknown": [
true, true,
{ {
Expand Down
Loading