Skip to content

Commit f376aca

Browse files
committed
chore: init
1 parent 64dfedb commit f376aca

19 files changed

+4765
-0
lines changed

.commitlintrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
extends: ["@commitlint/config-conventional"]
3+
}

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.github/pull_request_template.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Description
2+
3+
Please include a summary of the changes.

.github/workflows/test.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v2
16+
17+
- name: set outputs
18+
id: vars
19+
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
20+
21+
- name: start build notification
22+
uses: appleboy/telegram-action@master
23+
with:
24+
to: ${{ secrets.TELEGRAM_CHAT }}
25+
token: ${{ secrets.TELEGRAM_TOKEN }}
26+
disable_web_page_preview: true
27+
format: html
28+
message: |
29+
⏳ <a href="${{ github.server_url }}/${{ github.repository }}"><b>${{ github.repository }}</b></a>
30+
31+
${{ github.workflow }}
32+
33+
by: ${{ github.actor }}
34+
branch: ${{ github.ref }}
35+
commit: ${{ github.event.head_commit.message }}
36+
sha: ${{ steps.vars.outputs.sha_short }}
37+
38+
<a href="${{ github.event.head_commit.url }}">link</a>
39+
40+
- name: install tools from asdf config
41+
uses: ai/asdf-cache-action@v1
42+
43+
- name: install dependencies
44+
run: pnpm install
45+
46+
- name: build packages
47+
run: pnpm build
48+
49+
- name: test
50+
run: pnpm test
51+
52+
- name: finish build notification
53+
uses: appleboy/telegram-action@master
54+
if: always()
55+
with:
56+
to: ${{ secrets.TELEGRAM_CHAT }}
57+
token: ${{ secrets.TELEGRAM_TOKEN }}
58+
disable_web_page_preview: true
59+
format: html
60+
message: |
61+
${{ job.status == 'success' && '✅' || '🆘' }} <a href="${{ github.server_url }}/${{ github.repository }}"><b>${{ github.repository }}</b></a>
62+
63+
${{ github.workflow }}
64+
65+
by: ${{ github.actor }}
66+
branch: ${{ github.ref }}
67+
commit: ${{ github.event.head_commit.message }}
68+
sha: ${{ steps.vars.outputs.sha_short }}
69+
70+
<a href="${{ github.event.head_commit.url }}">link</a>

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Node.js
2+
node_modules/
3+
4+
# Build
5+
dist/
6+
7+
# Editor
8+
.vscode/
9+
.vim/
10+
11+
# Test
12+
coverage/
13+
14+
# Misc
15+
.DS_Store

.prettierrc

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"arrowParens": "avoid",
3+
"bracketSpacing": true,
4+
"endOfLine": "lf",
5+
"printWidth": 80,
6+
"quoteProps": "as-needed",
7+
"semi": false,
8+
"singleQuote": true,
9+
"tabWidth": 2,
10+
"trailingComma": "all",
11+
"useTabs": false
12+
}

.simple-git-hooks.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"commit-msg": "pnpm exec commitlint -e \"$@\""
3+
}

.tool-versions

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nodejs 20.0.0
2+
pnpm 8.3.1

changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 0.1.0 (2023-05-06)
2+
3+
* initial release

eslint.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import config from '@azat-io/eslint-config-typescript'
2+
3+
export default config

index.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import sortInterfaces, {
2+
RULE_NAME as sortInterfacesName,
3+
} from '~/rules/sort-interfaces'
4+
import { name } from '~/package.json'
5+
6+
export default {
7+
name,
8+
rules: {
9+
[sortInterfacesName]: sortInterfaces,
10+
},
11+
}

package.json

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"name": "eslint-plugin-perfectionist",
3+
"description": "ESLint plugin for code formatting in perfectionist style",
4+
"version": "0.1.0",
5+
"type": "module",
6+
"repository": "azat-io/eslint-plugin-perfectionist",
7+
"author": "Azat S. <[email protected]>",
8+
"license": "MIT",
9+
"keywords": [
10+
"eslint",
11+
"eslint-plugin",
12+
"perfectionist"
13+
],
14+
"scripts": {
15+
"build": "vite build",
16+
"release": "pnpm release:check && pnpm release:version && pnpm release:publish",
17+
"release:changelog": "conventional-changelog -p angular --infile changelog.md --same-file",
18+
"release:check": "pnpm test && pnpm run build",
19+
"release:publish": "clean-publish",
20+
"release:version": "bumpp package.json --execute=\"pnpm release:changelog && git add changelog.md\" --commit \"build: publish v%s\" --tag --all",
21+
"lint": "eslint \"**/*.{js,ts}\"",
22+
"test:types": "tsc --noEmit --pretty",
23+
"test:unit": "vitest --run --coverage",
24+
"test": "pnpm run lint && pnpm run test:types && pnpm run test:unit"
25+
},
26+
"publishConfig": {
27+
"access": "public"
28+
},
29+
"files": [
30+
"./dist"
31+
],
32+
"exports": {
33+
".": {
34+
"require": "./dist/index.cjs.js",
35+
"import": "./dist/index.es.js"
36+
},
37+
"./package.json": "./package.json"
38+
},
39+
"peerDependencies": {
40+
"eslint": "^8.39.0"
41+
},
42+
"dependencies": {
43+
"@typescript-eslint/types": "^5.59.2",
44+
"@typescript-eslint/utils": "^5.59.2"
45+
},
46+
"devDependencies": {
47+
"@azat-io/eslint-config-typescript": "^0.6.3",
48+
"@commitlint/cli": "^17.6.3",
49+
"@commitlint/config-conventional": "^17.6.3",
50+
"@types/node": "^20.1.0",
51+
"@vitest/coverage-c8": "^0.31.0",
52+
"clean-publish": "^4.2.0",
53+
"conventional-changelog-cli": "^2.2.2",
54+
"eslint": "^8.40.0",
55+
"simple-git-hooks": "^2.8.1",
56+
"typescript": "^5.0.4",
57+
"vite": "^4.3.5",
58+
"vitest": "^0.31.0"
59+
}
60+
}

0 commit comments

Comments
 (0)