'use strict';
const path = require('path');

module.exports = {
	extends: path.join(__dirname, 'index.js'),
	rules: {
		'no-var': 'error',
		'object-shorthand': [
			'error',
			'always'
		],
		'prefer-arrow-callback': [
			'error',
			{
				allowNamedFunctions: true
			}
		],
		'prefer-const': [
			'error',
			{
				destructuring: 'all'
			}
		],
		'prefer-numeric-literals': 'error',
		'prefer-rest-params': 'error',
		'prefer-spread': 'error',
		// TODO: Enable this when targeting Node.js 8
		// 'prefer-object-spread': 'error',
		'prefer-destructuring': [
			'error',
			{
				// `array` is disabled because it forces destructuring on
				// stupid stuff like `foo.bar = process.argv[2];`
				// TODO: Open ESLint issue about this
				VariableDeclarator: {
					array: false,
					object: true
				},
				AssignmentExpression: {
					array: false,

					// Disabled because object assignment destructuring requires parens wrapping:
					// `let foo; ({foo} = object);`
					object: false
				}
			},
			{
				enforceForRenamedProperties: false
			}
		],
		// TODO: Enable these when targeting Node.js 10
		// 'no-useless-catch': 'error',
		// 'prefer-named-capture-group': 'error'
	}
};

@@ -448,59 +448,8 @@
 ,%0A%09%09
-// TODO: Enable this when targeting Node.js 8%0A%09%09// 
 'pre

Enable the `prefer-object-spread` rule