Skip to content

Commit

Permalink
fix: migrate eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneRifle committed Aug 7, 2024
1 parent 8e72d17 commit afc4701
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 19 deletions.
24 changes: 24 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends("eslint:recommended", "plugin:prettier/recommended"), {
languageOptions: {
globals: {
...globals.node,
},

ecmaVersion: 2020,
sourceType: "commonjs",
},
}];
8 changes: 1 addition & 7 deletions lib/express/myinfo/consent.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ const CONSENT_TEMPLATE = fs.readFileSync(
const authorizations = {}

const authorize = (redirectTo) => (req, res) => {
const {
client_id, // eslint-disable-line camelcase
redirect_uri, // eslint-disable-line camelcase
attributes,
purpose,
state,
} = req.query
const { client_id, redirect_uri, attributes, purpose, state } = req.query
const relayStateParams = qs.stringify({
client_id,
redirect_uri,
Expand Down
45 changes: 33 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@
"@commitlint/cli": "^19.1.0",
"@commitlint/config-conventional": "^19.0.3",
"@commitlint/travis-cli": "^19.0.3",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.8.0",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.2.0",
"eslint": "^9.8.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^4.0.0",
"globals": "^15.9.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"nodemon": "^3.0.1",
Expand Down

0 comments on commit afc4701

Please sign in to comment.