Skip to content

Commit

Permalink
feat(tasks): Enable tasks/lint_rules CI (#2118)
Browse files Browse the repository at this point in the history
Part of #2020

👉🏻  See generated comment on #2117
  • Loading branch information
leaysgur authored Jan 22, 2024
1 parent 766ca63 commit ce94714
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/lint-rules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Update lint_rules list

on:
push:
branches:
- main
paths:
- 'crates/oxc_linter/**'
- 'tasks/lint_rules/**'

jobs:
lint_rules:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout Branch
uses: actions/checkout@v4

- name: Install Rust
uses: moonrepo/setup-rust@v1 # Cache everything to speed up compilation
with:
cache-base: main

- name: Build lint_rules task
run: cargo build -p lint_rules

- name: Update eslint
run: cargo run -p lint_rules eslint --update
4 changes: 3 additions & 1 deletion tasks/lint_rules/src/update_comment/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use ureq::Response;

const ESLINT_ISSUE_API_URL: &str = "https://api.github.com/repos/oxc-project/oxc/issues/479";
const ESLINT_ISSUE_API_URL: &str = "https://api.github.com/repos/oxc-project/oxc/issues/2117";
// TODO: Restore it after update text is fixed and unsupported list is updated
// const ESLINT_ISSUE_API_URL: &str = "https://api.github.com/repos/oxc-project/oxc/issues/479";

pub fn run(plugin_name: &str, token: &str, comment_body: &str) -> Result<String, String> {
let api_url = match plugin_name {
Expand Down

0 comments on commit ce94714

Please sign in to comment.