diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml new file mode 100644 index 0000000..f57ca26 --- /dev/null +++ b/.github/workflows/eslint.yml @@ -0,0 +1,39 @@ +name: ESLint + +on: + push: + paths: + - '**/*.vue' + - '**/*.ts' + - '**/*.tsx' + - '**/*.js' + pull_request: + paths: + - '**/*.vue' + - '**/*.ts' + - '**/*.tsx' + - '**/*.js' + +jobs: + eslint: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Lint code + run: pnpm run lint diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..c73702c --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,40 @@ +name: Prettier Check + +on: + push: + paths: + - '**/*.vue' + - '**/*.ts' + - '**/*.tsx' + - '**/*.js' + pull_request: + paths: + - '**/*.vue' + - '**/*.ts' + - '**/*.tsx' + - '**/*.js' + +jobs: + prettier: + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Run Prettier check + run: pnpm exec prettier --check './**/*.{js,ts,tsx,vue}' diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..4f62041 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,29 @@ +name: Python Linting + +on: + push: + paths: + - '**/*.py' + pull_request: + paths: + - '**/*.py' + +jobs: + pylint: + name: Run Pylint + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - name: Install Pylint + run: pip install pylint + + - name: Run Pylint + run: pylint --rcfile=.pylintrc $(find . -type f -name "*.py") diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 0000000..a5da56e --- /dev/null +++ b/.pylintrc @@ -0,0 +1,3 @@ +[MESSAGES CONTROL] +disable=all +enable=eval-used