Skip to content

Commit

Permalink
feat: add new accepted linting rules for functional components and mo…
Browse files Browse the repository at this point in the history
…dule imports (#265)

* feat: add new accepted linting rules for functional components and module imports
  • Loading branch information
BilalQamar95 authored Oct 24, 2022
1 parent 3a415fc commit ceea036
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ module.exports = createConfig('eslint', {
'import/no-dynamic-require': 'off',
'global-require': 'off',
'no-template-curly-in-string': 'off',
'import/no-import-module-export': 'off',
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }],
},
});
2 changes: 2 additions & 0 deletions config/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ module.exports = {
components: ['Link'],
specialLink: ['to'],
}],
'import/no-import-module-export': 'off',
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }],
},
globals: {
newrelic: false,
Expand Down
1 change: 1 addition & 0 deletions example/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import appleImg from './apple.jpg';

import './style.scss';

// eslint-disable-next-line react/function-component-definition
export default function App() {
const newEnglandApples = ['macintosh', 'granny smith'];
const allApples = [...newEnglandApples, 'fuji', 'golden delicious'];
Expand Down

0 comments on commit ceea036

Please sign in to comment.