Skip to content

Commit

Permalink
Fetched template changes and refactored code
Browse files Browse the repository at this point in the history
  • Loading branch information
spietras committed Nov 30, 2024
1 parent 48875ff commit ff48d26
Show file tree
Hide file tree
Showing 285 changed files with 8,234 additions and 7,571 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 0.2.0
_commit: 0.4.0
_src_path: gh:radio-aktywne/template-app-next
accountname: radio-aktywne
appname: jasmine
Expand Down
30 changes: 24 additions & 6 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ module.exports = {
// Use recommended typescript-eslint rules
"plugin:@typescript-eslint/recommended",

// Use stylistic typescript-eslint rules
"plugin:@typescript-eslint/stylistic",

// Use recommended Lingui rules
"plugin:lingui/recommended",

// Use recommended perfectionist rules
"plugin:perfectionist/recommended-alphabetical-legacy",

// Turn off rules that might conflict with Prettier
"prettier",
],
Expand All @@ -24,13 +33,10 @@ module.exports = {
files: ["*.d.ts"],
rules: {
// Allow empty object types
"@typescript-eslint/ban-types": [
"@typescript-eslint/no-empty-object-type": [
"error",
{
extendDefaults: true,
types: {
"{}": false,
},
allowObjectTypes: "always",
},
],
},
Expand All @@ -46,14 +52,26 @@ module.exports = {
},

plugins: [
// Support typescript-eslint
// Use @typescript-eslint plugin
"@typescript-eslint",

// Use perfectionist plugin
"perfectionist",
],

// Ignore configuration files in directories above this one
root: true,

rules: {
// Use objects instead of records for empty types
"@typescript-eslint/consistent-indexed-object-style": [
"error",
"index-signature",
],

// Use types instead of interfaces
"@typescript-eslint/consistent-type-definitions": ["error", "type"],

// Allow anonymous default exports
"import/no-anonymous-default-export": "off",

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ name: Image
- Dockerfile
- flake.lock
- "*.nix"
- lingui.config.ts
- next.config.mjs
- package-lock.json
- package.json
Expand All @@ -37,6 +38,7 @@ name: Image
- Dockerfile
- flake.lock
- "*.nix"
- lingui.config.ts
- next.config.mjs
- package-lock.json
- package.json
Expand Down
11 changes: 11 additions & 0 deletions Taskfile.dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ tasks:
- src/**/*
- flake.lock
- "*.nix"
- lingui.config.ts
- next.config.mjs
- package-lock.json
- package.json
Expand All @@ -228,6 +229,16 @@ tasks:
cmds:
- task: install-internal
- task: build-internal
locales:
desc: Extract locales
cmds:
- task: install-internal
- >
npm
run
--
locales
{{ .CLI_ARGS }}
dev:
desc: Run in development mode
interactive: true
Expand Down
18 changes: 18 additions & 0 deletions lingui.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { LinguiConfig } from "@lingui/conf";
import { formatter } from "@lingui/format-po";

// https://lingui.dev/ref/conf
export default {
catalogs: [
{
include: ["<rootDir>/src"],
path: "<rootDir>/src/locales/{locale}",
},
],
fallbackLocales: {
default: "en",
},
format: formatter(),
locales: ["en"],
sourceLocale: "en",
} satisfies LinguiConfig as LinguiConfig;
22 changes: 21 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://nextjs.org/docs/app/api-reference/next-config-js
/** @type {import('next').NextConfig} */
export default {
// Change default build directory
Expand All @@ -10,6 +11,25 @@ export default {

experimental: {
// Optimize import from Mantine packages
optimizePackageImports: ["@mantine/core", "@mantine/hooks"],
optimizePackageImports: [
"@mantine/core",
"@mantine/form",
"@mantine/hooks",
"@mantine/notifications",
],

// Include SWC plugins
swcPlugins: [["@lingui/swc-plugin", {}]],
},

// Add support for loading .po files
webpack: (config) => {
config.module.rules.push({
test: /\.po$/,
use: {
loader: "@lingui/loader",
},
});
return config;
},
};
Loading

0 comments on commit ff48d26

Please sign in to comment.