Skip to content

Commit f0231d2

Browse files
author
John Agan
authored
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
1 parent ea0e31a commit f0231d2

30 files changed

+518
-123
lines changed

.editorconfig

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
11
{
2-
"root": true,
2+
"env": {
3+
"es2021": true,
4+
"browser": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended",
9+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
10+
],
311
"parser": "@typescript-eslint/parser",
4-
"ignorePatterns": ["dist", "**/*.d.ts"],
5-
"plugins": ["prettier", "@typescript-eslint"],
6-
"extends": ["plugin:@typescript-eslint/recommended", "prettier"],
712
"parserOptions": {
8-
"ecmaVersion": 6,
9-
"sourceType": "module"
13+
"ecmaVersion": 12,
14+
"project": "tsconfig.eslint.json"
1015
},
16+
"plugins": ["@typescript-eslint", "prettier"],
1117
"rules": {
12-
"@typescript-eslint/no-explicit-any": "warn",
13-
"prettier/prettier": ["error"]
14-
}
18+
"prefer-const": "error",
19+
"prettier/prettier": "error",
20+
"@typescript-eslint/no-unused-vars": "off",
21+
"@typescript-eslint/no-unused-params": "off",
22+
"@typescript-eslint/no-unsafe-argument": "warn",
23+
"@typescript-eslint/no-unsafe-assignment": "warn"
24+
},
25+
"overrides": [
26+
{
27+
"env": { "jest": true, "node": true },
28+
"files": ["tests/**/*.ts"]
29+
}
30+
]
1531
}

.github/workflows/code_quality.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Code Quality
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
name: TypeScript Build
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
14+
- name: Install Node.js
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: 14.x
18+
19+
- name: yarn install
20+
run: yarn install
21+
22+
- run: yarn build
23+
name: yarn build
24+
25+
typecheck:
26+
name: TypeScript Typecheck
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
33+
- name: Install Node.js
34+
uses: actions/setup-node@v1
35+
with:
36+
node-version: 14.x
37+
38+
- name: yarn install
39+
run: yarn install
40+
41+
- run: yarn typecheck
42+
name: yarn typecheck
43+
44+
test:
45+
name: Jest CI Tests
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v2
51+
52+
- name: Install Node.js
53+
uses: actions/setup-node@v1
54+
with:
55+
node-version: 14.x
56+
57+
- name: yarn install
58+
run: yarn install
59+
60+
- name: yarn build
61+
run: yarn build
62+
63+
- run: yarn test:ci
64+
name: yarn test:ci
65+
66+
prettier:
67+
name: Prettier Formatting
68+
runs-on: ubuntu-latest
69+
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v2
73+
74+
- name: Install Node.js
75+
uses: actions/setup-node@v1
76+
with:
77+
node-version: 14.x
78+
79+
- name: yarn install
80+
run: yarn install
81+
82+
- run: yarn format:check
83+
name: yarn format:check
84+
85+
lint:
86+
name: ESLint Linting
87+
runs-on: ubuntu-latest
88+
89+
steps:
90+
- name: Checkout
91+
uses: actions/checkout@v2
92+
93+
- name: Install Node.js
94+
uses: actions/setup-node@v1
95+
with:
96+
node-version: 14.x
97+
98+
- name: yarn install
99+
run: yarn install
100+
101+
- run: yarn lint
102+
name: yarn lint

.github/workflows/main.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.gitignore

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,63 @@
1-
node_modules/
2-
dist/
1+
# Logs
2+
logs
33
*.log
4-
.env
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Coverage directory used by tools like istanbul
11+
coverage
12+
*.lcov
13+
14+
# Diagnostic reports (https://nodejs.org/api/report.html)
15+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
16+
17+
# Runtime data
18+
pids
19+
*.pid
20+
*.seed
21+
*.pid.lock
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (https://nodejs.org/api/addons.html)
27+
build/Release
28+
29+
# Dependency directories
30+
node_modules/
31+
32+
# TypeScript cache
33+
*.tsbuildinfo
34+
35+
# Optional npm cache directory
36+
.npm
37+
38+
# Optional eslint cache
39+
.eslintcache
40+
41+
# Output of 'npm pack'
42+
*.tgz
43+
44+
# Yarn Integrity file
45+
.yarn-integrity
46+
47+
# dotenv environment variables file
48+
.env
49+
.env.test
50+
.env.production
51+
52+
# yarn v2
53+
.yarn/cache
54+
.yarn/unplugged
55+
.yarn/build-state.yml
56+
.yarn/install-state.gz
57+
.pnp.*
58+
59+
temp
60+
.DS_Store
61+
62+
# Compiled files
63+
dist/

.npmignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist
2+
temp
3+
*.json
4+
coverage
5+
.DS_Store

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": true,
3+
"useTabs": false,
4+
"printWidth": 100,
5+
"trailingComma": "all"
6+
}

0 commit comments

Comments
 (0)