Files
Josh Goldberg ✨andGitHub 36a353c719 chore: formatted files with Prettier via trunk fmt (#19355)
* chore: remove formatting-related lint rules internally

* chore: formatted files with Prettier via trunk fmt

* rm .prettierrc.json

* chore: correct comment directives and formatting

* Apply introduced fmt changes post-merge

* Also disable MD010 and MD030 in preparation for 19355

* Also disable MD013 in preparation for 19355

* Updated tools/update-rule-type-headers.js to print tabs

* Fix introduced issues from the main merge

* Manually format conf/*.json

* Switch conf/*.json files back to two spaces, per prettier config

* chore: empty commit to hopefully unblock GitHub
2025-03-19 11:18:08 -04:00

30 lines
821 B
JavaScript

/**
* @fileoverview Example data to lint using ESLint. This file contains a variety of errors.
* @author Ben Perlmutter
*/
// Unused variable 'y' (no-unused-vars from configured rules)
const y = 20;
function add(a, b) {
// Unexpected console statement (no-console from configured rules)
console.log("Adding two numbers");
return a + b;
}
// 'result' is assigned a value but never used (no-unused-vars from configured rules)
const result = add(x, 5);
if (x > 5) {
// Unexpected console statement (no-console from configured rules)
console.log("x is greater than 5");
} else {
// Unexpected console statement (no-console from configured rules)
console.log("x is not greater than 5");
}
// 'subtract' is defined but never used (no-unused-vars from configured rules)
function subtract(a, b) {
return a - b;
}