Skip to content

Commit

Permalink
Release (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
capitnflam authored Mar 15, 2024
2 parents 48e0072 + 04e3f56 commit 25b0485
Show file tree
Hide file tree
Showing 18 changed files with 11,815 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
HUSKY: 0
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run pre-commit
24 changes: 24 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
function buildPrettierCommand(filenames) {
return [`prettier --write ${filenames.join(' ')}`]
}

/** @type {import('lint-staged').Config} */
module.exports = {
'package.json': (filenames) => [
`syncpack format ${filenames.map((filename) => `--source '${filename}'`).join(' ')}`,
'syncpack lint',
],
'*.js': (filenames) => [
// `eslint --fix ${filenames.join(' ')}`,
`prettier --write ${filenames.join(' ')}`,
],
'*.ts': (filenames) => [
// `eslint --fix ${filenames.join(' ')}`,
`prettier --write ${filenames.join(' ')}`,
`tsc --pretty --noEmit`,
],
'*.yml': buildPrettierCommand,
'*.yaml': buildPrettierCommand,
'*.md': buildPrettierCommand,
'*.{html,css}': buildPrettierCommand,
}
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"endOfLine": "lf"
}
43 changes: 43 additions & 0 deletions .syncpackrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/** @type {import("syncpack").RcFile} */
const config = {
sortAz: [
'contributors',
'dependencies',
'devDependencies',
'keywords',
'peerDependencies',
'resolutions',
'scripts',
],
sortFirst: ['name', 'description', 'version', 'author', 'scripts'],
versionGroups: [
{
dependencies: ['**'],
policy: 'sameRange',
packages: ['**'],
},
],
semverGroups: [
{
range: '>=',
dependencyTypes: ['peer'],
dependencies: ['**'],
packages: ['**'],
},
{
range: '',
dependencyTypes: [
'prod',
'resolutions',
'overrides',
'pnpmOverrides',
'local',
'dev',
],
dependencies: ['**'],
packages: ['**'],
},
],
}

module.exports = config
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# eslint-plugin
# eslint-plugin
7 changes: 7 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { UserConfig } from '@commitlint/types'

const commitlingConfiguration: UserConfig = {
extends: ['@commitlint/config-conventional'],
}

export default commitlingConfiguration
Loading

0 comments on commit 25b0485

Please sign in to comment.