Skip to content

Commit

Permalink
Using lodash-fp, moving mocha eslint rules to the test folder
Browse files Browse the repository at this point in the history
  • Loading branch information
sadasant committed Feb 21, 2017
1 parent fd844e8 commit ec6a947
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 18 deletions.
43 changes: 25 additions & 18 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,30 @@ module.exports = {
plugins: [
'mocha'
],
env: {
mocha: true
},
plugins: [
'lodash-fp'
],
rules: {
// Mocha plugin
'mocha/no-exclusive-tests': 'error',
'mocha/no-skipped-tests': 'error',
'mocha/handle-done-callback': 'error',
'mocha/no-global-tests': 'error',
'mocha/valid-suite-description': 'error',
'mocha/no-sibling-hooks': 'error',

// These two rules are not yet available in codacy
// 'mocha/no-return-and-callback': 'error',
// 'mocha/no-identical-title': 'warn',

// Because of should.be.true and so on
indent: ['error', 4]
indent: ['error', 4],
'lodash-fp/consistent-compose': 'off',
'lodash-fp/consistent-name': [ 'error', '_' ],
'lodash-fp/no-argumentless-calls': 'error',
'lodash-fp/no-chain': 'error',
'lodash-fp/no-extraneous-args': 'error',
'lodash-fp/no-extraneous-function-wrapping': 'error',
'lodash-fp/no-extraneous-iteratee-args': 'error',
'lodash-fp/no-for-each': 'off',
'lodash-fp/no-partial-of-curried': 'error',
'lodash-fp/no-single-composition': 'error',
'lodash-fp/no-submodule-destructuring': 'error',
'lodash-fp/no-unused-result': 'error',
'lodash-fp/prefer-compact': 'error',
'lodash-fp/prefer-composition-grouping': 'error',
'lodash-fp/prefer-constant': [ 'error', { arrowFunctions: false } ],
'lodash-fp/prefer-flat-map': 'error',
'lodash-fp/prefer-get': 'error',
'lodash-fp/prefer-identity': [ 'error', { arrowFunctions: false } ],
'lodash-fp/preferred-alias': 'off',
'lodash-fp/use-fp': 'error'
}
};
}
18 changes: 18 additions & 0 deletions test/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
'extends': 'standard',
plugins: [
'mocha'
],
env: {
mocha: true
},
rules: {
indent: ['error', 4],
'mocha/no-exclusive-tests': 'error',
'mocha/no-skipped-tests': 'error',
'mocha/handle-done-callback': 'error',
'mocha/no-global-tests': 'error',
'mocha/valid-suite-description': 'error',
'mocha/no-sibling-hooks': 'error',
}
}

0 comments on commit ec6a947

Please sign in to comment.