Skip to content

Commit

Permalink
Merge pull request #67 from apptension/tra-2021
Browse files Browse the repository at this point in the history
Tra 2021
  • Loading branch information
pziemkowski authored Jan 18, 2022
2 parents 1fff80e + b20c041 commit 72c7c8d
Show file tree
Hide file tree
Showing 271 changed files with 55,335 additions and 6,484 deletions.
17 changes: 3 additions & 14 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
# For more information about the properties used in
# this file, please see the EditorConfig documentation:
# https://editorconfig.org/
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[{*.html,*.css}]
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[{.travis.yml,package.json}]
# The indent size used in the `package.json` file cannot be changed
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
indent_size = 2
indent_style = space
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SKIP_PREFLIGHT_CHECK=true
REACT_APP_CONTENTFUL_SPACE_ID =
REACT_APP_CONTENTFUL_ACCESS_TOKEN =
REACT_APP_CONTENTFUL_ENVIRONMENT =
REACT_APP_CONTENTFUL_CONTENT_MANAGEMENT_API_PATH = 'https://api.contentful.com/'
REACT_APP_CONTENTFUL_CONTENT_MANAGEMENT_TOKEN =
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
scripts/*
config/*
plop/*
build/*
plopfile.js
setupTests.js
node_modules/**/*

33 changes: 33 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"extends": [
"react-app",
"prettier",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"plugins": ["react-hooks", "formatjs"],
"rules": {
"import/order": ["error"],
"formatjs/no-offset": "error"
},
"overrides": [
{
"files": "*.stories.tsx",
"rules": {
"import/no-anonymous-default-export": "off"
}
},
{
"files": "*.{ts,tsx}",
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"import/no-anonymous-default-export": "off",
"@typescript-eslint/no-explicit-any": "off"
}
}
]
}
107 changes: 107 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# From https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes

# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

#
# The above will handle all files NOT found below
#

#
## These files are text and should be normalized (Convert crlf => lf)
#

# source code
*.php text
*.css text
*.sass text
*.scss text
*.less text
*.styl text
*.js text eol=lf
*.coffee text
*.json text
*.htm text
*.html text
*.xml text
*.svg text
*.txt text
*.ini text
*.inc text
*.pl text
*.rb text
*.py text
*.scm text
*.sql text
*.sh text
*.bat text

# templates
*.ejs text
*.hbt text
*.jade text
*.haml text
*.hbs text
*.dot text
*.tmpl text
*.phtml text

# server config
.htaccess text
.nginx.conf text

# git config
.gitattributes text
.gitignore text
.gitconfig text

# code analysis config
.jshintrc text
.jscsrc text
.jshintignore text
.csslintrc text

# misc config
*.yaml text
*.yml text
.editorconfig text

# build config
*.npmignore text
*.bowerrc text

# Heroku
Procfile text
.slugignore text

# Documentation
*.md text
LICENSE text
AUTHORS text


#
## These files are binary and should be left untouched
#

# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.eot binary
*.woff binary
*.pyc binary
*.pdf binary
35 changes: 15 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
# dependencies
/node_modules
/.pnp
.pnp.js
# Don't check auto-generated stuff into git
coverage
build
junit
generated
node_modules
.nyc_output
stats.json
dist
public/uploads/**

# testing
/coverage

# production
/build

# misc
.idea
# Cruft
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.contentful-boilerplate
npm-debug.log
.idea

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.env
.env.local
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{ts,tsx}": "eslint --fix"
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v15.0.1
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 120,
"singleQuote": true,
"trailingComma": "es5"
}
32 changes: 32 additions & 0 deletions .storybook/decorators.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React, { useEffect } from 'react';
import { IntlProvider } from 'react-intl';
import { ResponsiveThemeProvider } from '../src/shared/components/responsiveThemeProvider';
export { default as withRouter } from 'storybook-react-router';

import { GlobalStyle } from '../src/theme/global';
import { DEFAULT_LOCALE, translationMessages } from '../src/i18n';
import initializeFontFace from '../src/theme/initializeFontFace';

export const withTheme = (theme) => (story) =>
(
<ResponsiveThemeProvider>
<>
<GlobalStyle />
{story()}
</>
</ResponsiveThemeProvider>
);

export const withIntl = (story) => (
<IntlProvider locale={DEFAULT_LOCALE} messages={translationMessages[DEFAULT_LOCALE]}>
{story()}
</IntlProvider>
);

export const withFontFace = (story) => {
useEffect(() => {
initializeFontFace();
}, []);

return story();
};
4 changes: 4 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
stories: ['../src/**/*.stories.tsx'],
addons: ['@storybook/preset-create-react-app', '@storybook/addon-essentials'],
};
8 changes: 8 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { addDecorator } from '@storybook/react';
import 'normalize.css/normalize.css';

import { withFontFace, withIntl, withTheme } from './decorators';

addDecorator(withIntl);
addDecorator(withTheme());
addDecorator(withFontFace);
7 changes: 7 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"processors": ["stylelint-processor-styled-components"],
"extends": ["stylelint-config-recommended", "stylelint-config-styled-components"],
"rules": {
"no-extra-semicolons": null
}
}
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

Loading

0 comments on commit 72c7c8d

Please sign in to comment.