Learn ESLint, Prettier, and linting vocabulary: rules, configs, auto-fix, and integrating linting into your workflow.
0 / 45 completed
1 / 45
An ESLint 'rule' set to 'error' will:
ESLint severity levels: 'off' (disabled), 'warn' (warning, non-blocking), 'error' (error, blocks CI). Rules set to 'error' fail the lint check.
2 / 45
Prettier is primarily a:
Prettier formats code automatically — it does not check logic but enforces consistent style (indentation, quotes, line length) across the codebase.
3 / 45
What does 'eslint --fix' do?
The --fix flag tells ESLint to automatically apply safe fixes for violations that have a defined fix — such as removing unused variables or adding missing semicolons.
4 / 45
An '.eslintignore' file is used to:
.eslintignore lists paths (like node_modules, dist, build) that should be excluded from linting — similar to .gitignore for git.
5 / 45
The phrase 'enforce consistent code style' means:
Enforcing consistent code style through linters and formatters means the codebase looks uniform — indentation, quotes, spacing are the same everywhere, automated by tooling.
6 / 45
David: "Hey team, I've just pushed a new branch with the user authentication module. Looks good to me!"
Sarah (after reviewing): "David, I'm flagging this PR for a quick review. Could you please run eslint . and prettier --check . before merging? I'm seeing some inconsistent spacing and missing semicolons that we should address."
This scenario highlights how linters and formatters are integrated into the code review process. Sarah's message isn't asking David to manually fix everything; instead, she's leveraging automated tools (ESLint and Prettier) to identify inconsistencies that need attention before merging. The use of these tools helps enforce consistent code style and prevent introducing errors during integration.
7 / 45
Mark in the PR description: "Just finished implementing the new API endpoint. It handles user registration and returns a JSON payload with the user ID and success status." Liam replies in Slack: "Sounds good, but have you run any linters or formatters? I'm seeing some inconsistencies in your formatting that might cause issues later."
This scenario highlights the importance of proactively integrating linters and formatters into a development workflow. While Mark's code may technically function, failing to run tools like ESLint and Prettier demonstrates a lack of attention to established style guidelines and potential future maintainability issues. The response underscores that these tools aren't just about immediate fixes; they're about fostering consistent code across the project, reducing errors, and improving collaboration within the team.
8 / 45
Alice: 'I've just submitted this PR for the payment processing module. I've added some unit tests and it passes locally.'
Bob (after reviewing): 'Thanks, Alice! Before we merge, could you run eslint . and prettier --check .? I noticed a few places where the code deviates from our project's style guide – specifically around variable naming conventions and inconsistent use of camelCase. It's crucial to maintain these standards for readability and collaboration.'
This scenario highlights the proactive role linters and formatters play in code reviews. While tools like ESLint and Prettier can *suggest* fixes (option A is a common misunderstanding), their primary function isn't refactoring; they analyze for stylistic issues and inconsistencies – specifically focusing on things like naming conventions and formatting rules to maintain a consistent codebase. Option B is incorrect because linters don't inherently detect bugs, although inconsistencies can sometimes *indicate* potential problems. Option C accurately describes the core purpose of these tools—ensuring consistency—and option D misrepresents their function entirely.
9 / 45
During a code review, John says: "I've just updated the database schema. I'm confident it's correct and aligns with our current design." Maria responds in the PR description: "Thanks, John! Before merging, could you please run eslint . and prettier --check .? I'm seeing some potential issues with indentation and missing braces that need to be addressed. We're aiming for consistent code style across the project."
Maria is advocating for a standard practice – using linters and formatters to automatically enforce consistent code style. The goal here isn't about dictating John's specific coding choices (option 1), but rather ensuring everyone adheres to the established rules. Running these tools helps catch issues like indentation, missing braces, and other stylistic inconsistencies before they become larger problems during collaboration or when another developer modifies the code later on (options 3 & 4).
10 / 45
PR Description
Subject: Implement User Profile Update API
I've just deployed the updated user profile endpoint. It uses the GraphQL schema to update existing user data and returns a 200 OK status with the modified user object in JSON format. I've included thorough unit tests covering various scenarios, including successful updates, invalid input handling, and edge cases.
Sarah (lead developer) comments in Slack: "Hey! Before merging, could you please run eslint . && prettier --check .? I'm seeing some inconsistencies with the use of template literals and a lack of whitespace around operators that might introduce bugs. Let's ensure we're adhering to our project's formatting guidelines."
This question assesses understanding of a practical workflow. Running eslint . && prettier --check . is the standard process for ensuring code conforms to project-specific style guidelines before merging. The incorrect options highlight common misconceptions: that linters/formatters only address formatting (option 1), that they automatically fix *all* issues without review (option 3), and that a PR description should solely focus on functional testing (option 4). The correct answer accurately describes the purpose of these tools in this context.
11 / 45
David: "Hey team, I've just pushed a new branch with the user authentication module. Looks good to me!"
Sarah (after reviewing): "David, I'm flagging this PR for a quick review. Could you please run eslint . and prettier --check . before merging? I'm seeing some inconsistent spacing and missing semicolons that we should address."
This scenario highlights how linters and formatters are integrated into the code review process. Sarah's message isn't asking David to manually fix everything; instead, she's leveraging automated tools (ESLint and Prettier) to identify inconsistencies that need attention before merging. The use of these tools helps enforce consistent code style and prevent introducing errors during integration.
12 / 45
Mark in the PR description: "Just finished implementing the new API endpoint. It handles user registration and returns a JSON payload with the user ID and success status." Liam replies in Slack: "Sounds good, but have you run any linters or formatters? I'm seeing some inconsistencies in your formatting that might cause issues later."
This scenario highlights the importance of proactively integrating linters and formatters into a development workflow. While Mark's code may technically function, failing to run tools like ESLint and Prettier demonstrates a lack of attention to established style guidelines and potential future maintainability issues. The response underscores that these tools aren't just about immediate fixes; they're about fostering consistent code across the project, reducing errors, and improving collaboration within the team.
13 / 45
Alice: 'I've just submitted this PR for the payment processing module. I've added some unit tests and it passes locally.'
Bob (after reviewing): 'Thanks, Alice! Before we merge, could you run eslint . and prettier --check .? I noticed a few places where the code deviates from our project's style guide – specifically around variable naming conventions and inconsistent use of camelCase. It's crucial to maintain these standards for readability and collaboration.'
This scenario highlights the proactive role linters and formatters play in code reviews. While tools like ESLint and Prettier can *suggest* fixes (option A is a common misunderstanding), their primary function isn't refactoring; they analyze for stylistic issues and inconsistencies – specifically focusing on things like naming conventions and formatting rules to maintain a consistent codebase. Option B is incorrect because linters don't inherently detect bugs, although inconsistencies can sometimes *indicate* potential problems. Option C accurately describes the core purpose of these tools—ensuring consistency—and option D misrepresents their function entirely.
14 / 45
During a code review, John says: "I've just updated the database schema. I'm confident it's correct and aligns with our current design." Maria responds in the PR description: "Thanks, John! Before merging, could you please run eslint . and prettier --check .? I'm seeing some potential issues with indentation and missing braces that need to be addressed. We're aiming for consistent code style across the project."
Maria is advocating for a standard practice – using linters and formatters to automatically enforce consistent code style. The goal here isn't about dictating John's specific coding choices (option 1), but rather ensuring everyone adheres to the established rules. Running these tools helps catch issues like indentation, missing braces, and other stylistic inconsistencies before they become larger problems during collaboration or when another developer modifies the code later on (options 3 & 4).
15 / 45
PR Description
Subject: Implement User Profile Update API
I've just deployed the updated user profile endpoint. It uses the GraphQL schema to update existing user data and returns a 200 OK status with the modified user object in JSON format. I've included thorough unit tests covering various scenarios, including successful updates, invalid input handling, and edge cases.
Sarah (lead developer) comments in Slack: "Hey! Before merging, could you please run eslint . && prettier --check .? I'm seeing some inconsistencies with the use of template literals and a lack of whitespace around operators that might introduce bugs. Let's ensure we're adhering to our project's formatting guidelines."
This question assesses understanding of a practical workflow. Running eslint . && prettier --check . is the standard process for ensuring code conforms to project-specific style guidelines before merging. The incorrect options highlight common misconceptions: that linters/formatters only address formatting (option 1), that they automatically fix *all* issues without review (option 3), and that a PR description should solely focus on functional testing (option 4). The correct answer accurately describes the purpose of these tools in this context.
16 / 45
David: "Hey team, I've just pushed a new branch with the user authentication module. Looks good to me!"
Sarah (after reviewing): "David, I'm flagging this PR for a quick review. Could you please run eslint . and prettier --check . before merging? I'm seeing some inconsistent spacing and missing semicolons that we should address."
This scenario highlights how linters and formatters are integrated into the code review process. Sarah's message isn't asking David to manually fix everything; instead, she's leveraging automated tools (ESLint and Prettier) to identify inconsistencies that need attention before merging. The use of these tools helps enforce consistent code style and prevent introducing errors during integration.
17 / 45
Mark in the PR description: "Just finished implementing the new API endpoint. It handles user registration and returns a JSON payload with the user ID and success status." Liam replies in Slack: "Sounds good, but have you run any linters or formatters? I'm seeing some inconsistencies in your formatting that might cause issues later."
This scenario highlights the importance of proactively integrating linters and formatters into a development workflow. While Mark's code may technically function, failing to run tools like ESLint and Prettier demonstrates a lack of attention to established style guidelines and potential future maintainability issues. The response underscores that these tools aren't just about immediate fixes; they're about fostering consistent code across the project, reducing errors, and improving collaboration within the team.
18 / 45
Alice: 'I've just submitted this PR for the payment processing module. I've added some unit tests and it passes locally.'
Bob (after reviewing): 'Thanks, Alice! Before we merge, could you run eslint . and prettier --check .? I noticed a few places where the code deviates from our project's style guide – specifically around variable naming conventions and inconsistent use of camelCase. It's crucial to maintain these standards for readability and collaboration.'
This scenario highlights the proactive role linters and formatters play in code reviews. While tools like ESLint and Prettier can *suggest* fixes (option A is a common misunderstanding), their primary function isn't refactoring; they analyze for stylistic issues and inconsistencies – specifically focusing on things like naming conventions and formatting rules to maintain a consistent codebase. Option B is incorrect because linters don't inherently detect bugs, although inconsistencies can sometimes *indicate* potential problems. Option C accurately describes the core purpose of these tools—ensuring consistency—and option D misrepresents their function entirely.
19 / 45
During a code review, John says: "I've just updated the database schema. I'm confident it's correct and aligns with our current design." Maria responds in the PR description: "Thanks, John! Before merging, could you please run eslint . and prettier --check .? I'm seeing some potential issues with indentation and missing braces that need to be addressed. We're aiming for consistent code style across the project."
Maria is advocating for a standard practice – using linters and formatters to automatically enforce consistent code style. The goal here isn't about dictating John's specific coding choices (option 1), but rather ensuring everyone adheres to the established rules. Running these tools helps catch issues like indentation, missing braces, and other stylistic inconsistencies before they become larger problems during collaboration or when another developer modifies the code later on (options 3 & 4).
20 / 45
PR Description
Subject: Implement User Profile Update API
I've just deployed the updated user profile endpoint. It uses the GraphQL schema to update existing user data and returns a 200 OK status with the modified user object in JSON format. I've included thorough unit tests covering various scenarios, including successful updates, invalid input handling, and edge cases.
Sarah (lead developer) comments in Slack: "Hey! Before merging, could you please run eslint . && prettier --check .? I'm seeing some inconsistencies with the use of template literals and a lack of whitespace around operators that might introduce bugs. Let's ensure we're adhering to our project's formatting guidelines."
This question assesses understanding of a practical workflow. Running eslint . && prettier --check . is the standard process for ensuring code conforms to project-specific style guidelines before merging. The incorrect options highlight common misconceptions: that linters/formatters only address formatting (option 1), that they automatically fix *all* issues without review (option 3), and that a PR description should solely focus on functional testing (option 4). The correct answer accurately describes the purpose of these tools in this context.
21 / 45
David: "Hey team, I've just pushed a new branch with the user authentication module. Looks good to me!"
Sarah (after reviewing): "David, I'm flagging this PR for a quick review. Could you please run eslint . and prettier --check . before merging? I'm seeing some inconsistent spacing and missing semicolons that we should address."
This scenario highlights how linters and formatters are integrated into the code review process. Sarah's message isn't asking David to manually fix everything; instead, she's leveraging automated tools (ESLint and Prettier) to identify inconsistencies that need attention before merging. The use of these tools helps enforce consistent code style and prevent introducing errors during integration.
22 / 45
Mark in the PR description: "Just finished implementing the new API endpoint. It handles user registration and returns a JSON payload with the user ID and success status." Liam replies in Slack: "Sounds good, but have you run any linters or formatters? I'm seeing some inconsistencies in your formatting that might cause issues later."
This scenario highlights the importance of proactively integrating linters and formatters into a development workflow. While Mark's code may technically function, failing to run tools like ESLint and Prettier demonstrates a lack of attention to established style guidelines and potential future maintainability issues. The response underscores that these tools aren't just about immediate fixes; they're about fostering consistent code across the project, reducing errors, and improving collaboration within the team.
23 / 45
Alice: 'I've just submitted this PR for the payment processing module. I've added some unit tests and it passes locally.'
Bob (after reviewing): 'Thanks, Alice! Before we merge, could you run eslint . and prettier --check .? I noticed a few places where the code deviates from our project's style guide – specifically around variable naming conventions and inconsistent use of camelCase. It's crucial to maintain these standards for readability and collaboration.'
This scenario highlights the proactive role linters and formatters play in code reviews. While tools like ESLint and Prettier can *suggest* fixes (option A is a common misunderstanding), their primary function isn't refactoring; they analyze for stylistic issues and inconsistencies – specifically focusing on things like naming conventions and formatting rules to maintain a consistent codebase. Option B is incorrect because linters don't inherently detect bugs, although inconsistencies can sometimes *indicate* potential problems. Option C accurately describes the core purpose of these tools—ensuring consistency—and option D misrepresents their function entirely.
24 / 45
During a code review, John says: "I've just updated the database schema. I'm confident it's correct and aligns with our current design." Maria responds in the PR description: "Thanks, John! Before merging, could you please run eslint . and prettier --check .? I'm seeing some potential issues with indentation and missing braces that need to be addressed. We're aiming for consistent code style across the project."
Maria is advocating for a standard practice – using linters and formatters to automatically enforce consistent code style. The goal here isn't about dictating John's specific coding choices (option 1), but rather ensuring everyone adheres to the established rules. Running these tools helps catch issues like indentation, missing braces, and other stylistic inconsistencies before they become larger problems during collaboration or when another developer modifies the code later on (options 3 & 4).
25 / 45
PR Description
Subject: Implement User Profile Update API
I've just deployed the updated user profile endpoint. It uses the GraphQL schema to update existing user data and returns a 200 OK status with the modified user object in JSON format. I've included thorough unit tests covering various scenarios, including successful updates, invalid input handling, and edge cases.
Sarah (lead developer) comments in Slack: "Hey! Before merging, could you please run eslint . && prettier --check .? I'm seeing some inconsistencies with the use of template literals and a lack of whitespace around operators that might introduce bugs. Let's ensure we're adhering to our project's formatting guidelines."
This question assesses understanding of a practical workflow. Running eslint . && prettier --check . is the standard process for ensuring code conforms to project-specific style guidelines before merging. The incorrect options highlight common misconceptions: that linters/formatters only address formatting (option 1), that they automatically fix *all* issues without review (option 3), and that a PR description should solely focus on functional testing (option 4). The correct answer accurately describes the purpose of these tools in this context.
26 / 45
David: "Hey team, I've just pushed a new branch with the user authentication module. Looks good to me!"
Sarah (after reviewing): "David, I'm flagging this PR for a quick review. Could you please run eslint . and prettier --check . before merging? I'm seeing some inconsistent spacing and missing semicolons that we should address."
This scenario highlights how linters and formatters are integrated into the code review process. Sarah's message isn't asking David to manually fix everything; instead, she's leveraging automated tools (ESLint and Prettier) to identify inconsistencies that need attention before merging. The use of these tools helps enforce consistent code style and prevent introducing errors during integration.
27 / 45
Mark in the PR description: "Just finished implementing the new API endpoint. It handles user registration and returns a JSON payload with the user ID and success status." Liam replies in Slack: "Sounds good, but have you run any linters or formatters? I'm seeing some inconsistencies in your formatting that might cause issues later."
This scenario highlights the importance of proactively integrating linters and formatters into a development workflow. While Mark's code may technically function, failing to run tools like ESLint and Prettier demonstrates a lack of attention to established style guidelines and potential future maintainability issues. The response underscores that these tools aren't just about immediate fixes; they're about fostering consistent code across the project, reducing errors, and improving collaboration within the team.
28 / 45
Alice: 'I've just submitted this PR for the payment processing module. I've added some unit tests and it passes locally.'
Bob (after reviewing): 'Thanks, Alice! Before we merge, could you run eslint . and prettier --check .? I noticed a few places where the code deviates from our project's style guide – specifically around variable naming conventions and inconsistent use of camelCase. It's crucial to maintain these standards for readability and collaboration.'
This scenario highlights the proactive role linters and formatters play in code reviews. While tools like ESLint and Prettier can *suggest* fixes (option A is a common misunderstanding), their primary function isn't refactoring; they analyze for stylistic issues and inconsistencies – specifically focusing on things like naming conventions and formatting rules to maintain a consistent codebase. Option B is incorrect because linters don't inherently detect bugs, although inconsistencies can sometimes *indicate* potential problems. Option C accurately describes the core purpose of these tools—ensuring consistency—and option D misrepresents their function entirely.
29 / 45
During a code review, John says: "I've just updated the database schema. I'm confident it's correct and aligns with our current design." Maria responds in the PR description: "Thanks, John! Before merging, could you please run eslint . and prettier --check .? I'm seeing some potential issues with indentation and missing braces that need to be addressed. We're aiming for consistent code style across the project."
Maria is advocating for a standard practice – using linters and formatters to automatically enforce consistent code style. The goal here isn't about dictating John's specific coding choices (option 1), but rather ensuring everyone adheres to the established rules. Running these tools helps catch issues like indentation, missing braces, and other stylistic inconsistencies before they become larger problems during collaboration or when another developer modifies the code later on (options 3 & 4).
30 / 45
PR Description
Subject: Implement User Profile Update API
I've just deployed the updated user profile endpoint. It uses the GraphQL schema to update existing user data and returns a 200 OK status with the modified user object in JSON format. I've included thorough unit tests covering various scenarios, including successful updates, invalid input handling, and edge cases.
Sarah (lead developer) comments in Slack: "Hey! Before merging, could you please run eslint . && prettier --check .? I'm seeing some inconsistencies with the use of template literals and a lack of whitespace around operators that might introduce bugs. Let's ensure we're adhering to our project's formatting guidelines."
This question assesses understanding of a practical workflow. Running eslint . && prettier --check . is the standard process for ensuring code conforms to project-specific style guidelines before merging. The incorrect options highlight common misconceptions: that linters/formatters only address formatting (option 1), that they automatically fix *all* issues without review (option 3), and that a PR description should solely focus on functional testing (option 4). The correct answer accurately describes the purpose of these tools in this context.
31 / 45
David: "Hey team, I've just pushed a new branch with the user authentication module. Looks good to me!"
Sarah (after reviewing): "David, I'm flagging this PR for a quick review. Could you please run eslint . and prettier --check . before merging? I'm seeing some inconsistent spacing and missing semicolons that we should address."
This scenario highlights how linters and formatters are integrated into the code review process. Sarah's message isn't asking David to manually fix everything; instead, she's leveraging automated tools (ESLint and Prettier) to identify inconsistencies that need attention before merging. The use of these tools helps enforce consistent code style and prevent introducing errors during integration.
32 / 45
Mark in the PR description: "Just finished implementing the new API endpoint. It handles user registration and returns a JSON payload with the user ID and success status." Liam replies in Slack: "Sounds good, but have you run any linters or formatters? I'm seeing some inconsistencies in your formatting that might cause issues later."
This scenario highlights the importance of proactively integrating linters and formatters into a development workflow. While Mark's code may technically function, failing to run tools like ESLint and Prettier demonstrates a lack of attention to established style guidelines and potential future maintainability issues. The response underscores that these tools aren't just about immediate fixes; they're about fostering consistent code across the project, reducing errors, and improving collaboration within the team.
33 / 45
Alice: 'I've just submitted this PR for the payment processing module. I've added some unit tests and it passes locally.'
Bob (after reviewing): 'Thanks, Alice! Before we merge, could you run eslint . and prettier --check .? I noticed a few places where the code deviates from our project's style guide – specifically around variable naming conventions and inconsistent use of camelCase. It's crucial to maintain these standards for readability and collaboration.'
This scenario highlights the proactive role linters and formatters play in code reviews. While tools like ESLint and Prettier can *suggest* fixes (option A is a common misunderstanding), their primary function isn't refactoring; they analyze for stylistic issues and inconsistencies – specifically focusing on things like naming conventions and formatting rules to maintain a consistent codebase. Option B is incorrect because linters don't inherently detect bugs, although inconsistencies can sometimes *indicate* potential problems. Option C accurately describes the core purpose of these tools—ensuring consistency—and option D misrepresents their function entirely.
34 / 45
During a code review, John says: "I've just updated the database schema. I'm confident it's correct and aligns with our current design." Maria responds in the PR description: "Thanks, John! Before merging, could you please run eslint . and prettier --check .? I'm seeing some potential issues with indentation and missing braces that need to be addressed. We're aiming for consistent code style across the project."
Maria is advocating for a standard practice – using linters and formatters to automatically enforce consistent code style. The goal here isn't about dictating John's specific coding choices (option 1), but rather ensuring everyone adheres to the established rules. Running these tools helps catch issues like indentation, missing braces, and other stylistic inconsistencies before they become larger problems during collaboration or when another developer modifies the code later on (options 3 & 4).
35 / 45
PR Description
Subject: Implement User Profile Update API
I've just deployed the updated user profile endpoint. It uses the GraphQL schema to update existing user data and returns a 200 OK status with the modified user object in JSON format. I've included thorough unit tests covering various scenarios, including successful updates, invalid input handling, and edge cases.
Sarah (lead developer) comments in Slack: "Hey! Before merging, could you please run eslint . && prettier --check .? I'm seeing some inconsistencies with the use of template literals and a lack of whitespace around operators that might introduce bugs. Let's ensure we're adhering to our project's formatting guidelines."
This question assesses understanding of a practical workflow. Running eslint . && prettier --check . is the standard process for ensuring code conforms to project-specific style guidelines before merging. The incorrect options highlight common misconceptions: that linters/formatters only address formatting (option 1), that they automatically fix *all* issues without review (option 3), and that a PR description should solely focus on functional testing (option 4). The correct answer accurately describes the purpose of these tools in this context.
36 / 45
David: "Hey team, I've just pushed a new branch with the user authentication module. Looks good to me!"
Sarah (after reviewing): "David, I'm flagging this PR for a quick review. Could you please run eslint . and prettier --check . before merging? I'm seeing some inconsistent spacing and missing semicolons that we should address."
This scenario highlights how linters and formatters are integrated into the code review process. Sarah's message isn't asking David to manually fix everything; instead, she's leveraging automated tools (ESLint and Prettier) to identify inconsistencies that need attention before merging. The use of these tools helps enforce consistent code style and prevent introducing errors during integration.
37 / 45
Mark in the PR description: "Just finished implementing the new API endpoint. It handles user registration and returns a JSON payload with the user ID and success status." Liam replies in Slack: "Sounds good, but have you run any linters or formatters? I'm seeing some inconsistencies in your formatting that might cause issues later."
This scenario highlights the importance of proactively integrating linters and formatters into a development workflow. While Mark's code may technically function, failing to run tools like ESLint and Prettier demonstrates a lack of attention to established style guidelines and potential future maintainability issues. The response underscores that these tools aren't just about immediate fixes; they're about fostering consistent code across the project, reducing errors, and improving collaboration within the team.
38 / 45
Alice: 'I've just submitted this PR for the payment processing module. I've added some unit tests and it passes locally.'
Bob (after reviewing): 'Thanks, Alice! Before we merge, could you run eslint . and prettier --check .? I noticed a few places where the code deviates from our project's style guide – specifically around variable naming conventions and inconsistent use of camelCase. It's crucial to maintain these standards for readability and collaboration.'
This scenario highlights the proactive role linters and formatters play in code reviews. While tools like ESLint and Prettier can *suggest* fixes (option A is a common misunderstanding), their primary function isn't refactoring; they analyze for stylistic issues and inconsistencies – specifically focusing on things like naming conventions and formatting rules to maintain a consistent codebase. Option B is incorrect because linters don't inherently detect bugs, although inconsistencies can sometimes *indicate* potential problems. Option C accurately describes the core purpose of these tools—ensuring consistency—and option D misrepresents their function entirely.
39 / 45
During a code review, John says: "I've just updated the database schema. I'm confident it's correct and aligns with our current design." Maria responds in the PR description: "Thanks, John! Before merging, could you please run eslint . and prettier --check .? I'm seeing some potential issues with indentation and missing braces that need to be addressed. We're aiming for consistent code style across the project."
Maria is advocating for a standard practice – using linters and formatters to automatically enforce consistent code style. The goal here isn't about dictating John's specific coding choices (option 1), but rather ensuring everyone adheres to the established rules. Running these tools helps catch issues like indentation, missing braces, and other stylistic inconsistencies before they become larger problems during collaboration or when another developer modifies the code later on (options 3 & 4).
40 / 45
PR Description
Subject: Implement User Profile Update API
I've just deployed the updated user profile endpoint. It uses the GraphQL schema to update existing user data and returns a 200 OK status with the modified user object in JSON format. I've included thorough unit tests covering various scenarios, including successful updates, invalid input handling, and edge cases.
Sarah (lead developer) comments in Slack: "Hey! Before merging, could you please run eslint . && prettier --check .? I'm seeing some inconsistencies with the use of template literals and a lack of whitespace around operators that might introduce bugs. Let's ensure we're adhering to our project's formatting guidelines."
This question assesses understanding of a practical workflow. Running eslint . && prettier --check . is the standard process for ensuring code conforms to project-specific style guidelines before merging. The incorrect options highlight common misconceptions: that linters/formatters only address formatting (option 1), that they automatically fix *all* issues without review (option 3), and that a PR description should solely focus on functional testing (option 4). The correct answer accurately describes the purpose of these tools in this context.
41 / 45
David: "Hey team, I've just pushed a new branch with the user authentication module. Looks good to me!"
Sarah (after reviewing): "David, I'm flagging this PR for a quick review. Could you please run eslint . and prettier --check . before merging? I'm seeing some inconsistent spacing and missing semicolons that we should address."
This scenario highlights how linters and formatters are integrated into the code review process. Sarah's message isn't asking David to manually fix everything; instead, she's leveraging automated tools (ESLint and Prettier) to identify inconsistencies that need attention before merging. The use of these tools helps enforce consistent code style and prevent introducing errors during integration.
42 / 45
Mark in the PR description: "Just finished implementing the new API endpoint. It handles user registration and returns a JSON payload with the user ID and success status." Liam replies in Slack: "Sounds good, but have you run any linters or formatters? I'm seeing some inconsistencies in your formatting that might cause issues later."
This scenario highlights the importance of proactively integrating linters and formatters into a development workflow. While Mark's code may technically function, failing to run tools like ESLint and Prettier demonstrates a lack of attention to established style guidelines and potential future maintainability issues. The response underscores that these tools aren't just about immediate fixes; they're about fostering consistent code across the project, reducing errors, and improving collaboration within the team.
43 / 45
Alice: 'I've just submitted this PR for the payment processing module. I've added some unit tests and it passes locally.'
Bob (after reviewing): 'Thanks, Alice! Before we merge, could you run eslint . and prettier --check .? I noticed a few places where the code deviates from our project's style guide – specifically around variable naming conventions and inconsistent use of camelCase. It's crucial to maintain these standards for readability and collaboration.'
This scenario highlights the proactive role linters and formatters play in code reviews. While tools like ESLint and Prettier can *suggest* fixes (option A is a common misunderstanding), their primary function isn't refactoring; they analyze for stylistic issues and inconsistencies – specifically focusing on things like naming conventions and formatting rules to maintain a consistent codebase. Option B is incorrect because linters don't inherently detect bugs, although inconsistencies can sometimes *indicate* potential problems. Option C accurately describes the core purpose of these tools—ensuring consistency—and option D misrepresents their function entirely.
44 / 45
During a code review, John says: "I've just updated the database schema. I'm confident it's correct and aligns with our current design." Maria responds in the PR description: "Thanks, John! Before merging, could you please run eslint . and prettier --check .? I'm seeing some potential issues with indentation and missing braces that need to be addressed. We're aiming for consistent code style across the project."
Maria is advocating for a standard practice – using linters and formatters to automatically enforce consistent code style. The goal here isn't about dictating John's specific coding choices (option 1), but rather ensuring everyone adheres to the established rules. Running these tools helps catch issues like indentation, missing braces, and other stylistic inconsistencies before they become larger problems during collaboration or when another developer modifies the code later on (options 3 & 4).
45 / 45
PR Description
Subject: Implement User Profile Update API
I've just deployed the updated user profile endpoint. It uses the GraphQL schema to update existing user data and returns a 200 OK status with the modified user object in JSON format. I've included thorough unit tests covering various scenarios, including successful updates, invalid input handling, and edge cases.
Sarah (lead developer) comments in Slack: "Hey! Before merging, could you please run eslint . && prettier --check .? I'm seeing some inconsistencies with the use of template literals and a lack of whitespace around operators that might introduce bugs. Let's ensure we're adhering to our project's formatting guidelines."
This question assesses understanding of a practical workflow. Running eslint . && prettier --check . is the standard process for ensuring code conforms to project-specific style guidelines before merging. The incorrect options highlight common misconceptions: that linters/formatters only address formatting (option 1), that they automatically fix *all* issues without review (option 3), and that a PR description should solely focus on functional testing (option 4). The correct answer accurately describes the purpose of these tools in this context.
What does the "Linter & Formatter Vocabulary" exercise cover?
Learn ESLint, Prettier, and linting vocabulary: rules, configs, auto-fix, and integrating linting into your workflow.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
How many questions are in "Linter & Formatter Vocabulary"?
This exercise has 45 questions. Each one gives instant feedback with an explanation, so you can see exactly why an answer is right or wrong.
Do I need to create an account to save my progress?
No account is required. The progress bar and score are tracked in your browser for the current session -- the exercise is designed to be a quick, repeatable drill rather than something you resume later.
What happens if I get an answer wrong?
You'll see the correct answer highlighted immediately, along with a short explanation of why it's correct. Wrong answers aren't penalized beyond your score, and you can keep going through every question.
How is this exercise different from reading an article?
Articles explain vocabulary and concepts through prose, while exercises like this one are interactive drills -- multiple-choice questions -- that test and reinforce your recall of specific terms and phrasing.
Can I retry this exercise?
Yes -- use the "Try again" button on the results screen to reset your score and go through all the questions again from the start.
Where can I find more Developer Toolchain exercises?
Browse the full Developer Toolchain hub for related drills, or check the site-wide exercises index for other IT English topics.
Is this exercise suitable for beginners?
This exercise assumes basic familiarity with IT terminology. If a term feels unfamiliar, check the site Glossary for a plain-English definition before attempting the questions.
How often is new content like this published?
New exercises are added regularly across all categories, alongside new vocabulary sets and articles. Check back on the exercises hub to see what's new.