-
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.
- Loading branch information
1 parent
dcfe520
commit bc9a0cd
Showing
12 changed files
with
18,170 additions
and
0 deletions.
There are no files selected for viewing
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,17 @@ | ||
node_modules | ||
dist | ||
|
||
# config files | ||
*.config.ts | ||
|
||
# test files | ||
*.test.ts | ||
*.test.tsx | ||
*.spec.ts | ||
*.spec.tsx | ||
|
||
# stories files | ||
*.stories.tsx | ||
*.stories.ts | ||
*.stories.jsx | ||
*.stories.js |
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,51 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"env": { | ||
"node": true, | ||
"browser": true, | ||
"jest": true | ||
}, | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:eslint-comments/recommended", | ||
"plugin:jest/recommended", | ||
"plugin:promise/recommended", | ||
"plugin:unicorn/recommended", | ||
"prettier" | ||
], | ||
"plugins": [ | ||
"react", | ||
"@typescript-eslint", | ||
"eslint-comments", | ||
"jest", | ||
"promise", | ||
"unicorn" | ||
], | ||
"rules": { | ||
"no-prototype-builtins": "off", | ||
"@typescript-eslint/semi": 0, | ||
"@typescript-eslint/member-delimiter-style": 0, | ||
"@typescript-eslint/no-explicit-any": 0, | ||
"react/jsx-indent": 0, | ||
"react/jsx-indent-props": 0, | ||
"unicorn/no-null": 0, | ||
"react/require-default-props": 0, | ||
"global-require": 0, | ||
"react/jsx-props-no-spreading": 0, | ||
"@typescript-eslint/ban-ts-ignore": 0, | ||
"comma-dangle": 0, | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 80 | ||
} | ||
], | ||
"import/prefer-default-export": "off", | ||
"import/extensions": 0, | ||
"unicorn/prevent-abbreviations": 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,4 @@ | ||
node_modules | ||
.DS_Store | ||
.vscode | ||
dist |
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,7 @@ | ||
{ | ||
"tabWidth": 4, | ||
"singleQuote": true, | ||
"endOfLine": "crlf", | ||
"semi": false, | ||
"printWidth": 80 | ||
} |
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,10 @@ | ||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials" | ||
] | ||
} |
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,9 @@ | ||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
} |
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,33 @@ | ||
module.exports = (api) => { | ||
const isTest = api.env('test') | ||
|
||
const ignore = [ | ||
'src/**/*.stories.ts', | ||
'src/**/*.stories.tsx', | ||
'src/**/*.stories.js', | ||
'src/**/*.stories.jsx', | ||
] | ||
|
||
if (!isTest) { | ||
/** | ||
* If environment is not test then we have | ||
* to exclude exclude test files from being | ||
* compiled | ||
*/ | ||
ignore.push('src/**/*.test.tsx') | ||
ignore.push('src/**/*.test.ts') | ||
ignore.push('src/**/*.test.jsx') | ||
ignore.push('src/**/*.test.js') | ||
ignore.push('**/__tests__/*') | ||
ignore.push('**/__mocks__/*') | ||
} | ||
|
||
return { | ||
presets: ['@babel/env', '@babel/typescript'], | ||
plugins: [ | ||
'@babel/proposal-class-properties', | ||
'@babel/proposal-object-rest-spread', | ||
], | ||
ignore: ignore, | ||
} | ||
} |
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,31 @@ | ||
module.exports = { | ||
// Automatically clear mock calls and instances between every test | ||
clearMocks: true, | ||
|
||
// An array of glob patterns indicating a set of files for which coverage information should be collected | ||
collectCoverageFrom: ['src/**/*.{ts,tsx}'], | ||
|
||
// The directory where Jest should output its coverage files | ||
coverageDirectory: 'coverage', | ||
|
||
// An array of file extensions your modules use | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], | ||
|
||
// The test environment that will be used for testing | ||
testEnvironment: 'jsdom', | ||
|
||
// The glob patterns Jest uses to detect test files | ||
testMatch: ['**/__tests__/**/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'], | ||
|
||
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped | ||
testPathIgnorePatterns: ['\\\\node_modules\\\\', '<rootDir>/dist/'], | ||
|
||
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href | ||
testURL: 'http://localhost', | ||
|
||
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation | ||
transformIgnorePatterns: ['<rootDir>/node_modules/'], | ||
|
||
// Indicates whether each individual test should be reported during the run | ||
verbose: true, | ||
} |
Oops, something went wrong.