linters.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: Linters
  2. on:
  3. push:
  4. branches: [main]
  5. paths-ignore:
  6. - '.github/**'
  7. - '!.github/workflows/linters.yml'
  8. - '!.github/CONTRIBUTING.md'
  9. pull_request:
  10. # We want all branches so we configure types to be the GH default again
  11. types: [opened, synchronize, reopened]
  12. paths-ignore:
  13. - '.github/**'
  14. - '!.github/workflows/linters.yml'
  15. - '!.github/CONTRIBUTING.md'
  16. env:
  17. YARN_ENABLE_GLOBAL_CACHE: false
  18. SKIP_YARN_COREPACK_CHECK: true
  19. jobs:
  20. lint_js:
  21. name: Lint JavaScript/TypeScript
  22. runs-on: ubuntu-latest
  23. steps:
  24. - name: Checkout sources
  25. uses: actions/checkout@v4
  26. - name: Install Node.js
  27. uses: actions/setup-node@v4
  28. with:
  29. node-version: lts/*
  30. cache: yarn
  31. - name: Install dependencies
  32. # List all projects that use a custom ESLint config:
  33. run:
  34. corepack yarn workspaces focus @uppy/angular @uppy-example/angular
  35. @uppy-example/react-native-expo @uppy/react-native @uppy-dev/build
  36. - name: Run linter
  37. run: corepack yarn run lint
  38. - name: Run Prettier
  39. run: corepack yarn run format:check-diff
  40. lint_md:
  41. name: Lint Markdown
  42. runs-on: ubuntu-latest
  43. steps:
  44. - name: Checkout sources
  45. uses: actions/checkout@v4
  46. - name: Install Node.js
  47. uses: actions/setup-node@v4
  48. with:
  49. node-version: lts/*
  50. cache: yarn
  51. - name: Install dependencies
  52. run: corepack yarn workspaces focus @uppy-dev/build
  53. - name: Run linter
  54. run: corepack yarn run lint:markdown