Skip to content

Commit 72c7c8d

Browse files
authored
Merge pull request #67 from apptension/tra-2021
Tra 2021
2 parents 1fff80e + b20c041 commit 72c7c8d

File tree

271 files changed

+55335
-6484
lines changed

Some content is hidden

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

271 files changed

+55335
-6484
lines changed

.editorconfig

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
1-
# For more information about the properties used in
2-
# this file, please see the EditorConfig documentation:
3-
# https://editorconfig.org/
1+
# editorconfig.org
42

53
root = true
64

75
[*]
86
charset = utf-8
97
end_of_line = lf
10-
indent_size = 2
11-
indent_style = space
128
insert_final_newline = true
9+
indent_style = space
10+
indent_size = 2
1311
trim_trailing_whitespace = true
1412

15-
[{*.html,*.css}]
16-
indent_size = 4
17-
1813
[*.md]
1914
trim_trailing_whitespace = false
20-
21-
[{.travis.yml,package.json}]
22-
# The indent size used in the `package.json` file cannot be changed
23-
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
24-
indent_size = 2
25-
indent_style = space

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SKIP_PREFLIGHT_CHECK=true
2+
REACT_APP_CONTENTFUL_SPACE_ID =
3+
REACT_APP_CONTENTFUL_ACCESS_TOKEN =
4+
REACT_APP_CONTENTFUL_ENVIRONMENT =
5+
REACT_APP_CONTENTFUL_CONTENT_MANAGEMENT_API_PATH = 'https://api.contentful.com/'
6+
REACT_APP_CONTENTFUL_CONTENT_MANAGEMENT_TOKEN =

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
scripts/*
2+
config/*
3+
plop/*
4+
build/*
5+
plopfile.js
6+
setupTests.js
7+
node_modules/**/*
8+

.eslintrc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"extends": [
3+
"react-app",
4+
"prettier",
5+
"plugin:@typescript-eslint/recommended",
6+
"plugin:import/errors",
7+
"plugin:import/warnings",
8+
"plugin:import/typescript"
9+
],
10+
"plugins": ["react-hooks", "formatjs"],
11+
"rules": {
12+
"import/order": ["error"],
13+
"formatjs/no-offset": "error"
14+
},
15+
"overrides": [
16+
{
17+
"files": "*.stories.tsx",
18+
"rules": {
19+
"import/no-anonymous-default-export": "off"
20+
}
21+
},
22+
{
23+
"files": "*.{ts,tsx}",
24+
"rules": {
25+
"@typescript-eslint/no-var-requires": "off",
26+
"@typescript-eslint/ban-ts-comment": "off",
27+
"@typescript-eslint/explicit-module-boundary-types": "off",
28+
"import/no-anonymous-default-export": "off",
29+
"@typescript-eslint/no-explicit-any": "off"
30+
}
31+
}
32+
]
33+
}

.gitattributes

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# From https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes
2+
3+
# Handle line endings automatically for files detected as text
4+
# and leave all files detected as binary untouched.
5+
* text=auto
6+
7+
#
8+
# The above will handle all files NOT found below
9+
#
10+
11+
#
12+
## These files are text and should be normalized (Convert crlf => lf)
13+
#
14+
15+
# source code
16+
*.php text
17+
*.css text
18+
*.sass text
19+
*.scss text
20+
*.less text
21+
*.styl text
22+
*.js text eol=lf
23+
*.coffee text
24+
*.json text
25+
*.htm text
26+
*.html text
27+
*.xml text
28+
*.svg text
29+
*.txt text
30+
*.ini text
31+
*.inc text
32+
*.pl text
33+
*.rb text
34+
*.py text
35+
*.scm text
36+
*.sql text
37+
*.sh text
38+
*.bat text
39+
40+
# templates
41+
*.ejs text
42+
*.hbt text
43+
*.jade text
44+
*.haml text
45+
*.hbs text
46+
*.dot text
47+
*.tmpl text
48+
*.phtml text
49+
50+
# server config
51+
.htaccess text
52+
.nginx.conf text
53+
54+
# git config
55+
.gitattributes text
56+
.gitignore text
57+
.gitconfig text
58+
59+
# code analysis config
60+
.jshintrc text
61+
.jscsrc text
62+
.jshintignore text
63+
.csslintrc text
64+
65+
# misc config
66+
*.yaml text
67+
*.yml text
68+
.editorconfig text
69+
70+
# build config
71+
*.npmignore text
72+
*.bowerrc text
73+
74+
# Heroku
75+
Procfile text
76+
.slugignore text
77+
78+
# Documentation
79+
*.md text
80+
LICENSE text
81+
AUTHORS text
82+
83+
84+
#
85+
## These files are binary and should be left untouched
86+
#
87+
88+
# (binary is a macro for -text -diff)
89+
*.png binary
90+
*.jpg binary
91+
*.jpeg binary
92+
*.gif binary
93+
*.ico binary
94+
*.mov binary
95+
*.mp4 binary
96+
*.mp3 binary
97+
*.flv binary
98+
*.fla binary
99+
*.swf binary
100+
*.gz binary
101+
*.zip binary
102+
*.7z binary
103+
*.ttf binary
104+
*.eot binary
105+
*.woff binary
106+
*.pyc binary
107+
*.pdf binary

.gitignore

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1-
# dependencies
2-
/node_modules
3-
/.pnp
4-
.pnp.js
1+
# Don't check auto-generated stuff into git
2+
coverage
3+
build
4+
junit
5+
generated
6+
node_modules
7+
.nyc_output
8+
stats.json
9+
dist
10+
public/uploads/**
511

6-
# testing
7-
/coverage
8-
9-
# production
10-
/build
11-
12-
# misc
13-
.idea
12+
# Cruft
1413
.DS_Store
15-
.env.local
16-
.env.development.local
17-
.env.test.local
18-
.env.production.local
19-
.contentful-boilerplate
14+
npm-debug.log
15+
.idea
2016

21-
npm-debug.log*
22-
yarn-debug.log*
23-
yarn-error.log*
17+
.env
18+
.env.local

.lintstagedrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{ts,tsx}": "eslint --fix"
3+
}

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v15.0.1

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 120,
3+
"singleQuote": true,
4+
"trailingComma": "es5"
5+
}

.storybook/decorators.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import React, { useEffect } from 'react';
2+
import { IntlProvider } from 'react-intl';
3+
import { ResponsiveThemeProvider } from '../src/shared/components/responsiveThemeProvider';
4+
export { default as withRouter } from 'storybook-react-router';
5+
6+
import { GlobalStyle } from '../src/theme/global';
7+
import { DEFAULT_LOCALE, translationMessages } from '../src/i18n';
8+
import initializeFontFace from '../src/theme/initializeFontFace';
9+
10+
export const withTheme = (theme) => (story) =>
11+
(
12+
<ResponsiveThemeProvider>
13+
<>
14+
<GlobalStyle />
15+
{story()}
16+
</>
17+
</ResponsiveThemeProvider>
18+
);
19+
20+
export const withIntl = (story) => (
21+
<IntlProvider locale={DEFAULT_LOCALE} messages={translationMessages[DEFAULT_LOCALE]}>
22+
{story()}
23+
</IntlProvider>
24+
);
25+
26+
export const withFontFace = (story) => {
27+
useEffect(() => {
28+
initializeFontFace();
29+
}, []);
30+
31+
return story();
32+
};

0 commit comments

Comments
 (0)