mirror of
https://github.com/Snouzy/workout-cool.git
synced 2026-05-19 14:40:35 +00:00
e3f9ee035f
* style(ProgramSessionClient.tsx): adjust padding in main and article elements for improved layout consistency and responsiveness chore(ProgramSessionClient.tsx): remove unused imports to clean up the codebase * feat(layout): enhance metadata generation with improved locale handling and add new tools and profile translations feat(bottom-navigation): add new navigation items for tools and profile with responsive labels fix(breadcrumbs): add "use client" directive for proper component rendering style(bottom-navigation): improve layout and styling for better responsiveness and user experience refactor(structured-data): simplify locale-based keyword and language assignments for structured data generation * feat(tools): add fitness tools page with various calculators and localization support for English and French * feat(calorie-calculator): add a new calorie calculator tool with inputs for age, gender, height, weight, activity level, and goal to calculate TDEE and macros feat(calorie-calculator): implement utility functions for BMR and TDEE calculations based on Mifflin-St Jeor equation and activity multipliers feat(calorie-calculator): create components for user inputs including weight, height, age, gender, activity level, and goal selection feat(calorie-calculator): add * feat(calorie-calculator): add FAQ section and enhance results display with tooltips for better user guidance fix(calorie-calculator): update styles for improved visual consistency and responsiveness across components chore(locales): add new translations for FAQ section and enhance existing descriptions for clarity and user understanding * feat(calorie-calculator): enhance user experience with mobile optimizations, add info buttons and modals for better information access, and improve layout responsiveness fix(calorie-calculator): adjust padding and margins for better visual consistency across components and ensure touch targets are larger for mobile users * feat(calorie-calculator): implement calorie calculator tools for Mifflin-St Jeor, Harris-Benedict, and Katch-McArdle methods with UI components for user input and results display chore(calorie-calculator): add styles and animations for a better user experience across the calorie calculator tools fix(calorie-calculator): ensure proper handling of unit conversions and calculations for different methods to provide accurate results feat(oxford-calculator): implement calorie calculator with user inputs for gender, age, height, weight, activity level, and goal; add components for input handling and results display feat(mifflin-st-jeor-calculator): create calorie calculator using Mifflin-St Jeor equation with user inputs for gender, age, height, weight, activity level, and goal; include components for input handling and results display feat(katch-mcardle-calculator): develop calorie calculator based feat(oxford-calculator): add calorie calculator tool with multiple formulas and UI components for user interaction feat(oxford-calculator): implement responsive design and accessibility features for better user experience feat(oxford-calculator): include localization support for multiple languages to enhance usability across regions chore(oxford-calculator): create utility functions for calorie calculations and macros distribution based on user inputs style(oxford-calculator): add custom styles and animations for a modern look and feel of the * feat(calorie-calculator-comparison): add new calorie calculator comparison tool to allow users to compare different BMR formulas side by side for better decision-making on calorie needs * style(ToolsPage): remove unnecessary responsive grid column for improved layout consistency and adjust border class for better visual clarity * feat(tools): add 'coming soon' feature for fitness tools with localization support in multiple languages * feat(tools): update fitness tools page by removing rest timer and updating emojis for calorie and heart rate calculators to enhance user experience and visual consistency chore(locales): remove rest timer translations from all language files to reflect its removal from the tools page feat(emojis): add new emoji images for calorie and heart rate calculators to improve visual representation * refactor(harris-benedict-calculator): improve code readability and structure by organizing imports, adjusting component formatting, and ensuring consistent styling across input components for better maintainability and user experience * style(AgeInput.tsx): disable max-len eslint rule to allow longer lines in the component file * feat(calorie-calculator): enhance SEO metadata generation for calorie calculator and Mifflin-St Jeor calculator with structured data support feat(SEOHead): add support for calculator-specific structured data in SEOHead component feat(structured-data): extend structured data interface to include calculator-specific fields and implement logic for generating calculator metadata feat(calorie-calculator): implement SEO scripts for better search engine visibility and user engagement feat(calorie-calculator): add an Open Graph image for the calorie calculator page * fix: refactor input components for better readability and maintainability by standardizing class names and restructuring code for consistency across the calorie calculator tools feat: enhance user experience by adding support for dynamic styling and improved accessibility features in input components across various calculators style: unify color codes and styling conventions in CSS for consistency across different calculator tools * feat(oxford-calculator): enhance input components for age, height, weight, and gender selection with improved styling and functionality This update refines the AgeInput, HeightInput, WeightInput, GenderSelector, GoalSelector, and UnitSelector components by standardizing input styles, ensuring consistent user experience, and improving accessibility. The changes include adjustments to input types, class names for styling, and the addition of environment-specific imports, which collectively enhance the overall usability and visual appeal of the calculator tool. * feat(calorie-calculator): add BodyFatInput component and improve loading spinner markup for better readability style(gender-selector): disable max-len rule for GenderSelector component to allow longer lines style(eslint): update max-len rule to ignore additional patterns for improved code formatting flexibility * chore(calorie-calculator): remove unused emoji property and image imports to clean up code style(tools/page): adjust class for light background to ensure proper styling fix(eslint): update max-len ignore pattern to correctly handle className and background attributes * feat(locales): add Spanish translations for activity levels, goals, results, and FAQs to enhance user experience for Spanish-speaking users
172 lines
5.4 KiB
JavaScript
172 lines
5.4 KiB
JavaScript
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
|
|
import js from "@eslint/js";
|
|
import { FlatCompat } from "@eslint/eslintrc";
|
|
import { configs as tsConfigs } from "typescript-eslint";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import globals from "globals";
|
|
import nextPlugin from "@next/eslint-plugin-next";
|
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
import reactPlugin from "eslint-plugin-react";
|
|
import importPlugin from "eslint-plugin-import";
|
|
import unusedImportsPlugin from "eslint-plugin-unused-imports";
|
|
import tsParser from "@typescript-eslint/parser";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
recommendedConfig: js.configs.recommended,
|
|
});
|
|
|
|
const config = [
|
|
js.configs.recommended,
|
|
...tsConfigs.recommended,
|
|
...fixupConfigRules(
|
|
compat.extends(
|
|
"plugin:react/recommended",
|
|
"plugin:react/jsx-runtime",
|
|
"plugin:react-hooks/recommended",
|
|
"plugin:prettier/recommended",
|
|
"plugin:import/recommended",
|
|
"plugin:import/typescript",
|
|
"next/core-web-vitals",
|
|
),
|
|
),
|
|
{
|
|
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
ignores: [
|
|
"**/node_modules/**",
|
|
"**/.next/**",
|
|
"**/out/**",
|
|
"**/coverage/**",
|
|
"**/build/**",
|
|
"**/dist/**",
|
|
"**/package.json",
|
|
"**/package-lock.json",
|
|
"**/eslint.config.mjs",
|
|
"**/next.config.js",
|
|
"src/utils/attempt2.js",
|
|
"src/utils/inapp.js",
|
|
"src/utils/externalLinkOpener.js",
|
|
"src/utils/browserEscape.js",
|
|
],
|
|
plugins: {
|
|
"react-hooks": fixupPluginRules(reactHooks),
|
|
react: fixupPluginRules(reactPlugin),
|
|
import: fixupPluginRules(importPlugin),
|
|
"unused-imports": fixupPluginRules(unusedImportsPlugin),
|
|
next: nextPlugin,
|
|
},
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
ecmaVersion: 2018,
|
|
sourceType: "module",
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
project: "./tsconfig.json",
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
},
|
|
settings: {
|
|
"import/resolver": {
|
|
node: {
|
|
paths: ["src"],
|
|
extensions: [".js", ".jsx", ".ts", ".tsx"],
|
|
},
|
|
},
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
rules: {
|
|
"prettier/prettier": ["off", { singleQuote: true }],
|
|
"no-use-before-define": ["off", { functions: false, classes: false }],
|
|
"@typescript-eslint/naming-convention": [
|
|
"error",
|
|
{
|
|
selector: "parameter",
|
|
format: ["camelCase", "PascalCase"],
|
|
leadingUnderscore: "allow",
|
|
},
|
|
{
|
|
selector: "variable",
|
|
format: ["camelCase", "UPPER_CASE", "PascalCase"],
|
|
leadingUnderscore: "allow",
|
|
},
|
|
],
|
|
"import/no-extraneous-dependencies": [
|
|
"error",
|
|
{
|
|
devDependencies: true,
|
|
optionalDependencies: false,
|
|
peerDependencies: false,
|
|
},
|
|
],
|
|
"@typescript-eslint/default-param-last": "off",
|
|
"@typescript-eslint/no-use-before-define": "off",
|
|
"comma-dangle": "off",
|
|
"@typescript-eslint/comma-dangle": "off",
|
|
"import/prefer-default-export": "off",
|
|
"unused-imports/no-unused-imports": "warn",
|
|
"max-len": ["warn", { code: 140, ignorePattern: "^import .*| className=*|background=*", ignoreStrings: true }],
|
|
"import/order": [
|
|
"error",
|
|
{
|
|
groups: ["builtin", "external", "internal", ["sibling", "parent"], "index", "type"],
|
|
alphabetize: { order: "desc", caseInsensitive: true },
|
|
pathGroups: [
|
|
{ pattern: "components", group: "internal" },
|
|
{ pattern: "components/**", group: "internal" },
|
|
{ pattern: "constants/**", group: "internal" },
|
|
{ pattern: "common", group: "internal" },
|
|
{ pattern: "error/**", group: "internal" },
|
|
{ pattern: "hooks/**", group: "internal" },
|
|
{ pattern: "locale/**", group: "internal" },
|
|
{ pattern: "routes/**", group: "internal" },
|
|
{ pattern: "selectors", group: "internal" },
|
|
{ pattern: "store", group: "internal" },
|
|
],
|
|
"newlines-between": "always",
|
|
},
|
|
],
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"react/prop-types": "off",
|
|
"react/require-default-props": "off",
|
|
"import/no-unresolved": "off",
|
|
"import/no-cycle": ["off", { maxDepth: "∞" }],
|
|
"@typescript-eslint/no-shadow": "off",
|
|
"no-shadow": "off",
|
|
"no-console": "off",
|
|
"no-plusplus": "off",
|
|
"react-hooks/exhaustive-deps": "off",
|
|
"react/jsx-filename-extension": "off",
|
|
"react/jsx-props-no-spreading": "off",
|
|
"class-methods-use-this": "off",
|
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
|
"@typescript-eslint/no-empty-object-type": "off",
|
|
"react/jsx-sort-props": [
|
|
"error",
|
|
{
|
|
callbacksLast: false,
|
|
shorthandFirst: false,
|
|
shorthandLast: false,
|
|
ignoreCase: true,
|
|
noSortAlphabetically: false,
|
|
reservedFirst: false,
|
|
},
|
|
],
|
|
quotes: ["error", "double", { avoidEscape: false, allowTemplateLiterals: false }],
|
|
},
|
|
},
|
|
];
|
|
|
|
export default config;
|