Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update typescript, tslint -> eslint #74

Merged
merged 4 commits into from
Dec 31, 2023
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
2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

69 changes: 69 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"env": {
"node": true
},
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"caughtErrors": "none"
}
],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-inferrable-types": "off",
"no-prototype-builtins": "off",
"no-useless-escape": "off",
"prefer-rest-params": "off",
"no-constant-condition": [
"error",
{
"checkLoops": false
}
],
"key-spacing": [
"error",
{
"beforeColon": false,
"afterColon": true,
"mode": "strict"
}
],
"semi": [
"error",
"always"
],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}
],
"arrow-parens": [
"error",
"always"
],
"import/namespace": "off",
"import/no-unresolved": "off",
"import/no-extraneous-dependencies": "off"
}
}
17 changes: 11 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,30 @@ on: [push]
jobs:
job:
runs-on: ubuntu-latest
container: node:12
timeout-minutes: 15
services:
dynamodb:
image: amazon/dynamodb-local
# @note Github overwrites WORKDIR to repository path, so overwrite that again
options: >-
--workdir /home/dynamodblocal
--health-cmd "curl --fail http://127.0.0.1:8000/shell/ || exit 1" --health-interval 10s --health-timeout 5s --health-retries 5
--health-cmd "curl --fail -X POST http://127.0.0.1:8000 -H 'Accept-Encoding: identity' -H 'Authorization: AWS4-HMAC-SHA256 Credential=AKIAXXXXXXXXXXXXXXXX/20190505/ap-southeast-2/dynamodb/aws4_request, SignedHeaders=accept-encoding;cache-control;content-type;user-agent;x-amz-date;x-amz-target, Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' -H 'Content-Type: application/json' -H 'User-Agent: postman' -H 'X-Amz-Date: 20190505T235951Z' -H 'X-Amz-Target: DynamoDB_20120810.ListTables' -H 'cache-control: no-cache' -d '{}' || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 8000:8000
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Prepare
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm run test:ci
env:
DYNAMO_TYPES_ENDPOINT: http://dynamodb:8000
DYNAMO_TYPES_ENDPOINT: http://localhost:8000
- name: Publish
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
# npm will not execute `prepublisnOnly` lifecycle hook if user is root.
Expand Down
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@ dst/**/__test__
.idea
.vscode
src/
website/
docs/
.releaserc.json
.nvmrc
.eslintrc
renovate.json
tsconfig.json
tsconfig.test.json
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.16.0
Loading