Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 51 additions & 51 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:jest/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:jest/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
rules: {
'@typescript-eslint/camelcase': 'off',
'import/no-duplicates': 'error',
'import/extensions': 'error',
'import/order': 'error',
'import/newline-after-import': 'error',
'import/prefer-default-export': 'error',
'import/no-named-default': 'error',
'import/no-anonymous-default-export': 'error',
'import/dynamic-import-chunkname': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
},
settings: {
react: {
version: 'detect',
},
rules: {
'@typescript-eslint/camelcase': 'off',
'import/no-duplicates': 'error',
'import/extensions': 'error',
'import/order': 'error',
'import/newline-after-import': 'error',
'import/prefer-default-export': 'error',
'import/no-named-default': 'error',
'import/no-anonymous-default-export': 'error',
'import/dynamic-import-chunkname': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
},
overrides: [
{
files: ['*.js'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
settings: {
react: {
version: 'detect',
},
{
files: ['*.stories.tsx', '*.test.tsx', '__tests__/**.*'],
rules: {
'import/no-anonymous-default-export': 'off',
'@typescript-eslint/no-empty-function': 'off',
},
},
overrides: [
{
files: ['*.js'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['*.stories.tsx', '*.test.tsx', '__tests__/**.*'],
rules: {
'import/no-anonymous-default-export': 'off',
'@typescript-eslint/no-empty-function': 'off',
},
},
{
files: ['onesky/**.ts'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
{
files: ['onesky/**.ts'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
};
28 changes: 14 additions & 14 deletions .github/workflows/merge-pr-into-stage.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Merge PR into stage
on:
pull_request:
types: [labeled, synchronize]
pull_request:
types: [labeled, synchronize]

jobs:
merge-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Merge by labeled
uses: devmasx/merge-branch@v1.1.0
if: contains( github.event.pull_request.labels.*.name, 'merged into stage')
with:
type: now
target_branch: 'stage'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
merge-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Merge by labeled
uses: devmasx/merge-branch@v1.1.0
if: contains( github.event.pull_request.labels.*.name, 'merged into stage')
with:
type: now
target_branch: 'stage'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@
/node_modules/.cache

# next.js
/.next/
/out/
/dist/

# production
/build
/.next

# misc
.DS_Store
Expand Down
17 changes: 17 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# dependencies
.yarn
.pnp.js

# testing
/coverage

# Storybook cache
/node_modules/.cache

# next.js
/.next

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
5 changes: 1 addition & 4 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
module.exports = {
semi: true,
trailingComma: "all",
singleQuote: true,
printWidth: 120,
tabWidth: 4
trailingComma: 'all',
};
38 changes: 19 additions & 19 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
const path = require('path');

module.exports = {
webpackFinal: async (config) => {
config.module.rules.push({
test: /\.(graphql|gql)$/,
include: path.resolve(__dirname, '../'),
exclude: /node_modules/,
use: [
{
loader: 'graphql-tag/loader',
},
],
});
return config;
},
addons: [
'@storybook/addon-actions/register',
'@storybook/addon-viewport/register',
'@storybook/addon-knobs/register',
'storybook-addon-i18next/register',
],
webpackFinal: async (config) => {
config.module.rules.push({
test: /\.(graphql|gql)$/,
include: path.resolve(__dirname, '../'),
exclude: /node_modules/,
use: [
{
loader: 'graphql-tag/loader',
},
],
});
return config;
},
addons: [
'@storybook/addon-actions/register',
'@storybook/addon-viewport/register',
'@storybook/addon-knobs/register',
'storybook-addon-i18next/register',
],
};
15 changes: 9 additions & 6 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700&display=swap" rel="stylesheet" />
<link
href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700&display=swap"
rel="stylesheet"
/>
<style type="text/css">
body {
margin: 0;
padding: 0;
background-color: #f6f7f9 !important;
}
body {
margin: 0;
padding: 0;
background-color: #f6f7f9 !important;
}
</style>
49 changes: 26 additions & 23 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,40 @@ import theme from '../src/theme';
import i18n from '../src/lib/i18n';

if (isChromatic()) {
MockDate.set(new Date(2020, 1, 1));
MockDate.set(new Date(2020, 1, 1));
}

addDecorator(
withI18next({
i18n,
languages: {
en: 'English',
de: 'German',
},
}),
withI18next({
i18n,
languages: {
en: 'English',
de: 'German',
},
}),
);
addDecorator(withKnobs);
addDecorator((StoryFn) => (
<MockedProvider mocks={[]} addTypename={false}>
<ThemeProvider theme={theme}>
<CssBaseline />
<MuiPickersUtilsProvider utils={DateFnsUtils}>
<SnackbarProvider maxSnack={3}>
<TestRouter>
<AppProvider>
<StoryFn />
</AppProvider>
</TestRouter>
</SnackbarProvider>
</MuiPickersUtilsProvider>
</ThemeProvider>
</MockedProvider>
<MockedProvider mocks={[]} addTypename={false}>
<ThemeProvider theme={theme}>
<CssBaseline />
<MuiPickersUtilsProvider utils={DateFnsUtils}>
<SnackbarProvider maxSnack={3}>
<TestRouter>
<AppProvider>
<StoryFn />
</AppProvider>
</TestRouter>
</SnackbarProvider>
</MuiPickersUtilsProvider>
</ThemeProvider>
</MockedProvider>
));

addParameters({ chromatic: { diffThreshold: true } });

// automatically import all files ending in *.stories.tsx
configure(require.context('../src/components', true, /\.stories\.tsx?$/), module);
configure(
require.context('../src/components', true, /\.stories\.tsx?$/),
module,
);
31 changes: 17 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
sudo: false
language: node_js
node_js:
- '15'
- '15'
branches:
only:
- main
only:
- main
install:
- yarn install --immutable --immutable-cache --check-cache
- yarn install --immutable --immutable-cache --check-cache
jobs:
include:
- stage: Test
script:
- yarn test
- stage: Lint
script:
- yarn lint:ci
- stage: Chromatic
script:
- bin/travis_chromatic.sh
include:
- stage: Test
script:
- yarn test
- stage: Lint
script:
- yarn lint:ci
- stage: Prettier Check
script:
- yarn prettier:check
- stage: Chromatic
script:
- bin/travis_chromatic.sh
34 changes: 17 additions & 17 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "vscode-jest-tests",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeArgs": ["run", "--inspect-brk", "jest", "--runInBand"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true
}
]
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "vscode-jest-tests",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeArgs": ["run", "--inspect-brk", "jest", "--runInBand"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true
}
]
}
Loading