-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed mutation issues * Updated infrastructure to latest versions * Added prettier check to husky precommit check * Updated spec tests * Updated precommit and changed dependencies * Added storybook for shared blocks * Updated github build pipeline * Added separate stages to the workflow file * Updated package-lock and removed hack * Updated package json dependencies * Fixed aliases for storybook, added storybook to components * Moved favicons to tailwind.css
- Loading branch information
1 parent
d8a5b8f
commit 5f3ded3
Showing
86 changed files
with
11,187 additions
and
11,361 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,4 +103,5 @@ dist | |
# TernJS port file | ||
.tern-port | ||
|
||
.vscode | ||
.vscode | ||
*storybook.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') | ||
[ -z "$FILES" ] && exit 0 | ||
|
||
# Prettify all selected files | ||
echo "$FILES" | npm run prettier:write | ||
|
||
# Add back the modified/prettified files to staging | ||
echo "$FILES" | xargs git add | ||
|
||
if npm run prettier:check; then | ||
echo "Prettier passed" | ||
else | ||
echo "Prettier failed" | ||
exit 1 | ||
fi | ||
|
||
npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v16.13.2 | ||
v23.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import type { StorybookConfig } from '@storybook/react-webpack5'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.stories.@(ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-webpack5-compiler-swc', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-styling-webpack', | ||
], | ||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {}, | ||
}, | ||
webpackFinal: async (config) => { | ||
// eslint-disable-next-line @typescript-eslint/no-require-imports | ||
const path = require('path'); | ||
// eslint-disable-next-line @typescript-eslint/no-require-imports | ||
const tsConfig = require('../tsconfig.json'); | ||
const __dirname = path.resolve(); | ||
|
||
function createWebpackAliasFromTsConfigPaths() { | ||
return Object.fromEntries( | ||
Object.entries<[string, string[]]>( | ||
tsConfig.compilerOptions.paths || {}, | ||
).map(([key, [value]]) => [ | ||
key.replace('/*', ''), | ||
path.resolve(__dirname, value.replace('/*', '')), | ||
]), | ||
); | ||
} | ||
|
||
return { | ||
...config, | ||
resolve: { | ||
...config.resolve, | ||
alias: { | ||
...config.resolve?.alias, | ||
...createWebpackAliasFromTsConfigPaths(), | ||
}, | ||
}, | ||
}; | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { Preview } from '@storybook/react'; | ||
|
||
import '!style-loader!css-loader!postcss-loader!../src/tailwind.css'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import js from '@eslint/js'; | ||
import typescriptEslint from '@typescript-eslint/eslint-plugin'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
import react from 'eslint-plugin-react'; | ||
import globals from 'globals'; | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all, | ||
}); | ||
|
||
export default [ | ||
{ | ||
ignores: ['dist/*', 'tools/*', 'node_modules/*', 'static/*'], | ||
}, | ||
...fixupConfigRules( | ||
compat.extends( | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
), | ||
), | ||
{ | ||
settings: { | ||
react: { | ||
pragma: 'React', | ||
version: 'detect', | ||
}, | ||
}, | ||
|
||
plugins: { | ||
react: fixupPluginRules(react), | ||
'@typescript-eslint': fixupPluginRules(typescriptEslint), | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
|
||
rules: { | ||
'react/prop-types': 'off', | ||
'react/display-name': 'off', | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
|
||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
caughtErrorsIgnorePattern: '^_', | ||
}, | ||
], | ||
|
||
'react-hooks/exhaustive-deps': 'error', | ||
}, | ||
}, | ||
]; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { pathsToModuleNameMapper } from 'ts-jest'; | ||
import type { JestConfigWithTsJest } from 'ts-jest'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-require-imports | ||
const { compilerOptions } = require('./tsconfig.json'); | ||
|
||
export default { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
roots: ['<rootDir>'], | ||
modulePaths: [compilerOptions.baseUrl], | ||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths), | ||
} satisfies JestConfigWithTsJest; |
Oops, something went wrong.