feature: add eres and setup async-await
This commit is contained in:
parent
b828df8f1a
commit
79cc2899d0
19
.babelrc
19
.babelrc
|
@ -1,11 +1,8 @@
|
|||
{
|
||||
"presets": [
|
||||
"@babel/preset-env",
|
||||
"@babel/preset-react",
|
||||
"@babel/preset-flow"
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"@babel/plugin-proposal-object-rest-spread"
|
||||
]
|
||||
}
|
||||
{
|
||||
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-flow"],
|
||||
"plugins": [
|
||||
"@babel/plugin-transform-regenerator",
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"@babel/plugin-proposal-object-rest-spread"
|
||||
]
|
||||
}
|
||||
|
|
95
.eslintrc
95
.eslintrc
|
@ -1,47 +1,48 @@
|
|||
{
|
||||
"parser": "babel-eslint",
|
||||
"extends": ["airbnb", "plugin:flowtype/recommended"],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"mocha": true,
|
||||
"jest/globals": true
|
||||
},
|
||||
"plugins": ["flowtype", "jest"],
|
||||
"settings": {
|
||||
"flowtype": {
|
||||
"onlyFilesWithFlowAnnotation": true
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"jsx-quotes": ["error", "prefer-single"],
|
||||
"import/prefer-default-export": ["off"],
|
||||
"react/jsx-filename-extension": [1, { "extensions": [".js"] }],
|
||||
"jsx-a11y/anchor-is-valid": [
|
||||
"error",
|
||||
{
|
||||
"components": ["Link"],
|
||||
"specialLink": ["to", "hrefLeft", "hrefRight"],
|
||||
"aspects": ["noHref", "invalidHref", "preferButton"]
|
||||
}
|
||||
],
|
||||
"jsx-a11y/no-autofocus": [
|
||||
0,
|
||||
{
|
||||
"ignoreNonDOM": true
|
||||
}
|
||||
],
|
||||
"max-len": [
|
||||
"error",
|
||||
{
|
||||
"code": 120,
|
||||
"tabWidth": 2,
|
||||
"ignoreUrls": true,
|
||||
"ignoreComments": true,
|
||||
"ignoreStrings": true,
|
||||
"ignorePattern": "<p[^>]*>.*?</p>",
|
||||
"ignoreTrailingComments": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
"parser": "babel-eslint",
|
||||
"extends": ["airbnb", "plugin:flowtype/recommended"],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"mocha": true,
|
||||
"jest/globals": true
|
||||
},
|
||||
"plugins": ["flowtype", "jest"],
|
||||
"settings": {
|
||||
"flowtype": {
|
||||
"onlyFilesWithFlowAnnotation": true
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"jsx-quotes": ["error", "prefer-single"],
|
||||
"import/prefer-default-export": ["off"],
|
||||
"react/jsx-filename-extension": [1, { "extensions": [".js"] }],
|
||||
"jsx-a11y/anchor-is-valid": [
|
||||
"error",
|
||||
{
|
||||
"components": ["Link"],
|
||||
"specialLink": ["to", "hrefLeft", "hrefRight"],
|
||||
"aspects": ["noHref", "invalidHref", "preferButton"]
|
||||
}
|
||||
],
|
||||
"jsx-a11y/no-autofocus": [
|
||||
0,
|
||||
{
|
||||
"ignoreNonDOM": true
|
||||
}
|
||||
],
|
||||
"max-len": [
|
||||
"error",
|
||||
{
|
||||
"code": 120,
|
||||
"tabWidth": 2,
|
||||
"ignoreUrls": true,
|
||||
"ignoreComments": true,
|
||||
"ignoreStrings": true,
|
||||
"ignorePattern": "<p[^>]*>.*?</p>",
|
||||
"ignoreTrailingComments": true
|
||||
}
|
||||
],
|
||||
"consistent-return": 0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ const autoprefixer = require('autoprefixer');
|
|||
|
||||
module.exports = {
|
||||
entry: {
|
||||
index: './app/index.js',
|
||||
index: ['@babel/polyfill', './app/index.js'],
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [new UglifyJSPlugin({ sourceMap: true })],
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"@babel/core": "^7.0.0",
|
||||
"@babel/plugin-proposal-class-properties": "^7.0.0",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
|
||||
"@babel/plugin-transform-regenerator": "^7.0.0",
|
||||
"@babel/preset-env": "^7.0.0",
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
|
@ -83,9 +84,11 @@
|
|||
"webpack-dev-server": "^3.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/polyfill": "^7.0.0",
|
||||
"@babel/register": "^7.0.0",
|
||||
"autoprefixer": "^9.3.1",
|
||||
"connected-react-router": "^5.0.1",
|
||||
"eres": "^1.0.1",
|
||||
"got": "^9.3.2",
|
||||
"history": "^4.7.2",
|
||||
"p-queue": "^3.0.0",
|
||||
|
|
|
@ -694,7 +694,7 @@
|
|||
"@babel/helper-regex" "^7.0.0"
|
||||
regexpu-core "^4.1.3"
|
||||
|
||||
"@babel/polyfill@7.0.0":
|
||||
"@babel/polyfill@7.0.0", "@babel/polyfill@^7.0.0":
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.0.0.tgz#c8ff65c9ec3be6a1ba10113ebd40e8750fb90bff"
|
||||
integrity sha512-dnrMRkyyr74CRelJwvgnnSUDh2ge2NCTyHVwpOdvRMHtJUyxLtMAfhBN3s64pY41zdw0kgiLPh6S20eb1NcX6Q==
|
||||
|
@ -5053,6 +5053,11 @@ env-paths@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-1.0.0.tgz#4168133b42bb05c38a35b1ae4397c8298ab369e0"
|
||||
integrity sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=
|
||||
|
||||
eres@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/eres/-/eres-1.0.1.tgz#6e533359532f78fb8aa00d910df0279431b9f3a4"
|
||||
integrity sha512-y+Ku9iH8Mk5tq4YQOBo/A/XYmvy57itDGq+lRRm8RU7uy9iNT8h3Xh3dpr9Qo9Z+4D6WdskIDbJVwVZJ3wjpyQ==
|
||||
|
||||
errno@^0.1.1, errno@^0.1.3, errno@~0.1.7:
|
||||
version "0.1.7"
|
||||
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618"
|
||||
|
|
Loading…
Reference in New Issue