Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Reformat after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ismail-syed committed Oct 24, 2017
1 parent 032cf31 commit eca636a
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 37 deletions.
18 changes: 7 additions & 11 deletions lib/config/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ module.exports = {

plugins: ['mocha', 'chai-expect', 'shopify'],

rules: merge(
require('./rules/mocha'),
require('./rules/chai-expect'),
{
'shopify/sinon-prefer-meaningful-assertions': 'error',
// Chai expect syntax produces unused expression warnings
'no-unused-expressions': 'off',
// Chai expect syntax can have long chained calls
'newline-per-chained-call': 'off',
}
),
rules: merge(require('./rules/mocha'), require('./rules/chai-expect'), {
'shopify/sinon-prefer-meaningful-assertions': 'error',
// Chai expect syntax produces unused expression warnings
'no-unused-expressions': 'off',
// Chai expect syntax can have long chained calls
'newline-per-chained-call': 'off',
}),
};
11 changes: 5 additions & 6 deletions lib/config/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ module.exports = {

plugins: ['react', 'jsx-a11y'],

rules: merge(
require('./rules/react'),
require('./rules/jsx-a11y'),
{
// Not using `this` is fine in some lifecycle hooks
'class-methods-use-this': ['error', {
rules: merge(require('./rules/react'), require('./rules/jsx-a11y'), {
// Not using `this` is fine in some lifecycle hooks
'class-methods-use-this': [
'error',
{
exceptMethods: [
'render',
'getChildContext',
Expand Down
8 changes: 2 additions & 6 deletions lib/config/rules/best-practices.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ module.exports = {
// Require return statements to either always or never specify values
'consistent-return': 'error',
// Specify curly brace conventions for all control statements
<<<<<<< HEAD
'curly': ['error', 'all'],
=======
curly: ['warn', 'all'],
>>>>>>> Run eslint --fix with prettier config
curly: ['error', 'all'],
// Require default case in switch statements
'default-case': 'off',
// Encourages use of dot notation whenever possible
Expand Down Expand Up @@ -147,5 +143,5 @@ module.exports = {
// Require immediate function invocation to be wrapped in parentheses
'wrap-iife': ['error', 'inside'],
// Require or disallow Yoda conditions
'yoda': ['error', 'never'],
yoda: ['error', 'never'],
};
12 changes: 6 additions & 6 deletions lib/config/rules/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ module.exports = {
// Ensure consistent use of file extension within the import path
'import/extensions': ['error', {js: 'never', json: 'always'}],
// Enforce a convention in module import order
'import/order': ['error', {
groups: [
['builtin', 'external'],
['internal', 'parent', 'sibling'],
],
}],
'import/order': [
'error',
{
groups: [['builtin', 'external'], ['internal', 'parent', 'sibling']],
},
],
// Enforce a newline after import statements
'import/newline-after-import': 'error',
// Prefer a default export if module exports a single name
Expand Down
23 changes: 15 additions & 8 deletions lib/config/rules/stylistic-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ module.exports = {
// Blacklist certain identifiers to prevent them being used
'id-blacklist': 'off',
// This option enforces minimum and maximum identifier lengths (variable names, property names etc.)
'id-length': ['error', {
min: 2,
properties: 'always',
exceptions: ['x', 'y', 'i', 'j', 't', '_', '$'],
}],
'id-length': [
'error',
{
min: 2,
properties: 'always',
exceptions: ['x', 'y', 'i', 'j', 't', '_', '$'],
},
],
// Require identifiers to match the provided regular expression
'id-match': 'off',
// Disable eslint v4 stricter indent rules
Expand Down Expand Up @@ -130,7 +133,11 @@ module.exports = {
// Require assignment operator shorthand where possible or prohibit it entirely
'operator-assignment': ['error', 'always'],
// Enforce operators to be placed before or after line breaks
'operator-linebreak': ['error', 'after', {overrides: {'?': 'before', ':': 'before'}}],
'operator-linebreak': [
'error',
'after',
{overrides: {'?': 'before', ':': 'before'}},
],
// Enforce padding within blocks
'padded-blocks': 'off',
// require or disallow padding lines between statements
Expand All @@ -142,15 +149,15 @@ module.exports = {
// Require quotes around object literal property names
'quote-props': ['error', 'as-needed'],
// Specify whether backticks, double or single quotes should be used
'quotes': ['error', 'single', 'avoid-escape'],
quotes: ['error', 'single', 'avoid-escape'],
// Require JSDoc comments
'require-jsdoc': 'off',
// Enforce spacing before and after semicolons
'semi-spacing': ['error', {before: false, after: true}],
// enforce location of semicolons
'semi-style': ['error', 'last'],
// Require or disallow use of semicolons instead of ASI
'semi': ['error', 'always'],
semi: ['error', 'always'],
// Requires object keys to be sorted
'sort-keys': 'off',
// Sort variables within the same declaration block
Expand Down

0 comments on commit eca636a

Please sign in to comment.