linter.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ---
  2. #################################
  3. #################################
  4. ## Super Linter GitHub Actions ##
  5. #################################
  6. #################################
  7. name: Lint Code Base
  8. #
  9. # Documentation:
  10. # https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
  11. #
  12. #############################
  13. # Start the job on all push #
  14. #############################
  15. on:
  16. push:
  17. branches-ignore: [main]
  18. # Remove the line above to run when pushing to master
  19. pull_request:
  20. branches: [main]
  21. ###############
  22. # Set the Job #
  23. ###############
  24. permissions:
  25. checks: write
  26. contents: read
  27. pull-requests: write
  28. statuses: write
  29. jobs:
  30. build:
  31. # Name the Job
  32. name: Lint Code Base
  33. # Set the agent to run on
  34. runs-on: ubuntu-latest
  35. ##################
  36. # Load all steps #
  37. ##################
  38. steps:
  39. ##########################
  40. # Checkout the code base #
  41. ##########################
  42. - name: Checkout Code
  43. uses: actions/checkout@v3
  44. with:
  45. # Full git history is needed to get a proper list of changed files within `super-linter`
  46. fetch-depth: 0
  47. - name: Intall dependencies
  48. run: yarn install --frozen-lockfile
  49. ################################
  50. # Run Linter against code base #
  51. ################################
  52. - name: Lint Code Base
  53. uses: github/super-linter@v4
  54. env:
  55. CSS_FILE_NAME: stylelint.config.js
  56. DEFAULT_BRANCH: main
  57. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  58. JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.js
  59. LINTER_RULES_PATH: .
  60. RUBY_CONFIG_FILE: .rubocop.yml
  61. VALIDATE_ALL_CODEBASE: false
  62. VALIDATE_CSS: true
  63. VALIDATE_JAVASCRIPT_ES: true
  64. VALIDATE_RUBY: true