Skip to content

Commit

Permalink
Merge pull request #24 from jupyterlite/lint
Browse files Browse the repository at this point in the history
Add linting
  • Loading branch information
ianthomas23 authored Jul 22, 2024
2 parents 446cfd5 + 7e2ebda commit 854f21d
Show file tree
Hide file tree
Showing 60 changed files with 7,711 additions and 6,184 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Check Release
on:
push:
branches: ["main"]
branches: ['main']
pull_request:
branches: ["*"]
branches: ['*']

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -20,7 +20,6 @@ jobs:
- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:

token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,17 @@ jobs:
node-version: 20

- name: Install dependencies
run: npm install
run: |
npm install
- name: Build
run: npm run build
run: |
npm run build
- name: Lint
run: |
npm run lint:check
- name: Run tests
run: npm t
run: |
npm t
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ lib/
node_modules/
tsconfig.tsbuildinfo
.coverage/
.eslintcache
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
**/node_modules
**/lib
**/package.json
**/package-lock.json
!/package.json
**/wasm/*.js
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ Intended for use in [JupyterLite](https://github.com/jupyterlite/jupyterlite).
```bash
npm install
npm run build
npm run lint:check
npm t
```

To run single test file

```bash
npm t -- tests/whatever.ts
```
5 changes: 3 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
verbose: true,
collectCoverage: true,
coverageDirectory: '.coverage',
testEnvironment: "jsdom",
setupFilesAfterEnv: ["<rootDir>/tests/global_setup.ts"]
coveragePathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/src/wasm/'],
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/tests/global_setup.ts']
};
Loading

0 comments on commit 854f21d

Please sign in to comment.