Skip to content

Commit

Permalink
revert ESlint prefer-object-spread
Browse files Browse the repository at this point in the history
  • Loading branch information
axelssonHakan committed Aug 19, 2019
1 parent 119ecef commit 711d75a
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Expand Up @@ -53,7 +53,8 @@
"no-plusplus": 0,
"no-new": 0,
"import/no-unresolved": 0,
"max-classes-per-file": 0
"max-classes-per-file": 0,
"prefer-object-spread": 0
},
"extends": ["airbnb"]
}
5 changes: 2 additions & 3 deletions commands/cdp/src/index.js
Expand Up @@ -25,17 +25,16 @@ const cdp = {
let config = {};
const foundConfig = require(configPath);
if (typeof foundConfig === 'function') {
config = { ...foundConfig() };
config = Object.assign({}, foundConfig());
} else {
config = { ...foundConfig };
config = Object.assign({}, foundConfig);
}
return config;
})
.coerce('babel', utils.coerceBabel)
.coerce('transform', opt => {
const exclude = [...new Set(opt.defaultExclude.concat(opt.exclude))];
opt.testExclude = testExclude({ include: opt.include, exclude });
// eslint-disable-next-line prefer-object-spread
opt.typescript.compilerOptions = Object.assign(
{ compilerOptions: {} },
importCwd.silent(path.resolve(opt.typescript.config)),
Expand Down
4 changes: 2 additions & 2 deletions commands/node/src/index.js
Expand Up @@ -264,9 +264,9 @@ const configure = configPath => {
let config = {};
const foundConfig = require(configPath);
if (typeof foundConfig === 'function') {
config = { ...foundConfig() };
config = Object.assign({}, foundConfig());
} else {
config = { ...foundConfig };
config = Object.assign({}, foundConfig);
}
return config;
};
Expand Down
2 changes: 1 addition & 1 deletion commands/puppeteer/src/index.js
Expand Up @@ -8,7 +8,7 @@ const nodeOptions = require('@after-work.js/node/src/options');
const utils = require('@after-work.js/utils');
const puppetOptions = require('./options');

const options = { ...nodeOptions, ...puppetOptions };
const options = Object.assign({}, nodeOptions, puppetOptions);

class PuppetRunner extends Runner {
constructor(puppeteer, argv, libs) {
Expand Down
4 changes: 2 additions & 2 deletions commands/serve/src/index.js
Expand Up @@ -29,9 +29,9 @@ const server = {
let config = {};
const foundConfig = require(configPath);
if (typeof foundConfig === 'function') {
config = { ...foundConfig() };
config = Object.assign({}, foundConfig());
} else {
config = { ...foundConfig };
config = Object.assign({}, foundConfig);
}
return config;
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -33,7 +33,7 @@
"babel-plugin-istanbul": "5.2.0",
"coveralls": "3.0.6",
"eslint": "6.1.0",
"eslint-config-airbnb": "18.0.1",
"eslint-config-airbnb": "17.1.1",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.14.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/proxies.js
Expand Up @@ -22,7 +22,7 @@ const normalize = options => Object.keys(options).map(context => {
target: options.proxy[context],
};
} else {
proxyOptions = { ...options.proxy[context] };
proxyOptions = Object.assign({}, options.proxy[context]);
proxyOptions.context = correctedContext;
}
proxyOptions.logLevel = proxyOptions.logLevel || 'warn';
Expand Down
2 changes: 1 addition & 1 deletion packages/transform/src/index.js
Expand Up @@ -109,7 +109,7 @@ function transformFile(filename, argv, content = null) {
argv,
);
content = tsContent;
babelOpts = { ...babelOpts, ...tsBabelOpts };
babelOpts = Object.assign({}, babelOpts, tsBabelOpts);
}
babelOpts.ast = false;
const { babel } = argv.babel;
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Expand Up @@ -3853,7 +3853,7 @@ config-chain@^1.1.11:
ini "^1.3.4"
proto-list "~1.2.1"

confusing-browser-globals@^1.0.7:
confusing-browser-globals@^1.0.5:
version "1.0.8"
resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.8.tgz#93ffec1f82a6e2bf2bc36769cc3a92fa20e502f3"
integrity sha512-lI7asCibVJ6Qd3FGU7mu4sfG4try4LX3+GVS+Gv8UlrEf2AeW57piecapnog2UHZSbcX/P/1UDWVaTsblowlZg==
Expand Down Expand Up @@ -4832,21 +4832,21 @@ escodegen@^1.8.0:
optionalDependencies:
source-map "~0.6.1"

eslint-config-airbnb-base@^14.0.0:
version "14.0.0"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.0.0.tgz#8a7bcb9643d13c55df4dd7444f138bf4efa61e17"
integrity sha512-2IDHobw97upExLmsebhtfoD3NAKhV4H0CJWP3Uprd/uk+cHuWYOczPVxQ8PxLFUAw7o3Th1RAU8u1DoUpr+cMA==
eslint-config-airbnb-base@^13.2.0:
version "13.2.0"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.2.0.tgz#f6ea81459ff4dec2dda200c35f1d8f7419d57943"
integrity sha512-1mg/7eoB4AUeB0X1c/ho4vb2gYkNH8Trr/EgCT/aGmKhhG+F6vF5s8+iRBlWAzFIAphxIdp3YfEKgEl0f9Xg+w==
dependencies:
confusing-browser-globals "^1.0.7"
confusing-browser-globals "^1.0.5"
object.assign "^4.1.0"
object.entries "^1.1.0"

eslint-config-airbnb@18.0.1:
version "18.0.1"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-18.0.1.tgz#a3a74cc29b46413b6096965025381df8fb908559"
integrity sha512-hLb/ccvW4grVhvd6CT83bECacc+s4Z3/AEyWQdIT2KeTsG9dR7nx1gs7Iw4tDmGKozCNHFn4yZmRm3Tgy+XxyQ==
eslint-config-airbnb@17.1.1:
version "17.1.1"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-17.1.1.tgz#2272e0b86bb1e2b138cdf88d07a3b6f4cda3d626"
integrity sha512-xCu//8a/aWqagKljt+1/qAM62BYZeNq04HmdevG5yUGWpja0I/xhqd6GdLRch5oetEGFiJAnvtGuTEAese53Qg==
dependencies:
eslint-config-airbnb-base "^14.0.0"
eslint-config-airbnb-base "^13.2.0"
object.assign "^4.1.0"
object.entries "^1.1.0"

Expand Down

0 comments on commit 711d75a

Please sign in to comment.