diff --git a/.github/workflows/formatting-and-lint.yml b/.github/workflows/formatting-and-lint.yml new file mode 100644 index 00000000..69c0dae8 --- /dev/null +++ b/.github/workflows/formatting-and-lint.yml @@ -0,0 +1,23 @@ +name: Check formatting and lint + +on: + pull_request: + +jobs: + formatting-and-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 14 + + - name: Install Node.js dependencies + run: npm ci + + - name: Check formatting with Prettier + run: npx prettier -cu . + + - name: Lint with ESLint + run: npx eslint . diff --git a/assets/chat/js/autocomplete.js b/assets/chat/js/autocomplete.js index baffc0a0..8e98f6b9 100644 --- a/assets/chat/js/autocomplete.js +++ b/assets/chat/js/autocomplete.js @@ -11,6 +11,10 @@ function getBucketId(id) { } function sortResults(a, b) { + // eslint-disable-next-line no-console + console.log(a); + // eslint-disable-next-line no-console + console.log(b); if (!a || !b) return 0; // order emotes second