Skip to content

Commit

Permalink
refactor: Modernise XBlock code
Browse files Browse the repository at this point in the history
  • Loading branch information
xitij2000 committed Aug 9, 2024
1 parent 0d3bc09 commit 066c402
Show file tree
Hide file tree
Showing 19 changed files with 2,060 additions and 3,015 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci-javascript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: JavaScript CI

on:
push:
branches: [master]
pull_request:
branches:
- '**'

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm ci
- run: npm run lint
30 changes: 30 additions & 0 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Python CI

on:
push:
branches: [master]
pull_request:
branches:
- '**'


jobs:
run_tests:
name: linting
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Install Dependencies
run: pip install .[]

- name: Run linting
run: pytest pdf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.envrc
.direnv/
node_modules/
xblock_pdf.egg-info/
52 changes: 0 additions & 52 deletions .jscsrc

This file was deleted.

24 changes: 0 additions & 24 deletions .jshintrc

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
58 changes: 0 additions & 58 deletions Gruntfile.js

This file was deleted.

15 changes: 15 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import globals from "globals";
import pluginJs from "@eslint/js";


export default [
{
ignores: ['!pdf/static/js/**'],
},
{
files: ["pdf/static/js/*.js"],

languageOptions: {sourceType: "script",globals: {...globals.browser, ...globals.jquery}}
},
pluginJs.configs.recommended,
];
Loading

0 comments on commit 066c402

Please sign in to comment.