Skip to content

Commit

Permalink
build: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ldeluigi committed Nov 8, 2024
1 parent 11d756b commit cc1c534
Show file tree
Hide file tree
Showing 8 changed files with 415 additions and 546 deletions.
56 changes: 0 additions & 56 deletions .eslintrc.js

This file was deleted.

75 changes: 75 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import prettier from "eslint-plugin-prettier";
import cypress from "eslint-plugin-cypress";
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:react/recommended",
"plugin:prettier/recommended",
"next/core-web-vitals",
"plugin:cypress/recommended",
), {
plugins: {
react,
reactHooks,
prettier,
cypress,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
...cypress.environments.globals.globals,
},
},

settings: {
react: {
version: "detect",
},
},

rules: {
"react/no-deprecated": "warn",
"react/no-direct-mutation-state": "error",
"react/no-unescaped-entities": "off",
"react-hooks/exhaustive-deps": "off",
"@next/next/no-img-element": "off",

"prettier/prettier": ["error", {
trailingComma: "all",
eslintIntegration: true,
printWidth: 120,
singleQuote: true,
}],

"no-unused-vars": ["error", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
}],

curly: ["error", "all"],
},
}, {
files: ["**/*.config.js", "**/*.config.ts", "**/*.config.mjs"],

rules: {
"import/no-anonymous-default-export": "off",
},
}];
3 changes: 3 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,8 @@ module.exports = (phase, { _defaultConfig }) => {
},
];
},
sassOptions: {
silenceDeprecations: ['legacy-js-api'],
},
};
};
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"canvas": "^2.11.2",
"debounce": "^2.2.0",
"markdown-to-jsx": "^7.5.0",
"next": "^14.2.10",
"next": "^15.0.3",
"nextjs-progressbar": "^0.0.16",
"pluralize": "^8.0.0",
"react": "^18.3.1",
Expand All @@ -48,25 +48,26 @@
"@eslint/compat": "^1.2.2",
"@scryfall/api-types": "^1.0.0-alpha.4",
"@types/gtag.js": "^0.0.20",
"@types/node": "^18.11.19",
"@types/node": "^22.9.0",
"@types/pluralize": "^0.0.33",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"sass": "^1.80.6",
"@typescript-eslint/parser": "^8.13.0",
"autoprefixer": "^10.4.20",
"cypress": "^13.15.2",
"eslint": "^8.41.0",
"eslint-config-next": "^14.2.9",
"eslint-config-prettier": "^8.7.0",
"eslint": "^9.14.0",
"eslint-config-next": "^15.0.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-check-file": "^2.8.0",
"eslint-plugin-cypress": "^3.5.0",
"eslint-plugin-cypress": "^4.1.0",
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"sass": "^1.80.6",
"tailwindcss": "^3.4.14",
"typescript": "^5.6.3",
"wait-on": "^8.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const TextWithMagicSymbol: React.FC<Props> = ({ text, cardsInCombo = [], include
value: Scryfall.getSymbolUrl(manaSymbol),
manaSymbol,
};
} catch (e) {
} catch (_e) {
console.log('Error getting mana symbol', manaSymbol);
return {
nodeType: 'text',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/random.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
return {
notFound: true,
};
} catch (error) {
} catch (_error) {
return {
notFound: true,
};
Expand Down
2 changes: 1 addition & 1 deletion src/services/token.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async function fetchNewToken(providedRefreshToken?: string) {
throw new Error('Refresh fetch failed');
}
return response.json();
} catch (err) {
} catch (_err) {
CookieService.logout();
return '';
}
Expand Down
Loading

0 comments on commit cc1c534

Please sign in to comment.