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
56 changes: 56 additions & 0 deletions .eslintrc.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
context: 'readonly',
Feature: 'readonly',
Scenario: 'readonly',
actor: 'readonly',
given: 'readonly',
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 11,
sourceType: 'module',
},
plugins: [
'react',
],
rules: {
indent: ['error', 2],
'no-trailing-spaces': 'error',
curly: 'error',
'brace-style': 'error',
'no-multi-spaces': 'error',
'space-infix-ops': 'error',
'space-unary-ops': 'error',
'no-whitespace-before-property': 'error',
'func-call-spacing': 'error',
'space-before-blocks': 'error',
'keyword-spacing': ['error', { before: true, after: true }],
'comma-spacing': ['error', { before: false, after: true }],
'comma-style': ['error', 'last'],
'comma-dangle': ['error', 'always-multiline'],
'space-in-parens': ['error', 'never'],
'block-spacing': 'error',
'array-bracket-spacing': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'key-spacing': ['error', { mode: 'strict' }],
'arrow-spacing': ['error', { before: true, after: true }],
'jsx-a11y/label-has-associated-control': ['error', { assert: 'either' }],
'react/prop-types': 'off',
'linebreak-style': 'off',
'no-proto': 'off',
},
};
11 changes: 11 additions & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
## Mac OS x
.DS_*

## VS Code
.vscode

## Node.js
node_modules

## Jest
coverage
13 changes: 13 additions & 0 deletions babel.config.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
'@babel/preset-react',
],
};
11 changes: 11 additions & 0 deletions index.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>index <%= env %></title>
</head>
<body>
<div id="app"></div>
<script src="/main.js"></script>
</body>
</html>
15 changes: 15 additions & 0 deletions jest.config.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
module.exports = {
setupFilesAfterEnv: [
'given2/setup',
'jest-plugin-context/setup',
'./jest.setup',
],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
};
1 change: 1 addition & 0 deletions jest.setup.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom';
Loading