Skip to content

Commit 54be0ef

Browse files
committed
feat: adds new Form and FormControl components
Adds helpers to simplify the creation of Forms. Form, FormButton, FormControl FormControlHelp These are form framework/lib independent. Required updates to the input types to support the API. fix #248
1 parent d4f15eb commit 54be0ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+19448
-26778
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,6 @@ RUN echo 'source <(gh completion -s bash)' >> ~/.bashrc \
5757
&& touch ~/.bash_profile \
5858
# Install useful oh-my-* shell plugins
5959
&& sed -i.bak 's/^plugins=(\(.*\)/plugins=(debian docker docker-compose node npm yarn vscode \1/' ~/.zshrc \
60-
&& sed -i.bak 's/^plugins=(\(.*\)/plugins=(npm \1/' ~/.bashrc
60+
&& sed -i.bak 's/^plugins=(\(.*\)/plugins=(npm \1/' ~/.bashrc
61+
62+
RUN npm i -g npm@7 --registry=https://registry.npmjs.org

.devcontainer/devcontainer.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010
},
1111
"settings": {
1212
// Default to ZSH
13-
"terminal.integrated.shell.linux": "/bin/bash",
14-
"terminal.integrated.shell.osx": "/usr/bin/zsh",
13+
"terminal.integrated.profiles.linux": {
14+
"zsh": {
15+
"path": "/bin/zsh"
16+
}
17+
},
18+
"terminal.integrated.defaultProfile.linux": "zsh",
1519
// Setup formatting to save with prettier
1620
"editor.formatOnSave": true,
1721
"editor.defaultFormatter": "esbenp.prettier-vscode",
@@ -34,7 +38,13 @@
3438
"github.vscode-pull-request-github",
3539
"ms-vsliveshare.vsliveshare",
3640
"eamodio.gitlens",
37-
"streetsidesoftware.code-spell-checker"
41+
"streetsidesoftware.code-spell-checker",
42+
"sonarsource.sonarlint-vscode",
43+
"github.copilot",
44+
"bierner.markdown-preview-github-styles",
45+
"me-dutour-mathieu.vscode-github-actions",
46+
"christian-kohler.npm-intellisense",
47+
"eg2.vscode-npm-script"
3848
],
3949
"remoteUser": "node"
4050
}

.eslintrc.js

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
sourceType: 'module',
5+
project: './tsconfig.json',
6+
},
7+
env: {
8+
browser: true,
9+
node: true,
10+
},
11+
plugins: ['import'],
12+
extends: [
13+
'eslint:recommended',
14+
'plugin:import/errors',
15+
'plugin:import/warnings',
16+
'plugin:import/typescript',
17+
'plugin:react/recommended',
18+
'plugin:react-hooks/recommended',
19+
'plugin:jsx-a11y/recommended',
20+
'plugin:jest/recommended',
21+
'plugin:jest/style',
22+
'plugin:jest-dom/recommended',
23+
'plugin:@typescript-eslint/recommended',
24+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
25+
'prettier',
26+
],
27+
settings: {
28+
react: {
29+
// to indicate latest version
30+
// https://github.com/yannickcr/eslint-plugin-react/blob/b8e91a571bc6b58cc3c78e9e62e8b60ecb45e233/lib/util/version.js#L48
31+
version: '999.999.999',
32+
},
33+
'import/parsers': {
34+
'@typescript-eslint/parser': ['.ts', '.tsx'],
35+
},
36+
'import/resolver': {
37+
typescript: {
38+
alwaysTryTypes: true,
39+
},
40+
},
41+
},
42+
rules: {
43+
'import/default': 'off',
44+
'import/no-default-export': 'off',
45+
'react/display-name': 'off',
46+
'import/no-named-as-default-member': 'warn',
47+
// see for rational https://basarat.gitbook.io/typescript/main-1/defaultisbad
48+
'import/no-default-export': 'error',
49+
'@typescript-eslint/restrict-template-expressions': 'off',
50+
'@typescript-eslint/ban-ts-comment': 'warn',
51+
'@typescript-eslint/no-explicit-any': 'warn',
52+
'@typescript-eslint/no-unsafe-assignment': 'warn',
53+
'@typescript-eslint/no-unsafe-call': 'warn',
54+
'@typescript-eslint/no-unsafe-member-access': 'warn',
55+
'@typescript-eslint/no-unsafe-return': 'warn',
56+
'@typescript-eslint/no-this-alias': 'warn',
57+
},
58+
overrides: [
59+
{
60+
// required because of https://github.com/yannickcr/eslint-plugin-react/issues/2353
61+
// otherwise get missing prop-types error in tsx files
62+
files: ['**/*.tsx'],
63+
rules: {
64+
'react/prop-types': 'off',
65+
},
66+
},
67+
{
68+
// allow node_module mocks to have default exports
69+
files: ['__mocks__/**/*'],
70+
rules: {
71+
'import/no-default-export': 'off',
72+
},
73+
},
74+
],
75+
ignorePatterns: [
76+
'dist',
77+
'docs',
78+
'example',
79+
'node_modules',
80+
'**/*.stories.tsx',
81+
'**/*.test.ts',
82+
],
83+
}

0 commit comments

Comments
 (0)