Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit 8431431

Browse files
authored
Merge pull request #192 from streamr-dev/5.x
Streamr Client 5.0.0
2 parents 3133990 + fb3eed1 commit 8431431

File tree

168 files changed

+89982
-13536
lines changed

Some content is hidden

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

168 files changed

+89982
-13536
lines changed

.babel.config.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = {
2+
presets: [
3+
['@babel/preset-env', {
4+
useBuiltIns: 'usage',
5+
corejs: 3,
6+
loose: false,
7+
bugfixes: true,
8+
shippedProposals: true,
9+
targets: {
10+
browsers: [
11+
'supports async-functions',
12+
'supports cryptography',
13+
'supports es6',
14+
'supports async-iterations-and-generators',
15+
'not dead',
16+
'not ie <= 11',
17+
'not ie_mob <= 11'
18+
]
19+
},
20+
exclude: ['transform-regenerator', '@babel/plugin-transform-regenerator']
21+
}],
22+
['@babel/preset-typescript']
23+
],
24+
plugins: [
25+
"add-module-exports",
26+
['@babel/plugin-transform-runtime', {
27+
corejs: 3,
28+
helpers: true,
29+
regenerator: false
30+
}],
31+
"@babel/plugin-transform-modules-commonjs",
32+
['@babel/plugin-proposal-class-properties', {
33+
loose: false
34+
}]
35+
]
36+
}

.babel.node.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module.exports = {
2+
presets: [
3+
['@babel/preset-env', {
4+
useBuiltIns: 'usage',
5+
modules: false,
6+
corejs: 3,
7+
loose: false,
8+
bugfixes: true,
9+
shippedProposals: true,
10+
targets: {
11+
node: true
12+
}
13+
}],
14+
['@babel/preset-typescript']
15+
],
16+
plugins: [
17+
'add-module-exports',
18+
['@babel/plugin-transform-runtime', {
19+
useESModules: false,
20+
corejs: 3,
21+
helpers: true,
22+
regenerator: false
23+
}],
24+
'@babel/plugin-transform-modules-commonjs',
25+
['@babel/plugin-proposal-class-properties', {
26+
loose: false
27+
}]
28+
]
29+
}

.babelrc

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

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@ node_modules/**
22
examples/**
33
coverage/**
44
dist/**
5+
test/legacy/**
56
src/shim/**
67
test/unit/StubbedStreamrClient.js
8+
streamr-docker-dev/**
9+
vendor/**
10+
test/exports/**

.eslintrc.js

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
plugins: [
4+
'@typescript-eslint'
5+
],
26
extends: [
37
'streamr-nodejs'
48
],
9+
parserOptions: {
10+
ecmaVersion: 2020,
11+
ecmaFeatures: {
12+
modules: true
13+
}
14+
},
15+
env: {
16+
browser: true,
17+
es6: true
18+
},
519
rules: {
620
'max-len': ['warn', {
721
code: 150
@@ -19,11 +33,32 @@ module.exports = {
1933
}
2034
],
2135
'prefer-destructuring': 'warn',
22-
36+
'object-curly-newline': 'off',
37+
'no-continue': 'off',
38+
'max-classes-per-file': 'off', // javascript is not java
2339
// TODO check all errors/warnings and create separate PR
2440
'promise/always-return': 'warn',
2541
'promise/catch-or-return': 'warn',
2642
'require-atomic-updates': 'warn',
27-
'promise/param-names': 'warn'
43+
'promise/param-names': 'warn',
44+
'no-restricted-syntax': [
45+
'error', 'ForInStatement', 'LabeledStatement', 'WithStatement'
46+
],
47+
'import/extensions': ['error', 'never', { json: 'always' }],
48+
'lines-between-class-members': 'off',
49+
'padded-blocks': 'off',
50+
'no-use-before-define': 'off',
51+
'import/order': 'off',
52+
'no-shadow': 'off',
53+
'@typescript-eslint/no-shadow': 'error',
54+
'no-unused-vars': 'off',
55+
'@typescript-eslint/no-unused-vars': ['error'],
56+
},
57+
settings: {
58+
'import/resolver': {
59+
node: {
60+
extensions: ['.js', '.ts']
61+
}
62+
}
2863
}
2964
}

0 commit comments

Comments
 (0)