Skip to content

Latest commit

 

History

History
67 lines (39 loc) · 3.2 KB

Assignment-2-EsLint.md

File metadata and controls

67 lines (39 loc) · 3.2 KB

Class - Breakout - Code Quality

Description

Improve your code quality by updating your code.

Try to solve the stretch challenges.

Why this assignment?

Writing quality code up to professional standards is important. It's hard to know at professional standards are without a guide. The linter will help you write code that meets industry best practices.

Trying the stretch challenges is an opportunity to stretch your abilities by solving problems.

Project requirements

Create a new branch for your Break Out Repo. You'll place the work for this assignment there.

Try all of the challenges below.

Challenges

Challenge 1 Install the Linter. Follow the instructions from the class.

Create an npm project in your project directory and install eslint.

You'll need to install the linter plugin/extension for your code editor also.

You'll also need to use a style guide. For this assignment, you should be using the Airbnb JavaScript style guide.

Challenge 2 Solve the errors the linter identifies in your code. The linter will identify the errors with a red underline and provide some hints as to what the problems are.

With each change ask yourself why the style guide is asking for that change. Discuss this with other students, TA, or instructor.

This process should cover the following areas:

  • const, let, and var
  • arrow functions
  • template string literals

Pay close attention to these. They are effected by hoisting. A function or var declare lower in code may need to be declared earlier to work properly.

Deliverable

Deliverable

Submit your work on GradeScope.

Assessing the assignment

Use this rubric to measure the success of your work against the expectations of the assignment. You should be striving for an average score of 1 or greater.

Aspect Does not meet (0) Meets (1) Exceeds (2)
Linter Linter and or style guide not installed Linter and style guide installed Style guide customized or adjusted for your preferences
Completion Linter errors not addressed Linter errors addressed Code is well-formatted and includes comments
Work Ethic < 3 commits. Commits show consistent work commits show full 3 hours of work

Assessing your knowledge

Use this rubric to assess how your understanding of the learning objectives. You should be striving for an average score of 1 or greater

Expectations Does not meet (0) Meets (1) Exceeds (2)
const, let, and var Can not describe the difference between const, let, and var Can describe the difference between const, let, and var Can provide use case examples for const, let, and var
Arrow functions Could not write an arrow function without reference Can write arrow functions without a reference Can write arrow functions in various syntaxes
Linting and style Can't explain why using a linter with a style guide is a best practice Can explain why using the linter with a style guide is best practice Can contrast situations where the linter might not be useful against cases where it would be useful