ioulian / next-io-ghent-starter Goto Github PK
View Code? Open in Web Editor NEWNext.js starter kit for iO Ghent
Home Page: https://ioulian.github.io/next-io-ghent-starter/
Next.js starter kit for iO Ghent
Home Page: https://ioulian.github.io/next-io-ghent-starter/
TS:
check if feasable
https://catjam.fi/articles/ultimate-button-component
Use type="button" by default, need to check forms then
remove @ts-ignore
check if .env contains process.d.ts values
X-Content-Type-Options
Content-Security-Policy
Cache-Control
import { ComponentProps } from "react";
import {
StyledComponentInnerComponent,
StyledComponentInnerOtherProps,
AnyStyledComponent,
StyledComponentPropsWithRef,
} from "styled-components";
export type inferStyledTypes = ComponentProps<
StyledComponentInnerComponent
&
StyledComponentInnerOtherProps &
StyledComponentPropsWithRef;
To create needed files for PWA, currently this is a manual step. Find a PWA generator
It's possible to add typechecking for the i18n labels. You just need to define which files that should be used for type checking.
Example: mijnenergie-kbc
In mijnenergie-kbc I also added a node script which checks if the translation files aren't missing any keys. This script is currently for just 2 languages but could be easily expanded based on the needs.
Check Storybook for not picking up eslint linkComponents configuration, target="_blank" doesn't require rel="noreferrer" in stories.tsx files.
{
"extends": "next/core-web-vitals",
"settings": {
"next": {
"rootDir": "packages/visitor-app/"
}
},
"rules": {
"import/order": ["error", {
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"pathGroups": [
{
"pattern": "@common/**",
"group": "internal",
"position": "after"
},
{
"pattern": "@WBTypes/**",
"group": "internal",
"position": "before"
}
],
"newlines-between": "always",
"pathGroupsExcludedImportTypes": ["builtin"]
}]
}
}
And fix code then
{
"React Functional Component": {
"prefix": ["rfc"],
"body": [
"import { FC } from \"react\";",
"",
"import { InferComponentProps } from \"@/types/styled\";",
"",
"import { Styled$TM_FILENAME_BASE } from \"./$TM_FILENAME_BASE.styles\";",
"",
"const $TM_FILENAME_BASE: FC<InferComponentProps<typeof Styled$TM_FILENAME_BASE>> = ({children, ...props}) => {",
" return (",
" <Styled$TM_FILENAME_BASE {...props}>",
" {children}$2",
" </Styled$TM_FILENAME_BASE>",
" )",
"};",
"",
"export default $TM_FILENAME_BASE",
""
],
"description": "React Functional Component (styled)"
}
}
{
"React Styled Component": {
"prefix": ["rsc"],
"body": [
"import styled from \"styled-components\";",
"",
"export const Styled${TM_FILENAME_BASE/.styles$//g} = styled.$2``",
""
],
"description": "React Styled Component"
}
}
{
"React Stories Component": {
"prefix": ["rstc"],
"body": [
"import type { Meta, StoryObj } from \"@storybook/react\";",
"",
"import ${TM_FILENAME_BASE/.stories$//g} from \"./${TM_FILENAME_BASE/.stories$//g}\";",
"",
"const meta: Meta<typeof ${TM_FILENAME_BASE/.stories$//g}> = {",
" title: \"UI/${TM_FILENAME_BASE/.stories$//g}\",",
" component: ${TM_FILENAME_BASE/.stories$//g},",
" tags: [\"autodocs\"],",
"};",
"",
"export default meta;",
"type Story = StoryObj<typeof ${TM_FILENAME_BASE/.stories$//g}>;",
"",
"export const Default: Story = {",
" args: {",
" children: \"${TM_FILENAME_BASE/.stories$//g}\",",
" },",
"};",
""
],
"description": "React Stories Component"
}
}
https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction#accessibility_concerns
flex-direction: ${({ $alignRight }) => ($alignRight ? "row-reverse" : "row")};
The buttons inside the group should effectively be reordered semantically and not only visually, as a rule of thumb we should prevent using row-reverse
and column-reverse
since it breaks visual and DOM connection.
https://zxcvbn-ts.github.io/zxcvbn/ is a better password strength checker, but it's heavy and needs to be loaded on demand.
Roadmap:
Critical:
Can wait
as?: keyof JSX.IntrinsicElements
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.