Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 0 additions & 62 deletions .circleci/config.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .copilot/instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Standing Instructions for GitHub Copilot

- Follow the project's coding standards and style guides.
- Use TypeScript for all new code.
- Use descriptive variable and function names.
- Avoid using any deprecated APIs or libraries.
- Use the projects linting rules, don't suggest code breaking them.
- Always have a namespace when creating a type, even if empty
- For all exported `type` and `interface` declarations provide `type`, `is` and `flaw` definitions.

# Coding Standards

- Functions only return in one place.
- Use the name `result` for what the function returns even when it is modified on the last line.
- Never use abbreviations except "UI", "Id", "max", "min".
- Prefer fewer lines of code over shorter lines.
- Prefer expressions over statements.
- Never use unnecessary braces.
- Rely on type system and only use `===` and `!==` when strictly necessary.
- In tests, always import the top level export from the packages index file like this: `import { isoly } from "../index"` with adjustments for path.
- In tests, prefer using `it.each` where possible.
- Don't use braces in lambda function when not required.
- Prefer single word identifier names.
- Only use single letter identifiers if usage is kept within a maximum of 3 lines.
- Make test descriptions short, use function names and single words describing test.
- No blank lines between test cases in test files.

# Test File Structure Example

```typescript
describe("isoly.Something", () => {
it.each([
["input1", "output1"],
["input2", "output2"],
])("test description %s", (input, output) => expect(something(input)).toBe(output))
it.each([
["input3", "output3"],
["input4", "output4"],
])("another test %s", (input, output) => expect(something(input)).toBe(output))
it("single test", () => expect(something()).toBe(true))
})
```
7 changes: 5 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[{package.json, *.yml}]
[{*.yml}]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
insert_final_newline = true
trim_trailing_whitespace = false
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
transpiled
*.js
71 changes: 71 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"prettierx",
"simple-import-sort"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettierx/default"
],
"rules": {
"prettierx/options": [
1,
{
"singleQuote": false
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-namespace": "off",
"prefer-const": 1,
"@typescript-eslint/no-unused-vars": [
2,
{
"vars": "all",
"args": "none",
"varsIgnorePattern": "h"
}
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-case-declarations": "off",
"no-inner-declarations": "off",
"sort-imports": "off",
"simple-import-sort/imports": [
"error",
{
"groups": [
[
"@stencil/core",
"cryptly",
"flagly",
"gracely",
"isoly",
"paramly",
"selectively",
"langly",
"tidily",
"uply",
"authly",
"persistly",
"servly",
"servly-azure",
"smoothly",
"^\\u0000",
"^@?\\w",
"^",
"^\\."
]
]
}
]
},
"settings": {
"prettierx": {
"usePrettierrc": true
}
}
}
32 changes: 32 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Bump"

on:
push:
branches:
- "master"
jobs:
bump-version:
name: "Bump Version"
timeout-minutes: 60
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci: version bump to ')"

steps:
- name: "Checkout source code"
uses: "actions/checkout@v4"
with:
ref: ${{ github.ref }}
token: ${{ secrets.ADMIN_TOKEN }}
- name: "Setup Node"
uses: "actions/setup-node@v3"
with:
node-version: current
cache: "npm"
- name: "Version Bump"
id: version-bump
uses: "phips28/gh-action-bump-version@master"
with:
version-type: "minor"
tag-prefix: "release-"
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
pull_request:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: current
cache: 'npm'
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: npm install
- run: npm run build
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: current
cache: 'npm'
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: npm install
- run: npm run test
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: current
cache: 'npm'
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: npm install
- run: npm run lint
audit:
name: Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: current
cache: 'npm'
- run: npm audit --omit=dev
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Publish"

on:
push:
tags:
- "release-*"
jobs:
publish:
name: "Publish"
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: "Checkout source code"
uses: "actions/checkout@v3"
- name: "Setup Node"
uses: "actions/setup-node@v3"
with:
node-version: current
cache: "npm"
- uses: actions/cache@v3
with:
path: "**/node_modules"
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install
run: npm install
- name: Build
run: npm run build
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
VERSION=$(node -p "require('./package.json').version")
if [[ "$VERSION" == *-* ]]; then
npm publish --access public --tag prerelease
else
npm publish --access public
fi
shell: bash
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build
node_modules
npm-debug.log
coverage
dist
.env
.npmrc
coverage/
7 changes: 4 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source
**/*.test.js
**/*.test.ts
.vscode
**/*.spec.js
**/*.spec.ts
coverage
.env
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 120,
"useTabs": true,
"semi": false,
"singleQuote": false,
"bracketSpacing": true,
"jsxBracketSameLine": true,
"arrowParens": "avoid",
"endOfLine": "lf",
"breakBeforeStatement": "always"
}
6 changes: 3 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"recommendations": [
"ms-vscode.vscode-typescript-tslint-plugin",
"orta.vscode-jest",
"ymotongpoo.licenser"
"vitest.explorer",
"dbaeumer.vscode-eslint",
"streetsidesoftware.code-spell-checker"
]
}
Loading