Skip to content

Commit d1b3ff8

Browse files
committed
feat: initial release
1 parent 39a1f69 commit d1b3ff8

30 files changed

+804
-1
lines changed

.commitlintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {},
4+
};

.czrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"path": "./node_modules/cz-conventional-changelog"
3+
}

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
max_line_length = 100
10+
tab_width = 2
11+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
coverage/**
2+
dist/**
3+
package-e2e/**
4+
*.js
5+
*.mjs

.eslintrc

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"node": true,
5+
"jest": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:import/recommended",
11+
"plugin:import/typescript",
12+
"plugin:unicorn/all",
13+
"plugin:node/recommended",
14+
"plugin:prettier/recommended",
15+
"plugin:ecmascript-compat/recommended"
16+
],
17+
"ignorePatterns": [
18+
"__fixtures__",
19+
"coverage",
20+
"dist",
21+
"e2e",
22+
"*.js"
23+
],
24+
"parser": "@typescript-eslint/parser",
25+
"parserOptions": {
26+
"project": "tsconfig.json"
27+
},
28+
"plugins": [
29+
"no-only-tests"
30+
],
31+
"rules": {
32+
"import/extensions": [
33+
"error",
34+
"ignorePackages",
35+
{
36+
"js": "never",
37+
"jsx": "never",
38+
"ts": "never",
39+
"tsx": "never"
40+
}
41+
],
42+
"import/no-cycle": "error",
43+
"import/order": ["error", {
44+
"alphabetize": {"order": "asc", "caseInsensitive": true}
45+
}],
46+
"import/no-internal-modules": "error",
47+
"node/no-missing-import": "off",
48+
"node/no-unsupported-features/es-syntax": "off",
49+
"@typescript-eslint/ban-types": "off",
50+
"@typescript-eslint/member-ordering": "error",
51+
"@typescript-eslint/no-this-alias": "off",
52+
"@typescript-eslint/no-explicit-any": "off",
53+
"@typescript-eslint/no-unused-vars": ["error", {
54+
"argsIgnorePattern": "^_",
55+
"varsIgnorePattern": "^_"
56+
}],
57+
"unicorn/consistent-function-scoping": "off",
58+
"unicorn/filename-case": "off",
59+
"unicorn/prefer-at": "off",
60+
"unicorn/prefer-json-parse-buffer": "off",
61+
"unicorn/prefer-node-protocol": "off",
62+
"unicorn/prefer-string-replace-all": "off",
63+
"unicorn/prevent-abbreviations": "off",
64+
"unicorn/no-array-callback-reference": "off",
65+
"unicorn/no-null": "off",
66+
"unicorn/no-this-assignment": "off",
67+
"unicorn/no-unused-properties": "off",
68+
"unicorn/prefer-module": "off"
69+
}
70+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, alpha, beta]
6+
paths-ignore:
7+
- '**/*.md'
8+
pull_request:
9+
branches: [master, alpha, beta]
10+
paths-ignore:
11+
- '**/*.md'
12+
13+
jobs:
14+
15+
sanity:
16+
name: Sanity
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: actions/setup-node@v3
21+
with:
22+
node-version-file: '.nvmrc'
23+
- name: Install main project
24+
uses: bahmutov/npm-install@v1
25+
with:
26+
useLockFile: false
27+
- name: Lint
28+
run: npm run lint:ci
29+
- name: Build
30+
run: npm run build
31+
- name: Unit Tests
32+
run: npm test
33+
- name: Pack
34+
run: npm pack
35+
- name: Install package-e2e project
36+
uses: bahmutov/npm-install@v1
37+
with:
38+
useLockFile: false
39+
working-directory: 'package-e2e'
40+
- name: Packaging E2E Tests
41+
run: npm test
42+
working-directory: 'package-e2e'
43+
44+
publish:
45+
name: Publish
46+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta'
47+
needs: [sanity]
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v3
51+
- uses: actions/setup-node@v3
52+
with:
53+
node-version-file: '.nvmrc'
54+
- name: Install main project
55+
uses: bahmutov/npm-install@v1
56+
with:
57+
useLockFile: false
58+
- name: Semantic release
59+
run: npx --no-install semantic-release
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,6 @@ dist
128128
.yarn/build-state.yml
129129
.yarn/install-state.gz
130130
.pnp.*
131+
132+
# IDE
133+
.idea/

.lintstagedrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
'*.{js,ts}': ['eslint --fix', 'jest --bail --findRelatedTests --passWithNoTests'],
3+
}

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package-lock=false
2+
workspaces=false

0 commit comments

Comments
 (0)