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

Adding tests and allow linting TSX files #456

Merged
merged 3 commits into from Feb 3, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/node.yml
@@ -0,0 +1,50 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Node

on:
pull_request:
push:
branches:
- main
- master
- stable*

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

name: node
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v2
id: versions
with:
fallbackNode: '^16'
fallbackNpm: '^8'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Install dependencies
run: |
npm ci
- name: Run tests
run: |
npm test
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -121,7 +121,7 @@ module.exports = {
},
overrides: [
{
files: ['**/*.ts'],
files: ['**/*.ts', '**/*.tsx'],
extends: [
'@vue/eslint-config-typescript/recommended',
'plugin:import/typescript',
Expand All @@ -148,7 +148,7 @@ module.exports = {
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.ts', '.vue'],
extensions: ['.(m|c)?js', '.ts', '.tsx', '.vue'],
},
},
},
Expand Down