Skip to content

Commit

Permalink
Move import/order rule into shared eslint configuration so generated …
Browse files Browse the repository at this point in the history
…projects have to adhere to the rule as well (#4954)

Co-authored-by: Dominic Saadi <dominiceliassaadi@gmail.com>
  • Loading branch information
nickpdemarco and jtoar committed Jun 9, 2022
1 parent 161c460 commit 7cb547b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,6 @@ module.exports = {
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'import/order': [
'error',
{
'newlines-between': 'always',
pathGroupsExcludedImportTypes: ['react'],
pathGroups: [
{
pattern: 'react',
group: 'builtin',
position: 'after',
},
{
pattern: '@redwoodjs/**',
group: 'external',
position: 'after',
},
{
pattern: 'src/lib/test',
group: 'parent',
position: 'before',
},
{
pattern: 'src/**',
group: 'parent',
position: 'before',
},
],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
curly: 'error',
},
overrides: [
Expand Down
33 changes: 33 additions & 0 deletions packages/eslint-config/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,39 @@ module.exports = {
],
'react/display-name': 'off',
'react-hooks/exhaustive-deps': 'warn',
'import/order': [
'error',
{
'newlines-between': 'always',
pathGroupsExcludedImportTypes: ['react'],
pathGroups: [
{
pattern: 'react',
group: 'builtin',
position: 'after',
},
{
pattern: '@redwoodjs/**',
group: 'external',
position: 'after',
},
{
pattern: 'src/lib/test',
group: 'parent',
position: 'before',
},
{
pattern: 'src/**',
group: 'parent',
position: 'before',
},
],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
},
overrides: [
{
Expand Down

0 comments on commit 7cb547b

Please sign in to comment.