Skip to content

Commit

Permalink
Merge pull request #644 from w3c/dependabot/npm_and_yarn/eslint-9.0.0
Browse files Browse the repository at this point in the history
build(deps-dev): bump eslint from 8.26.0 to 9.0.0
  • Loading branch information
deniak authored Apr 18, 2024
2 parents fc4c7ba + fef5dea commit cd5332e
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 43 deletions.
34 changes: 0 additions & 34 deletions .eslintrc.json

This file was deleted.

36 changes: 36 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[
{
"extends": ["airbnb-base", "prettier"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error",
"func-names": "off",
"vars-on-top": "off",
"consistent-return": "off"
},
"overrides": [
{
"files": ["index.html"],
"plugins": [
"html"
]
},
{
"files": ["server.js", "generators/*.js", "tools/**/*.js"],
"plugins": ["node"],
"extends": ["plugin:node/recommended"]
},
{
"files": ["test/*.js"],
"env": {
"mocha": true
},
"rules": {
"node/no-unpublished-require": "off"
},
"plugins": ["node"],
"extends": "plugin:node/recommended"
}
]
}
]
3 changes: 1 addition & 2 deletions generators/respec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ class SpecGeneratorError extends Error {
}
}

// eslint-disable-next-line import/prefer-default-export
export async function generate(url) {
try {
// eslint-disable-next-line no-console
console.log("Generating", url);
const { html, errors, warnings } = await toHTML(url, {
timeout: 30000,
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
"tar-stream": "3.1.1"
},
"devDependencies": {
"eslint": "8.26.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint": "9.0.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-html": "8.0.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "5.0.0-alpha.2",
"husky": "^9.0.6",
Expand Down
5 changes: 2 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import request from "request";
import { mkdirp } from "mkdirp";
import fetch from "node-fetch";

// eslint-disable-next-line import/extensions
import { generate } from "./generators/respec.js";

const genMap = {
Expand Down Expand Up @@ -67,7 +66,7 @@ async function extractTar(tarFile) {

extract.on("finish", () => {
if (!hasIndex) {
// eslint-disable-next-line prefer-promise-reject-errors
reject("No index.html file");
} else {
resolve(uploadPath);
Expand Down Expand Up @@ -103,7 +102,7 @@ app.get(
.status(500)
.json({ error: "Both 'type' and 'url' are required." });
}
// eslint-disable-next-line no-prototype-builtins
if (!genMap.hasOwnProperty(req.query.type)) {
return res
.status(500)
Expand Down
1 change: 0 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ASSERT from "assert";
import REQUEST from "request";
// eslint-disable-next-line import/named, import/extensions
import app, { server } from "../server.js";

const PORT = 3000;
Expand Down

0 comments on commit cd5332e

Please sign in to comment.