Skip to content

Commit

Permalink
feat: add missing rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent C. Dodds committed Jan 17, 2019
1 parent 9183d4e commit 150a179
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

ESLint rules for all of my personal projects. Feel free to use these conventions :-)

<a href="https://app.codesponsor.io/link/PKGFLnhDiFvsUA5P4kAXfiPs/kentcdodds/eslint-config-kentcdodds" rel="nofollow"><img src="https://app.codesponsor.io/embed/PKGFLnhDiFvsUA5P4kAXfiPs/kentcdodds/eslint-config-kentcdodds.svg" style="width: 888px; height: 68px;" alt="Sponsor" /></a>

## Usage

Install the conventions by running:
Expand Down
11 changes: 6 additions & 5 deletions best-practices.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module.exports = {
'no-unused-expressions': 'off',
'no-unused-labels': 'error',
'no-useless-call': 'error',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'no-useless-escape': 'error',
'no-useless-return': 'error',
Expand Down Expand Up @@ -92,11 +93,11 @@ module.exports = {
'no-unused-vars': [
2,
{
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^ignored',
'args': 'after-used',
'ignoreRestSiblings': true
}
argsIgnorePattern: '^_',
varsIgnorePattern: '^ignored',
args: 'after-used',
ignoreRestSiblings: true,
},
],

// CommonJS
Expand Down
5 changes: 5 additions & 0 deletions es6/stylistic.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ module.exports = {
capIsNew: true,
},
],
camelcase: 'off',
'babel/camelcase': ['error', {properties: 'always'}],

'valid-typeof': 'off',
'babel/valid-typeof': 'error',

// no eslint version
'babel/flow-object-type': 'off', // no opinion
Expand Down
5 changes: 5 additions & 0 deletions jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,28 @@ module.exports = {
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/valid-expect': 'error',
'jest/no-alias-methods': 'off',
'jest/no-jest-import': 'error',
'jest/no-large-snapshots': ['warn', {maxSize: 300}],
'jest/no-test-prefixes': 'error',
'jest/prefer-to-contain': 'warn',
'jest/prefer-to-have-length': 'warn',
'jest/valid-describe': 'error',
'jest/valid-expect-in-promise': 'error',
'jest/consistent-test-it': 'off',
'jest/lowercase-name': 'off',
'jest/no-hooks': 'off',
'jest/no-jasmine-globals': 'off',
'jest/no-test-callback': 'off',
'jest/prefer-expect-assertions': 'off',
'jest/prefer-to-be-null': 'off',
'jest/prefer-to-be-undefined': 'off',
'jest/require-tothrow-message': 'off',
'jest/expect-expect': 'off',
'jest/no-test-return-statement': 'off',
'jest/prefer-inline-snapshots': 'off',
'jest/prefer-strict-equal': 'off',
'jest/prefer-spy-on': 'off',
},
env: {
'jest/globals': true,
Expand Down
1 change: 1 addition & 0 deletions react.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module.exports = {
'react/forbid-prop-types': 'off',
'react/jsx-boolean-value': 'off',
'react/jsx-filename-extension': ['error', {extensions: ['.js']}],
'react/jsx-fragments': 'off',
'react/jsx-handler-names': 'off',
'react/jsx-key': 'error',
'react/jsx-no-bind': 'off',
Expand Down

0 comments on commit 150a179

Please sign in to comment.