Each directory listed below contains config files specific to one programming language and README file with detailed instructions:
- html&css
- html&css + javascript (for projects that require you to use both JavaScript and HTML & CSS)
- ruby
- ror
- javascript
- react&redux
Follow those instructions in order to set up linters or validators in your repo.
In order to get to know more about linters and GitHub Actions read the recap below.
A linter is a tool that analyzes your source code to flag programming errors, bugs, stylistic errors, and suspicious constructs(source: Wikipedia).
There are a few reasons for using linters:
- Catching syntax errors is more efficient. There is no need to debug simple mistakes like typos - the linter does it for you.
- The entire codebase looks like written by one person.
- Programmers can focus on solving problems, instead of cleaning up the code.
You can find linters for most of the programming languages, e.g. Rubocop for Ruby or ESLint for JavaScript.
Also, there are many ways you can integrate a linter in your workflow:
- text editor plugin
- GitHub Actions
- GitHub apps
Github Actions is a CI/CD service offered by GitHub. It allows you to automate your workflow by letting GitHub take care of a number of tasks which can be triggered by different of events on the platform.
🐛 What to do if GitHub Actions does not work? Check Troubleshooting below.
You can automate tasks by creating workflows in your GitHub repository. GitHub will look for YAML files inside of the .github/workflows
directory.
Depending on the configuration of your GitHub credentials, you may have an error like this when trying to create a new GitHub Actions workflow:
! [remote rejected] master -> master (refusing to allow an OAuth App to create or update workflow `.github/workflows/file.yml` without `workflow` scope)
The problem is that you may be using a credentials app like Credential Manager in Windows or OSX Keychain. In that case, you should setup a personal access token and configure it in your credentials app. Make sure to check the workflow
permissions when you setup your personal access token.
If you had a different problem related to a specific tool, please check detailed instructions for each linter:
Do not make any changes in config files - they represent style guidelines that you share with your team - which is a group of all Microverse students.
TSEs will validate that you are using the same configuration files provided here. You can check if your linter configuration is correct using the check-linters-config
script.
This is the GitHub Actions configuration. If you are looking for the Stickler configuration, you can find it here.
Everybody is welcome to suggest changes in linters config files.
In order to do it, fork this repository, create a new branch and open a Pull Request from your branch. A detailed description of this process: A Step by Step Guide to Making Your First GitHub Contribution by Roshan Jossey