Skip to content
Draft
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
7 changes: 0 additions & 7 deletions .babelrc

This file was deleted.

2 changes: 2 additions & 0 deletions .browserlistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
last 5 years
ie >= 11
24 changes: 13 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# CircleCI 2.0 configuration file. See <https://circleci.com/docs/2.0/language-python/>.
version: 2
version: 2.1

jobs:
build:
parallelism: 4
docker:
- image: circleci/node:10-browsers
- image: cimg/node:16.18-browsers
environment:
WATAI_TESTS: tests/integration
SAUCE_USERNAME: openfisca
Expand All @@ -17,24 +17,24 @@ jobs:
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- restore_cache:
key: sc-4.6.4
key: sc-4.8.2
- run:
name: Install app dependencies
command: npm install
command: npm install --force
- run:
name: Install saucelabs
command: |
npm install saucelabs@^1.5.0 --no-save # allow sending Watai results to SauceLabs. Don't save in package.json, as this would change its checksum and mess up the cache.
npm install saucelabs@^1.5.0 --force --no-save # allow sending Watai results to SauceLabs. Don't save in package.json, as this would change its checksum and mess up the cache.
if [ -d sc ]; then exit; fi # sc has already been downloaded
mkdir sc
wget https://saucelabs.com/downloads/sc-4.6.4-linux.tar.gz --directory-prefix sc
tar -xzf sc/sc-4.6.4-linux.tar.gz --directory sc
wget https://saucelabs.com/downloads/sc-4.8.2-linux.tar.gz --directory-prefix sc
tar -xzf sc/sc-4.8.2-linux.tar.gz --directory sc
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
- save_cache:
key: sc-4.6.4
key: sc-4.8.2
paths:
- sc
- run:
Expand All @@ -49,7 +49,7 @@ jobs:
background: true
- run:
name: Start Sauce Connect
command: cd sc/sc-*-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --tunnel-identifier "circle-$CIRCLE_BUILD_NUM-$CIRCLE_NODE_INDEX" --readyfile ~/sauce_is_ready > /tmp/sauce_log.txt
command: cd sc/sc-*-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --tunnel-name "circle-$CIRCLE_BUILD_NUM-$CIRCLE_NODE_INDEX" --readyfile ~/sauce_is_ready > /tmp/sauce_log.txt
background: true
- run:
name: Wait for Sauce Connect
Expand All @@ -69,15 +69,17 @@ jobs:
- store_artifacts:
path: /tmp/sauce_log.txt
destination: sauce-log

deploy:
docker:
- image: circleci/node:8-jessie-browsers

steps:
- run:
name: Deploy app
command: if [ -n "$DEPLOY_SSH" ]; then ssh -o StrictHostKeyChecking=no $DEPLOY_SSH; fi

workflows:
version: 2
build:
jobs:
- build
Expand Down
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[**/*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
32 changes: 0 additions & 32 deletions .eslintrc

This file was deleted.

35 changes: 35 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = {
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
},
env: {
browser: true,
es6: true,
node: true,
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'arrow-spacing': ['error', {before: true, after: true}],
'eol-last': 'error',
indent: ['error', 2],
'jsx-quotes': ['error', 'prefer-double'],
'key-spacing': ['error', {beforeColon: false, afterColon: true}],
'keyword-spacing': ['error', {before: true, after: true}],
'no-console': 'off',
'no-trailing-spaces': 'error',
quotes: ['error', 'single', {avoidEscape: true}],
'react/prop-types': 'off',
semi: ['error', 'never'],
'space-before-blocks': ['error', 'always'],
'space-infix-ops': 'error',
'react/jsx-no-target-blank': ['off'],
},
plugins: ['react'],
extends: ['eslint:recommended', 'plugin:react/recommended'],
}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ webpack-assets.json
.env
.env.*

# NPM
# NPM et al.
flow-typed
node_modules
npm-debug.log

# Ops

ops/.vagrant

# IDEs
.idea
.vscode
.project

Expand Down
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
'presets': [
'@babel/preset-env',
'@babel/react',
]
}
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// Load polyfills, before running the server
require('babel-polyfill')

// Register babel to have ES6 support on the server
require('babel-register')
require('@babel/register')

// Intl in node
// const areIntlLocalesSupported = require("intl-locales-supported")
Expand Down
Loading