Skip to content

Commit 4ee9edc

Browse files
committed
🎉 init: Initialize repository
0 parents  commit 4ee9edc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+16787
-0
lines changed

.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# Matches multiple files with brace expansion notation
12+
# Set default charset
13+
[*.{js,cjs,mjs,ts,cts,mts,json}]
14+
charset = utf-8
15+
indent_style = space
16+
indent_size = 2

.eslintrc.cjs

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// @ts-check
2+
3+
/* eslint-env node */
4+
5+
/** @satisfies {import("eslint").Linter.Config} */
6+
const config = {
7+
root: true,
8+
extends: [
9+
"eslint:recommended",
10+
"plugin:@typescript-eslint/recommended",
11+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
12+
"plugin:import/recommended",
13+
"plugin:import/typescript",
14+
"plugin:prettier/recommended",
15+
"plugin:sonarjs/recommended",
16+
],
17+
parser: "@typescript-eslint/parser",
18+
parserOptions: {
19+
ecmaVersion: "latest",
20+
sourceType: "module",
21+
project: ["./tsconfig.json", "./tsconfig.test.json", "./tsconfig.eslint.json"],
22+
tsconfigRootDir: __dirname,
23+
},
24+
ignorePatterns: ["!.lintstagedrc.js"],
25+
plugins: ["sort-destructure-keys"],
26+
rules: {
27+
"@typescript-eslint/consistent-type-imports": [
28+
"error",
29+
{ prefer: "type-imports", disallowTypeAnnotations: false },
30+
],
31+
"@typescript-eslint/no-empty-object-type": "off",
32+
"@typescript-eslint/no-explicit-any": "off",
33+
"@typescript-eslint/no-namespace": "off",
34+
"@typescript-eslint/no-non-null-assertion": "off",
35+
"@typescript-eslint/no-unsafe-argument": "off",
36+
"@typescript-eslint/no-unsafe-assignment": "off",
37+
"@typescript-eslint/no-unsafe-call": "off",
38+
"@typescript-eslint/no-unsafe-member-access": "off",
39+
"@typescript-eslint/no-unsafe-return": "off",
40+
"@typescript-eslint/no-unused-vars": "off", // Already covered by TypeScript
41+
"import/export": "off",
42+
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
43+
"import/namespace": "off",
44+
"import/no-unresolved": "off",
45+
"import/order": [
46+
"error",
47+
{
48+
alphabetize: { order: "asc" },
49+
groups: ["builtin", "external", "internal", "parent", "sibling", "index", "object"],
50+
"newlines-between": "always",
51+
},
52+
],
53+
"no-restricted-syntax": [
54+
"error",
55+
{
56+
selector: "CallExpression[callee.property.name='push'] > SpreadElement.arguments",
57+
message: "Do not use spread arguments in Array#push",
58+
},
59+
],
60+
"no-undef": "off",
61+
"object-shorthand": "error",
62+
"sonarjs/cognitive-complexity": "off",
63+
"sonarjs/no-duplicate-string": "off",
64+
"sort-destructure-keys/sort-destructure-keys": "error",
65+
"sort-imports": [
66+
"error",
67+
{
68+
ignoreCase: false,
69+
ignoreDeclarationSort: true,
70+
ignoreMemberSort: false,
71+
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
72+
},
73+
],
74+
},
75+
reportUnusedDisableDirectives: true,
76+
};
77+
78+
module.exports = config;

.github/workflows/test.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [22.x]
16+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: "npm"
26+
27+
- run: npm ci
28+
29+
- name: Test
30+
run: |
31+
npm run test:cov
32+
33+
- name: Report Coveralls
34+
run: curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz && ./coveralls
35+
env:
36+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Logs
2+
logs/
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
# Build
11+
node_modules/
12+
dist/
13+
*.local
14+
15+
# Coverage
16+
coverage/
17+
18+
# Editor directories and files
19+
.vscode/*
20+
!.vscode/extensions.json
21+
.idea/
22+
.DS_Store
23+
*.suo
24+
*.ntvs*
25+
*.njsproj
26+
*.sln
27+
*.sw?

COMMERCIAL_LICENSE.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Commercial License for showify
2+
3+
This project is licensed under the Mozilla Public License Version 2.0 (MPL 2.0). For open-source usage, you may freely use, modify, and distribute this library under the terms of the MPL 2.0.
4+
5+
## When is a Commercial License Needed?
6+
7+
A commercial license is required only if you:
8+
9+
- Modify this library and **do not wish to open-source your modifications**.
10+
- Distribute this library as part of a proprietary, closed-source project that includes modifications to the source code.
11+
12+
If you are simply using this library in your commercial projects without modifying it, no commercial license is needed under the MPL 2.0.
13+
14+
## How to Obtain a Commercial License?
15+
16+
To obtain a commercial license or discuss pricing, please contact:
17+
18+
19+
20+
## Why Choose a Commercial License?
21+
22+
By purchasing a commercial license, you gain:
23+
24+
- The ability to modify and distribute this library without releasing your modifications.
25+
- Peace of mind for proprietary projects that require closed-source code.

0 commit comments

Comments
 (0)