Let’s customize our GitHub project. First, let’s go to our workflow yaml file and modify it. We will add a new env section:
Now let’s create the eslintrc.json file. In the file, we will have a rules section, and in there we will set the semi rule to be always include:
“semi”: [“error”, “always”] }
As mentioned, this is in the root directory:
Now, let’s push to GitHub our JS file, which does not contain the trailng semi-colons. Under Actions, we see our Build. As our code is invalid (it has trailing semi-colons), we see the expected error:
Expand the Super-Linter section:
We see it is picking up our Rules file:
And we see the error – Missing semicolon semi:
Now let’s update the file to include semi-colons and push it to GitHub:
The workflow takes a couple of minutes to run in my case, and then returns a green as a valid pass:
For more rules, check out the .eslintrc.json file on the ESLint GitHub repo at https://github.com/standard/eslint-config-standard/blob/master/eslintrc.json.
I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.
IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.
THANK YOU, AND LET’S KEEP LEARNING TOGETHER.