Skip to content

Commit 839efe4

Browse files
committed
chore: update whole build and test system
1 parent b91bc44 commit 839efe4

Some content is hidden

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

41 files changed

+9664
-15381
lines changed

.babelrc

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,3 @@
11
{
2-
"env": {
3-
"development": {
4-
"presets": [
5-
["env", {
6-
"targets": {
7-
"browsers": ["last 2 versions", "safari >= 7", "ie >= 11"]
8-
}
9-
}],
10-
"react"
11-
],
12-
"plugins": ["transform-export-extensions", "transform-object-rest-spread"]
13-
},
14-
"build": {
15-
"presets": [
16-
["env", {
17-
"targets": {
18-
"browsers": ["last 2 versions", "safari >= 7", "ie >= 11"]
19-
}
20-
}],
21-
"react"
22-
],
23-
"plugins": [
24-
"transform-export-extensions",
25-
"transform-object-rest-spread",
26-
"transform-react-remove-prop-types"
27-
],
28-
"ignore": [
29-
"**/__tests__/*.js",
30-
"**/fake-*"
31-
]
32-
}
33-
}
2+
"presets": ["@researchgate/babel-preset-rg"]
343
}

.editorconfig

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
1-
# http://editorconfig.org
1+
# http://EditorConfig.org
2+
# top-most EditorConfig file
23
root = true
34

45
[*]
5-
# Use hard or soft tabs
6+
end_of_line = lf
7+
trim_trailing_whitespace = true
8+
insert_final_newline = false
69
indent_style = space
710

8-
# Size of a single indent
9-
indent_size = tab
10-
11-
# Number of columns representing a tab character
12-
tab_width = 4
13-
14-
# Use line-feed as EOL indicator
15-
end_of_line = lf
11+
[*.md]
12+
trim_trailing_whitespace = false
1613

17-
# Use UTF-8 character encoding for all files
14+
[*.{js,jsx,scss}]
1815
charset = utf-8
19-
20-
# Remove any whitespace characters preceding newline characters
21-
trim_trailing_whitespace = true
22-
23-
# Ensure file ends with a newline when saving
2416
insert_final_newline = true
17+
indent_size = 4
2518

26-
[*.md]
27-
trim_trailing_whitespace = false
19+
[{*.json,.travis.yml,.*rc}]
20+
indent_size = 2

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.js

Lines changed: 10 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,21 @@
11
module.exports = {
2+
"extends": "@researchgate/rg-react",
23
"parser": "babel-eslint",
3-
"env": {
4-
"browser": true,
5-
"es6": true
6-
},
7-
"extends": ["eslint:recommended", "plugin:react/recommended"],
8-
"globals": {
9-
"__BROWSER__": true,
10-
"__dirname": true,
11-
"__x": true,
12-
"global": true,
13-
"module": true,
14-
"process": true,
15-
"require": true,
16-
"Buffer": true,
17-
"DocumentTouch": true
18-
},
19-
"parserOptions": {
20-
"ecmaFeatures": {
21-
"experimentalObjectRestSpread": true,
22-
"jsx": true
23-
},
24-
"sourceType": "module"
25-
},
26-
"plugins": [
27-
"react"
28-
],
294
"settings": {
30-
"import/resolver": {
31-
"node": {
32-
"extensions": [".js", ".jsx"]
33-
}
5+
"import/extensions": [
6+
".js",
7+
".jsx"
8+
],
9+
"react": {
10+
"version": "detect"
3411
}
3512
},
3613
"rules": {
37-
"eol-last": [
38-
"error",
39-
"always"
40-
],
41-
"indent": [
42-
"error",
43-
4,
44-
{
45-
"SwitchCase": 1
46-
}
47-
],
48-
"linebreak-style": [
49-
"error",
50-
"unix"
51-
],
52-
"no-case-declarations": [
53-
0
54-
],
55-
"no-empty": [
56-
"error",
57-
{
58-
"allowEmptyCatch": true
59-
}
60-
],
61-
"no-unused-vars": [
62-
"error",
63-
{
64-
"vars": "all",
65-
"args": "after-used",
66-
"ignoreRestSiblings": true
67-
}
68-
],
69-
"object-curly-spacing": [
70-
"error",
71-
"always"
72-
],
73-
"quotes": [
74-
"error",
75-
"single"
76-
],
7714
"semi": [
7815
"error",
7916
"never"
80-
]
17+
],
18+
"import/extensions": ["error", "always", { "js": "never", "jsx": "never" }],
19+
"react/jsx-boolean-value": "never"
8120
}
8221
}

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,8 @@
1-
# Logs
2-
logs
3-
*.log
4-
5-
# Runtime data
6-
pids
7-
*.pid
8-
*.seed
9-
10-
# Directory for instrumented libs generated by jscoverage/JSCover
11-
lib-cov
12-
13-
# Coverage directory used by tools like istanbul
14-
coverage
15-
16-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17-
.grunt
18-
19-
# node-waf configuration
20-
.lock-wscript
21-
22-
# Compiled binary addons (http://nodejs.org/api/addons.html)
23-
build/Release
24-
25-
# Dependency directory
26-
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
271
node_modules
2+
npm-debug.log*
3+
yarn-error.log
4+
/lib
5+
coverage
6+
docs/static
7+
docs/favicon*
8+
docs/*.html

.npmignore

Lines changed: 0 additions & 37 deletions
This file was deleted.

.prettierrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"bracketSpacing": true,
3+
"jsxBracketSameLine": false,
4+
"overrides": [{
5+
"files": "*.json",
6+
"options": {
7+
"tabWidth": 2
8+
}
9+
}],
10+
"printWidth": 120,
11+
"semi": false,
12+
"singleQuote": true,
13+
"tabWidth": 4,
14+
"trailingComma": "all",
15+
"useTabs": false
16+
}

.storybook/config.js

Whitespace-only changes.

.travis.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
language: node_js
22
node_js:
3-
- '8.9'
4-
install:
5-
- 'npm install'
3+
- "10"
4+
- "6"
5+
cache: yarn
6+
deploy:
7+
local_dir: docs
8+
provider: pages
9+
skip_cleanup: true
10+
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
11+
on:
12+
branch: master
13+
condition: '"$TRAVIS_JOB_NUMBER" == *.1'
14+
before_install: yarn global add greenkeeper-lockfile@1
15+
before_script:
16+
- greenkeeper-lockfile-update
17+
# true needs to be removed after https://github.com/conventional-changelog/conventional-github-releaser/pull/47 is fixed
18+
- 'if [[ -n "$TRAVIS_TAG" ]] && [[ "$TRAVIS_JOB_NUMBER" == *.1 ]]; then yarn run create-github-release || true; fi'
619
script:
7-
- npm run build
8-
- npm test
20+
- yarn run lint
21+
- yarn test -- --ci --coverage
22+
- 'if [[ "$TRAVIS_JOB_NUMBER" == *.1 ]]; then yarn run build:storybook; fi'
23+
after_script: greenkeeper-lockfile-upload
24+
after_success:
25+
- bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)