run prettier(2.0.5) (#1438)

This commit is contained in:
Severiano Badajoz
2020-05-04 10:26:42 -07:00
committed by GitHub
parent b255e32548
commit 6cccc41c0f
118 changed files with 1979 additions and 1584 deletions
+3 -3
View File
@@ -3,7 +3,7 @@ module.exports = {
cacheDirectory: true,
presets: [
["modern-browsers", { loose: true, modules: false }],
"@babel/preset-react"
"@babel/preset-react",
],
plugins: [
"@babel/plugin-proposal-function-bind",
@@ -11,6 +11,6 @@ module.exports = {
["@babel/plugin-proposal-class-properties", { loose: true }],
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator"
]
"@babel/plugin-proposal-nullish-coalescing-operator",
],
};
+3 -3
View File
@@ -2,7 +2,7 @@ module.exports = {
babelrc: false,
presets: [
["modern-browsers", { loose: true, modules: false }],
"@babel/preset-react"
"@babel/preset-react",
],
plugins: [
"@babel/plugin-proposal-function-bind",
@@ -12,6 +12,6 @@ module.exports = {
"@babel/plugin-transform-react-constant-elements",
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator"
]
"@babel/plugin-proposal-nullish-coalescing-operator",
],
};
+9 -9
View File
@@ -9,8 +9,8 @@ module.exports = {
sourceType: "module",
ecmaFeatures: {
jsx: true,
generators: true
}
generators: true,
},
},
rules: {
"no-magic-numbers": "off",
@@ -26,7 +26,7 @@ module.exports = {
"operator-linebreak": [
"error",
"after",
{ overrides: { "?": "before", ":": "before" } }
{ overrides: { "?": "before", ":": "before" } },
],
"no-console": "off",
"spaced-comment": ["error", "always", { exceptions: ["*"] }],
@@ -35,13 +35,13 @@ module.exports = {
"react/prop-types": [0],
"space-before-function-paren": "off",
"function-paren-newline": "off",
"prefer-destructuring": ["error", { object: true, array: false }]
"prefer-destructuring": ["error", { object: true, array: false }],
},
overrides: [
{
files: ["**/*.test.js"],
env: {
jest: true // now **/*.test.js files' env has both es6 *and* jest
jest: true, // now **/*.test.js files' env has both es6 *and* jest
},
// Can't extend in overrides: https://github.com/eslint/eslint/issues/8813
// "extends": ["plugin:jest/recommended"]
@@ -51,8 +51,8 @@ module.exports = {
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error"
}
}
]
"jest/valid-expect": "error",
},
},
],
};
@@ -18,7 +18,7 @@ module.exports = {
path: path.resolve("build"),
pathinfo: true,
filename: "static/js/bundle.js",
publicPath: "/"
publicPath: "/",
},
module: {
rules: [
@@ -26,7 +26,7 @@ module.exports = {
test: /\.js$/,
include: src,
loader: "babel-loader",
options: babelOptions
options: babelOptions,
},
{
test: /\.css$/,
@@ -34,29 +34,29 @@ module.exports = {
exclude: [path.resolve(src, "index.css")],
loader: [
{
loader: "style-loader"
loader: "style-loader",
},
{
loader: "css-loader",
options: {
modules: {
localIdentName: "[name]__[local]___[hash:base64:5]"
}
}
}
]
localIdentName: "[name]__[local]___[hash:base64:5]",
},
},
},
],
},
{
test: /index\.css$/,
include: [path.resolve(src, "index.css")],
loader: [
{
loader: "style-loader"
loader: "style-loader",
},
{
loader: "css-loader"
}
]
loader: "css-loader",
},
],
},
{ test: /\.json$/, include: [src, nodeModules], loader: "json-loader" },
@@ -64,14 +64,14 @@ module.exports = {
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2|otf)$/i,
loader: "file-loader",
include: [nodeModules, fonts],
query: { name: "static/assets/[name].[ext]" }
}
]
query: { name: "static/assets/[name].[ext]" },
},
],
},
plugins: [
new HtmlWebpackPlugin({
inject: true,
template: path.resolve("index.html")
template: path.resolve("index.html"),
}),
new FaviconsWebpackPlugin({
logo: "./favicon.png",
@@ -84,16 +84,18 @@ module.exports = {
coast: false,
firefox: false,
windows: false,
yandex: false
}
}
yandex: false,
},
},
}),
new webpack.NoEmitOnErrorsPlugin(),
new webpack.DefinePlugin({
__REACT_DEVTOOLS_GLOBAL_HOOK__: "({ isDisabled: true })"
__REACT_DEVTOOLS_GLOBAL_HOOK__: "({ isDisabled: true })",
}),
new webpack.DefinePlugin({
"process.env.CXG_SERVER_PORT": JSON.stringify(process.env.CXG_SERVER_PORT)
})
]
"process.env.CXG_SERVER_PORT": JSON.stringify(
process.env.CXG_SERVER_PORT
),
}),
],
};