Skip to content

Commit 3e24ac4

Browse files
lbogdanshellscape
authored andcommitted
Fix quote style to satisfy ESLint (#1098)
* Fixed quotes. * Removed "eslint-enable/disable quotes" directives and fixed some more quotes.
1 parent bc22935 commit 3e24ac4

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/Server.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,13 @@ function Server(compiler, options) {
103103

104104
app.get('/webpack-dev-server', (req, res) => {
105105
res.setHeader('Content-Type', 'text/html');
106-
/* eslint-disable quotes */
107106
res.write('<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body>');
108-
const outputPath = this.middleware.getFilenameFromUrl(options.publicPath || "/");
107+
const outputPath = this.middleware.getFilenameFromUrl(options.publicPath || '/');
109108
const filesystem = this.middleware.fileSystem;
110109

111110
function writeDirectory(baseUrl, basePath) {
112111
const content = filesystem.readdirSync(basePath);
113-
res.write("<ul>");
112+
res.write('<ul>');
114113
content.forEach((item) => {
115114
const p = `${basePath}/${item}`;
116115
if (filesystem.statSync(p).isFile()) {
@@ -139,9 +138,8 @@ function Server(compiler, options) {
139138
res.write('</li>');
140139
}
141140
});
142-
res.write("</ul>");
141+
res.write('</ul>');
143142
}
144-
/* eslint-enable quotes */
145143
writeDirectory(options.publicPath || '/', outputPath);
146144
res.end('</body></html>');
147145
});
@@ -624,13 +622,11 @@ Server.prototype.serveMagicHtml = function (req, res, next) {
624622
try {
625623
if (!this.middleware.fileSystem.statSync(this.middleware.getFilenameFromUrl(`${_path}.js`)).isFile()) { return next(); }
626624
// Serve a page that executes the javascript
627-
/* eslint-disable quotes */
628625
res.write('<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body><script type="text/javascript" charset="utf-8" src="');
629626
res.write(_path);
630627
res.write('.js');
631-
res.write(req._parsedUrl.search || "");
628+
res.write(req._parsedUrl.search || '');
632629
res.end('"></script></body></html>');
633-
/* eslint-enable quotes */
634630
} catch (e) {
635631
return next();
636632
}

0 commit comments

Comments
 (0)