Skip to content

Commit

Permalink
build: update configs and tools
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Mar 13, 2024
1 parent 4783bcb commit b8d6f27
Show file tree
Hide file tree
Showing 73 changed files with 2,837 additions and 1,757 deletions.
2 changes: 1 addition & 1 deletion .commitlintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
extends: ["@commitlint/config-conventional"],
parserPreset: {
parserOpts: {
headerPattern: /^(\w*)(?:\((.*)\))?!?: (.*)$/,
headerPattern: /^(\w*)(?:\((.*)\))?!?: (.*)$/u,
},
},
};
12 changes: 0 additions & 12 deletions .eslint-doc-generatorrc.js

This file was deleted.

21 changes: 13 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
"prettier"
],
"parserOptions": {
"project": true
"project": "./tsconfig.eslint.json"
},
"ignorePatterns": [
"/build/",
"/coverage/",
"/lib/",
"/node_modules/",
"/tests-compiled/",
"/cz-adapter/**/*.js"
"/cz-adapter/**/*.js",
"/pnpm-lock.yaml"
],
"rules": {
"functional/prefer-immutable-types": "off",
Expand Down Expand Up @@ -64,6 +66,8 @@
},
{
"files": ["**/*.test.ts"],
"plugins": ["vitest"],
"extends": ["plugin:vitest/recommended", "plugin:functional/off"],
"rules": {
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
Expand All @@ -74,16 +78,17 @@
"@typescript-eslint/strict-boolean-expressions": "off",
"eslint-comments/disable-enable-pair": "off",
"eslint-comments/no-unlimited-disable": "off",
"functional/functional-parameters": "off",
"functional/no-conditional-statements": "off",
"functional/no-expression-statements": "off",
"functional/no-loop-statements": "off",
"functional/no-return-void": "off",
"import/no-named-as-default-member": "off",
"jsdoc/require-jsdoc": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-identical-functions": "off",
"unicorn/prefer-module": "off"
"unicorn/prefer-module": "off",
"vitest/valid-expect": "off"
},
"settings": {
"vitest": {
"typecheck": true
}
}
},
{
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/.husky/** linguist-detectable=false

**/tsconfig.json linguist-language=jsonc
**/tsconfig.*.json linguist-language=jsonc
/.lintstagedrc linguist-language=json
/.vscode/*.json linguist-language=jsonc

Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tidelift: npm/eslint-plugin-functional
ko_fi: rebeccastevens
custom: https://github.com/eslint-functional/eslint-plugin-functional/blob/main/DONATIONS.md
issuehunt: eslint-functional/eslint-plugin-functional
custom: https://github.com/eslint-functional/eslint-plugin-functional/blob/main/DONATIONS.md
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Fixes: #(Issue Number)
Fix #000

## Proposed Changes

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
node-version:
required: false
description: "`node-version` passed to `actions/setup-node`."
default: v18
default: latest

runs:
using: "composite"
Expand Down
60 changes: 30 additions & 30 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"automergeStrategy": "rebase",
"extends": [
":automergeAll",
":automergePr",
":ignoreModulesAndTests",
"replacements:all",
"workarounds:all",
":prConcurrentLimitNone",
":prHourlyLimitNone",
":semanticCommits",
"group:allNonMajor",
"group:monorepos",
"group:recommended",
":automergeAll",
":automergePr",
":semanticCommits",
":prHourlyLimitNone",
":prConcurrentLimitNone",
"helpers:disableTypesNodeMajor",
"schedule:weekly"
"replacements:all",
"schedule:monthly",
"workarounds:all"
],
"labels": ["Type: Maintenance", ":blue_heart:"],
"automergeStrategy": "rebase",
"postUpdateOptions": ["pnpmDedupe"],
"packageRules": [
{
"matchManagers": ["npm"],
"major": {
"semanticCommitType": "build"
},
"matchDepTypes": ["dependencies"],
"matchManagers": ["npm"],
"rangeStrategy": "update-lockfile",
"semanticCommitType": "chore",
"semanticCommitScope": "deps",
"major": {
"semanticCommitType": "build"
}
"semanticCommitType": "chore"
},
{
"matchManagers": ["npm"],
"matchDepTypes": ["devDependencies"],
"matchManagers": ["npm"],
"rangeStrategy": "pin",
"semanticCommitType": "chore",
"semanticCommitScope": "dev-deps"
"semanticCommitScope": "dev-deps",
"semanticCommitType": "chore"
},
{
"matchManagers": ["npm"],
"major": {
"semanticCommitType": "build"
},
"matchDepTypes": ["peerDependencies"],
"matchManagers": ["npm"],
"rangeStrategy": "widen",
"semanticCommitType": "chore",
"semanticCommitScope": "peer-deps",
"major": {
"semanticCommitType": "build"
}
"semanticCommitType": "chore"
},
{
"matchManagers": ["github-actions"],
"rangeStrategy": "replace",
"semanticCommitType": "ci",
"semanticCommitScope": "dev-deps"
"semanticCommitScope": "dev-deps",
"semanticCommitType": "ci"
},
{
"matchPackageNames": ["escape-string-regexp"],
"allowedVersions": "<5"
"allowedVersions": "<5",
"matchPackageNames": ["escape-string-regexp"]
},
{
"matchPackageNames": ["chalk"],
"allowedVersions": "<5"
"allowedVersions": "<5",
"matchPackageNames": ["chalk"]
}
]
],
"postUpdateOptions": ["pnpmDedupe"]
}
26 changes: 26 additions & 0 deletions .github/workflows/accessibility-alt-text-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Accessibility Alt Text Bot

on:
issue_comment:
types:
- created
- edited
issues:
types:
- edited
- opened
pull_request:
types:
- edited
- opened

permissions:
issues: write
pull-requests: write

jobs:
accessibility_alt_text_bot:
if: ${{ !endsWith(github.actor, '[bot]') }}
runs-on: ubuntu-latest
steps:
- uses: github/[email protected]
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: Build Docs
name: Lint Packages

on:
pull_request:
workflow_dispatch:
workflow_call:

jobs:
build_node:
lint_packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm run build:node
- run: pnpm run build:docs
- run: pnpm run lint:packages
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ jobs:
uses: ./.github/workflows/lint-knip-prod.yml
lint_markdown:
uses: ./.github/workflows/lint-markdown.yml
lint_spelling:
uses: ./.github/workflows/lint-spelling.yml
lint_packages:
uses: ./.github/workflows/lint-packages.yml
lint_prettier:
uses: ./.github/workflows/lint-prettier.yml
lint_spelling:
uses: ./.github/workflows/lint-spelling.yml
test:
uses: ./.github/workflows/test-js.yml
type_check:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.2.0
- uses: amannn/action-semantic-pull-request@v5.4.0
env:
GITHUB_TOKEN: ${{ github.token }}
2 changes: 0 additions & 2 deletions .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@ jobs:
- uses: actions/checkout@v4

- uses: micnncim/action-label-syncer@v1
with:
manifest: .github/labels.yml
env:
GITHUB_TOKEN: ${{ github.token }}
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/lib/
node_modules/

/build/
/coverage/
/lib/
/tests-compiled/

node_modules/

*.log

.DS_Store
Expand Down
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm exec commitlint --edit $1
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm exec lint-staged
9 changes: 7 additions & 2 deletions .lintstagedrc.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
"*.{json,yml}":
- prettier --ignore-unknown --write
- cspell lint --no-progress --show-suggestions --show-context --no-must-find-files --dot

"*.ts":
- prettier --ignore-unknown --write
- eslint --fix
- cspell
- cspell lint --no-progress --show-suggestions --show-context --no-must-find-files --dot
- tsc-files -p tsconfig.build.json --noEmit

"*.md":
- prettier --ignore-unknown --write
- markdownlint --config=.markdownlint.json --ignore-path=.markdownlintignore
- cspell
- cspell lint --no-progress --show-suggestions --show-context --no-must-find-files --dot

"pnpm-lock.yaml":
- "pnpm dedupe && :"
Loading

0 comments on commit b8d6f27

Please sign in to comment.