Skip to content

Commit b13b8f2

Browse files
committed
refactor;: use const for static value
1 parent fb72cb8 commit b13b8f2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: src/ESLint/MyLinter-example.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import noConsole from "./no-console";
55

66
let linter = new MyLinter();
77
linter.loadRule(noConsole);
8-
let code = `
8+
const code = `
99
function add(x, y){
1010
console.log(x, y);
1111
return x + y;

Diff for: test/connect/hello-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ describe("connect", function () {
7777
server && server.close();
7878
});
7979
it("should return request as response", function () {
80-
let requestBody = {
80+
const requestBody = Object.freeze({
8181
key: "value"
82-
};
82+
});
8383
return fetch("http://localhost:3000", {
8484
method: "POST",
8585
headers: {

0 commit comments

Comments
 (0)