Skip to content

Commit

Permalink
update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
dieseltravis committed Dec 1, 2024
1 parent 0f52094 commit 4bfa0ce
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 16 deletions.
28 changes: 28 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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'), {
languageOptions: {
globals: {
...globals.browser,
...globals.commonjs,
...globals.node
},

ecmaVersion: 8,
sourceType: 'module'
},

rules: {}
}];
32 changes: 25 additions & 7 deletions package-lock.json

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

11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"eslint": "^9.16.0",
"express": "^5.0.1",
"express-rate-limit": "^7.4.1",
"jshint": "^2.13.6",
"semistandard": "^17.0.0",
"standard-engine": "^15.1.0",
"jshint": "^2.13.6"
"standard-engine": "^15.1.0"
},
"repository": {
"url": "https://glitch.com/edit/#!/meowing-holy-carbon"
Expand All @@ -37,5 +37,10 @@
"node > 14",
"fully supports es6-module",
"maintained node versions"
]
],
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.16.0",
"globals": "^15.13.0"
}
}
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const rateLimit = require('express-rate-limit');
const { JSHINT } = require('jshint');

const isGlitch = !!process.env.PROJECT_DOMAIN;
const projectDomain = process.env.PROJECT_DOMAIN || "localhost";
const projectDomain = process.env.PROJECT_DOMAIN || 'localhost';
console.log(projectDomain);

// run the same functions on the front & back
Expand Down
15 changes: 10 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"

"@eslint/js@^9.16.0", "@eslint/js@9.16.0":
version "9.16.0"
resolved "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz"
integrity sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==

"@eslint/js@8.57.1":
version "8.57.1"
resolved "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz"
integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==

"@eslint/js@9.16.0":
version "9.16.0"
resolved "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz"
integrity sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==

"@eslint/object-schema@^2.1.4":
version "2.1.4"
resolved "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz"
Expand Down Expand Up @@ -1293,6 +1293,11 @@ globals@^14.0.0:
resolved "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz"
integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==

globals@^15.13.0:
version "15.13.0"
resolved "https://registry.npmjs.org/globals/-/globals-15.13.0.tgz"
integrity sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g==

globalthis@^1.0.4:
version "1.0.4"
resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz"
Expand Down

0 comments on commit 4bfa0ce

Please sign in to comment.