Skip to content

Commit

Permalink
Merge pull request #71 from consideRatio/pr/update-to-use-node20
Browse files Browse the repository at this point in the history
Update to use node 20, and ci/docs/linting details
  • Loading branch information
manics authored Feb 4, 2024
2 parents d81e6c7 + 304ecb0 commit d265aeb
Show file tree
Hide file tree
Showing 13 changed files with 4,636 additions and 10,038 deletions.
79 changes: 16 additions & 63 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,23 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/recommended"],
"env": {
"node": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "jest"],
"rules": {
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
// DEBUGGING:
"@typescript-eslint/no-unused-vars": "off",
"prefer-const": "off",
"no-unreachable": "off",
"prefer-promise-reject-errors": "off",
"no-constant-condition": "off",
"github/no-then": "off",
"@typescript-eslint/explicit-function-return-type": "off",
// DEFAULT:
// "@typescript-eslint/no-unused-vars": "error",
// ---
"@typescript-eslint/explicit-member-accessibility": [
"error",
{"accessibility": "no-public"}
],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{"allowExpressions": true}
],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
"no-async-promise-executor": "warn",
"prefer-const": "warn",
"no-constant-condition": "warn"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
"root": true
}
6 changes: 1 addition & 5 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
#
# Button: https://github.com/jupyterhub/action-k8s-await-workloads/actions?query=workflow%3A%22Package+to+./dist%22
#
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
#
---
name: Package to ./dist

on:
Expand All @@ -26,7 +22,7 @@ jobs:
# https://github.com/actions/setup-node
- uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "20"

- name: Install deps and update package-lock.json
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup k8s cluster
uses: jupyterhub/action-k3s-helm@v4
with:
k3s-channel: v1.25 # https://update.k3s.io/v1-release/channels
k3s-channel: stable # https://update.k3s.io/v1-release/channels
metrics-enabled: false
traefik-enabled: false

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release-updates.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Automatically updates "vX" branches based on GitHub releases. To cut a new
# release, use the GitHub UI where you enter a tag name and release name of
# "vX.Y.Z". See https://github.com/jupyterhub/action-k8s-await-workloads/releases.
---
name: Release updates

on:
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Tests the local GitHub Action.
#
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
#
---
name: Test

on:
Expand All @@ -18,12 +12,12 @@ on:
jobs:
autoformat:
name: Run autoformatter
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.12"
- uses: actions/setup-node@v4

- run: pip install pre-commit
Expand All @@ -34,15 +28,15 @@ jobs:
# FIXME: we don't have any unit tests
# unit-test:
# Name: Run npm test
# runs-on: ubuntu-20.04
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
# - run: npm install
# - run: npm run all

local-action:
name: Test ${{ matrix.job-name }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

strategy:
fail-fast: false
Expand Down Expand Up @@ -98,7 +92,7 @@ jobs:
# https://github.com/actions/setup-node
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: "20"

- name: Package to ./dist for test
run: |
Expand All @@ -112,7 +106,7 @@ jobs:
uses: jupyterhub/action-k3s-helm@v4
with:
# k3s-channel: https://update.k3s.io/v1-release/channels
k3s-channel: v1.23
k3s-channel: latest
metrics-enabled: false
traefik-enabled: false

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
repos:
# Autoformat: markdown, yaml, json
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
rev: v3.1.0
hooks:
- id: prettier

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Setup k8s cluster
uses: jupyterhub/action-k3s-helm@v3
with:
k3s-channel: v1.25 # https://update.k3s.io/v1-release/channels
k3s-channel: stable # https://update.k3s.io/v1-release/channels
metrics-enabled: false
traefik-enabled: false

Expand Down
2 changes: 1 addition & 1 deletion ci/restarted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ spec:
command:
- sh
- -c
- cat /tmp/mount/here && sleep 1
- cat /tmp/mount/here
initialDelaySeconds: 0
periodSeconds: 2
Loading

0 comments on commit d265aeb

Please sign in to comment.