Skip to content

Commit d4b8265

Browse files
committed
Add eslint
1 parent 5ce030f commit d4b8265

File tree

5 files changed

+1315
-113
lines changed

5 files changed

+1315
-113
lines changed

.github/workflows/eslint.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SPDX-FileCopyrightText: 2026 The Pion community <https://pion.ly>
2+
# SPDX-License-Identifier: MIT
3+
4+
name: ESLint
5+
6+
on:
7+
push:
8+
branches: ["main"]
9+
pull_request:
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: "25"
23+
cache: "npm"
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Run ESLint
29+
run: npm run lint

eslint.config.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/**
2+
* SPDX-FileCopyrightText: 2026 The Pion community <https://pion.ly>
3+
* SPDX-License-Identifier: MIT
4+
*/
5+
6+
import js from "@eslint/js";
7+
import { defineConfig } from "eslint/config";
8+
import tseslint from "typescript-eslint";
9+
10+
export default defineConfig(
11+
{
12+
ignores: ["node_modules", "dist", "coverage"],
13+
},
14+
js.configs.recommended,
15+
...tseslint.configs.recommended,
16+
{
17+
languageOptions: {
18+
parserOptions: {
19+
ecmaVersion: "latest",
20+
sourceType: "module",
21+
},
22+
},
23+
rules: {
24+
quotes: ["error", "double", { avoidEscape: true }],
25+
semi: ["error", "always"],
26+
},
27+
},
28+
);

0 commit comments

Comments
 (0)