Skip to content

Commit

Permalink
refactor: Refactor shared configuration into shared folder
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfin46 committed Oct 17, 2019
1 parent e3d6552 commit 856bd50
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 25 deletions.
2 changes: 1 addition & 1 deletion react-hooks.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
extends: [
'@heed/heed/react',
'./shared/react',
'airbnb/hooks'
],
}
2 changes: 1 addition & 1 deletion react-native.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
plugins: ['react-native'],
extends: [
'@heed/heed/react'
'./shared/react'
],
rules: {
// Asset requiring uses inline require() calls
Expand Down
23 changes: 1 addition & 22 deletions react.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
module.exports = {
extends: [
'airbnb',
'@heed/heed/base',
'prettier/react',
'./shared/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'
}
},
}
2 changes: 1 addition & 1 deletion recommended.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
extends: [
'airbnb-base',
'@heed/heed/base'
'./shared/core'
],
}
File renamed without changes.
26 changes: 26 additions & 0 deletions shared/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
extends: [
'airbnb',
'./core',
'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'
}
},
}

0 comments on commit 856bd50

Please sign in to comment.