Skip to content

Commit

Permalink
Project configuration updates
Browse files Browse the repository at this point in the history
- Add *.tsbuildinfo to gitignore
- Add Lingui ESLint plugin
- Lock @tabler/icons-react to ~3.18.0, ignore with Dependabot
- Use stable version (5.0.0) of eslint-plugin-react-hooks
- Use em instead of px in PostCSS configuration
- Format code to Prettier style
- Update dependencies
  • Loading branch information
SBence committed Oct 25, 2024
1 parent b49552f commit 42e9ae6
Show file tree
Hide file tree
Showing 7 changed files with 430 additions and 420 deletions.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ updates:
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]

- dependency-name: "@tabler/icons-react"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_modules
dist
dist-ssr
*.local
*.tsbuildinfo

# Editor directories and files
.vscode/*
Expand Down
15 changes: 15 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import globals from "globals";
import tseslint from "typescript-eslint";
import pluginLingui from "eslint-plugin-lingui";

export default tseslint.config(
{ ignores: ["dist", "src/locales"] },
Expand All @@ -25,6 +26,7 @@ export default tseslint.config(
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
lingui: pluginLingui,
},
rules: {
...reactHooks.configs.recommended.rules,
Expand All @@ -40,6 +42,19 @@ export default tseslint.config(
},
},
],
"lingui/no-unlocalized-strings": [
"error",
{
ignore: ["(Reac)|(Tally)"],
ignoreAttribute: ["download", "query"],
ignoreFunction: ["useMediaQuery"],
},
],
"lingui/t-call-in-function": "error",
"lingui/no-single-variables-to-translate": "error",
"lingui/no-expression-in-message": "error",
"lingui/no-single-tag-to-translate": "error",
"lingui/no-trans-inside-trans": "error",
},
},
eslintConfigPrettier,
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@mantine/hooks": "^7.13.3",
"@mantine/notifications": "^7.13.3",
"@reduxjs/toolkit": "^2.3.0",
"@tabler/icons-react": "^3.19.0",
"@tabler/icons-react": "~3.18.0",
"@types/uuid": "^10.0.0",
"clsx": "^2.1.0",
"react": "^18.2.0",
Expand All @@ -39,7 +39,8 @@
"babel-plugin-macros": "^3.1.0",
"eslint": "^9.12.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-lingui": "^0.6.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.12",
"globals": "^15.11.0",
"postcss": "^8.4.47",
Expand Down
10 changes: 5 additions & 5 deletions postcss.config.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ export default {
"postcss-preset-mantine": {},
"postcss-simple-vars": {
variables: {
"mantine-breakpoint-xs": "680px",
"mantine-breakpoint-sm": "980px",
"mantine-breakpoint-md": "1300px",
"mantine-breakpoint-lg": "1620px",
"mantine-breakpoint-xl": "1940px",
"mantine-breakpoint-xs": "36em",
"mantine-breakpoint-sm": "48em",
"mantine-breakpoint-md": "62em",
"mantine-breakpoint-lg": "75em",
"mantine-breakpoint-xl": "88em",
},
},
},
Expand Down
12 changes: 6 additions & 6 deletions src/types/Counters.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interface Counter {
name: string;
count: number;
}

export type Counters = Record<string, Counter>;
interface Counter {
name: string;
count: number;
}

export type Counters = Record<string, Counter>;
Loading

0 comments on commit 42e9ae6

Please sign in to comment.