-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix config definitions after changing from plugin to config type
- Loading branch information
Showing
9 changed files
with
142 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
module.exports = { | ||
plugins: ['lodash'], | ||
extends: [ | ||
'plugin:prettier/recommended', | ||
], | ||
parser: 'babel-eslint', | ||
rules: { | ||
// No need to convert between OS platforms | ||
'linebreak-style': 'off', | ||
'require-await': 'error', | ||
// Allow dev dependencies to be explicitly required in tools and such | ||
'import/no-extraneous-dependencies': ['error', { 'devDependencies': true }], | ||
// Allow mongo id fields | ||
'no-underscore-dangle': ['error', { 'allow': ['_id'] }], | ||
// Allow functions to be defined anywhere | ||
'no-use-before-define': ['error', { 'functions': false, 'classes': true, 'variables': true }], | ||
'padding-line-between-statements': [ | ||
'error', | ||
{ | ||
'blankLine': 'always', | ||
'prev': ['block', 'block-like', 'cjs-export', 'class', 'export', 'import'], | ||
'next': '*' | ||
}, | ||
{ 'blankLine': 'any', 'prev': ['export', 'import'], 'next': ['export', 'import'] } | ||
], | ||
// Allow not to destructure an object when assigning to an already existing variable | ||
'prefer-destructuring': [ | ||
'error', | ||
{ | ||
'VariableDeclarator': { 'array': true, 'object': true }, | ||
'AssignmentExpression': { 'array': true, 'object': false } | ||
}, | ||
{ enforceForRenamedProperties: false, } | ||
], | ||
'lodash/import-scope': ['error', 'method'], | ||
'lodash/prefer-compact': 'error', | ||
'lodash/prefer-immutable-method': 'error', | ||
'lodash/prefer-is-nil': 'error', | ||
'lodash/prefer-lodash-typecheck': 'error', | ||
'lodash/prefer-noop': 'error', | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module.exports = { | ||
plugins: [ | ||
'jest', | ||
'jest-formatting' | ||
], | ||
extends: [ | ||
'plugin:jest/recommended', | ||
'plugin:jest/style', | ||
'plugin:jest-formatting/recommended' | ||
], | ||
env: { | ||
'jest/globals': false | ||
}, | ||
rules: { | ||
// Allow padding before beforeAll and beforeEach blocks as we often declare variables there to be initialised within the block | ||
'jest-formatting/padding-around-before-all-blocks': 'off', | ||
'jest-formatting/padding-around-before-each-blocks': 'off' | ||
}, | ||
overrides: [ | ||
{ | ||
files: [ | ||
'setupTests.js', | ||
'test-setup-*.browser.js', | ||
'**/*.spec.js', | ||
'**/__mocks__/**', | ||
'**/__test_helpers__/**', | ||
'**/__tests__/**', | ||
'**/__TESTS__/**' | ||
], | ||
env: { | ||
'jest/globals': true | ||
}, | ||
rules: { | ||
// Allow inline require() when using doMock conventions | ||
'global-require': 'off', | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
extends: [ | ||
'@heed/heed/react', | ||
'airbnb/hooks' | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
plugins: ['react-native'], | ||
extends: [ | ||
'@heed/heed/react' | ||
], | ||
rules: { | ||
// Asset requiring uses inline require() calls | ||
'global-require': 'off', | ||
// Primarily for StyleSheet definitions since the convention is to define them after the component | ||
'no-use-before-define': ['error', { 'functions': true, 'classes': true, 'variables': false }], | ||
'react/jsx-filename-extension': ['error', { 'extensions': ['.js', '.jsx'] }], | ||
'react-native/no-unused-styles': 'error', | ||
'react-native/no-inline-styles': 'error', | ||
'react-native/no-color-literals': 'error', | ||
}, | ||
env: { | ||
'react-native/react-native': true | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module.exports = { | ||
extends: [ | ||
'airbnb', | ||
'@heed/heed/base', | ||
'prettier/react', | ||
], | ||
env: { | ||
'browser': true | ||
}, | ||
rules: { | ||
// Allows custom prop type declarations and hoisting common prop types into other variables | ||
'react/no-typos': 'off', | ||
// allow usage of tagged templates such as injectGlobal from styled-components | ||
'no-unused-expressions': ['error', { 'allowTaggedTemplates': true }], | ||
// allow the unsafe lifecycle methods prefixed with UNSAFE_ | ||
'camelcase': ['error', { properties: 'never', ignoreDestructuring: false, allow: ['^UNSAFE_'] }], | ||
// allow spreading jsx props when being used within a hoc | ||
'react/jsx-props-no-spreading': ['error', { 'html': 'enforce', 'custom': 'enforce', 'exceptions': ['WrappedComponent', 'IntegrationWrapper'] }], | ||
}, | ||
settings: { | ||
react: { | ||
pragma: 'React', | ||
version: 'detect' | ||
} | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
extends: [ | ||
'airbnb-base', | ||
'@heed/heed/base' | ||
], | ||
} |
Oops, something went wrong.