-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added User Access Groups support and improved test coverage (#75)
* added access groups endpoint * added: improved prettier support * added: improved lint testing * improved: tests and coverage * corrected formatting (prettier) * fixed: replaced any types where possible * fixed: added eslint rules to allow unsafe args/assignments * added back jest typings for GH Actions * updated: consolidated github actions into a single file * fixed: give github actions a name * fixed: added names for each test
- Loading branch information
John Agan
authored
Nov 16, 2022
1 parent
ea0e31a
commit f0231d2
Showing
30 changed files
with
518 additions
and
123 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,31 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"es2021": true, | ||
"browser": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"ignorePatterns": ["dist", "**/*.d.ts"], | ||
"plugins": ["prettier", "@typescript-eslint"], | ||
"extends": ["plugin:@typescript-eslint/recommended", "prettier"], | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module" | ||
"ecmaVersion": 12, | ||
"project": "tsconfig.eslint.json" | ||
}, | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "warn", | ||
"prettier/prettier": ["error"] | ||
} | ||
"prefer-const": "error", | ||
"prettier/prettier": "error", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-params": "off", | ||
"@typescript-eslint/no-unsafe-argument": "warn", | ||
"@typescript-eslint/no-unsafe-assignment": "warn" | ||
}, | ||
"overrides": [ | ||
{ | ||
"env": { "jest": true, "node": true }, | ||
"files": ["tests/**/*.ts"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Code Quality | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
name: TypeScript Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: yarn install | ||
run: yarn install | ||
|
||
- run: yarn build | ||
name: yarn build | ||
|
||
typecheck: | ||
name: TypeScript Typecheck | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: yarn install | ||
run: yarn install | ||
|
||
- run: yarn typecheck | ||
name: yarn typecheck | ||
|
||
test: | ||
name: Jest CI Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: yarn install | ||
run: yarn install | ||
|
||
- name: yarn build | ||
run: yarn build | ||
|
||
- run: yarn test:ci | ||
name: yarn test:ci | ||
|
||
prettier: | ||
name: Prettier Formatting | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: yarn install | ||
run: yarn install | ||
|
||
- run: yarn format:check | ||
name: yarn format:check | ||
|
||
lint: | ||
name: ESLint Linting | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: yarn install | ||
run: yarn install | ||
|
||
- run: yarn lint | ||
name: yarn lint |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,63 @@ | ||
node_modules/ | ||
dist/ | ||
# Logs | ||
logs | ||
*.log | ||
.env | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
.env.production | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
temp | ||
.DS_Store | ||
|
||
# Compiled files | ||
dist/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
dist | ||
temp | ||
*.json | ||
coverage | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"semi": true, | ||
"useTabs": false, | ||
"printWidth": 100, | ||
"trailingComma": "all" | ||
} |
Oops, something went wrong.