Skip to content

Commit

Permalink
Added User Access Groups support and improved test coverage (#75)
Browse files Browse the repository at this point in the history
* 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
Show file tree
Hide file tree
Showing 30 changed files with 518 additions and 123 deletions.
2 changes: 0 additions & 2 deletions .editorconfig

This file was deleted.

1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

34 changes: 25 additions & 9 deletions .eslintrc
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"]
}
]
}
102 changes: 102 additions & 0 deletions .github/workflows/code_quality.yml
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
21 changes: 0 additions & 21 deletions .github/workflows/main.yml

This file was deleted.

65 changes: 62 additions & 3 deletions .gitignore
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/
2 changes: 0 additions & 2 deletions .npmignore

This file was deleted.

5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist
temp
*.json
coverage
.DS_Store
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"useTabs": false,
"printWidth": 100,
"trailingComma": "all"
}
Loading

0 comments on commit f0231d2

Please sign in to comment.