Skip to content

Commit

Permalink
refactor(rules): refatorado regras de ordenação
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefelipeschulle committed Nov 10, 2023
1 parent c3e443c commit 054aab4
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"commit:add": "git add .",
"commit:detail": "cz",
"commit:push": "git push",
"commit": "yarn commit:add && yarn commit:detail && yarn commit:push"
"commit": "pnpm commit:add && pnpm commit:detail && pnpm commit:push"
},
"devDependencies": {
"commitizen": "4.3.0",
Expand Down
15 changes: 8 additions & 7 deletions packages/base/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,19 @@ module.exports = {
'no-useless-constructor': 'off',
'no-useless-catch': 'off',
'@typescript-eslint/adjacent-overload-signatures': 'off',
'@typescript-eslint/adjacent-overload-signatures': 'off',
"@typescript-eslint/no-explicit-any": "warn",
'import-helpers/order-imports': [
'warn',
{
newlinesBetween: 'always',
groups: [
'module',
'/@brainylab/',
['/^@modules/', '/^@core/', '/^@shared/'],
['/^@utils/', '/^@service/', '/^@config/'],
['/^@interfaces/', '/^@types/', '/^types/'],
['parent', 'sibling', 'index'],
['type']
['module', 'type'],
['/@brainylab/', 'type'],
['/^@modules/', '/^@core/', '/^@shared/', 'type'],
['/^@utils/', '/^@service/', '/^@config/', 'type'],
['/^@interfaces/', '/^@types/', '/^types/', 'type'],
['parent', 'sibling', 'index', 'type'],
],
alphabetize: { order: 'asc', ignoreCase: true },
},
Expand Down
2 changes: 1 addition & 1 deletion packages/base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brainylab/eslint-config-base",
"version": "0.7.0",
"version": "0.7.1",
"main": "index.js",
"license": "MIT",
"description": "ESLint configuration used by BrainyLab.",
Expand Down
16 changes: 8 additions & 8 deletions packages/next/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ module.exports = {
{
newlinesBetween: 'always',
groups: [
['/^react/', '/^next/'],
'/@brainylab/',
'module',
['/^hooks/', '/^contexts/'],
['/^react/', '/^next/', 'type'],
['/@brainylab/', 'type'],
['module', 'type'],
['/^hooks/', '/^contexts/', 'type'],
[
'/^shared/',
'/^core/',
'/^modules/',
'/^config/',
'/^components/',
'/^layouts/',
'type'
],
['/^utils/', '/^service/'],
['/^interfaces/'],
['parent', 'sibling', 'index'],
['type']
['/^utils/', '/^service/', 'type'],
['/^interfaces/', 'type'],
['parent', 'sibling', 'index', 'type'],
],
alphabetize: { order: 'asc', ignoreCase: true },
},
Expand Down
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brainylab/eslint-config-next",
"version": "0.1.14",
"version": "0.1.15",
"main": "index.js",
"license": "MIT",
"keywords": [
Expand Down
13 changes: 7 additions & 6 deletions packages/react-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ module.exports = {
{
newlinesBetween: 'always',
groups: [
['/^react/', '/^react-native/'],
['/@brainylab/', 'module'],
['/^react/', '/^react-native/', 'type'],
['/@brainylab/', 'module', 'type'],
[
'/^hooks/',
'/^@hooks/',
'/^contexts/',
'/^@contexts/',
'/^reducers/',
'/^@reducers/',
'type'
],
[
'/^database/',
Expand All @@ -30,11 +31,11 @@ module.exports = {
'/^@screens/',
'/^routes/',
'/^@routes/',
'type'
],
['/^utils/', '/^@utils/', '/^services/', '/^@services/'],
['/^interfaces/', '/^@interfaces/'],
['parent', 'sibling', 'index'],
['type']
['/^utils/', '/^@utils/', '/^services/', '/^@services/', 'type'],
['/^interfaces/', '/^@interfaces/', 'type'],
['parent', 'sibling', 'index', 'type'],
],
alphabetize: { order: 'asc', ignoreCase: true },
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brainylab/eslint-config-react-native",
"version": "0.0.7",
"version": "0.0.8",
"main": "index.js",
"license": "MIT",
"keywords": [
Expand Down
18 changes: 8 additions & 10 deletions packages/react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,21 @@ module.exports = {
{
newlinesBetween: 'always',
groups: [
'/^react/',
['/@brainylab/ui-admin/', '/@brainylab/ui-bootstrap/'],
['/@brainylab/ui-material-icons/', '/@brainylab/ui-bootstrap-icons/'],
['/@brainylab/ui-generics/', '/@brainylab/ui-hooks/', '/@brainylab/'],
['module'],
['/^@hooks/'],
['/^react/', 'type'],
['/@brainylab/', 'type'],
['module', 'type'],
['/^@hooks/', 'type'],
[
'/^@shared/',
'/^@core/',
'/^@modules/',
'/^@config/',
'/^@components/',
'type'
],
['/^@utils/', '/^@service/'],
['/^@interfaces/'],
['parent', 'sibling', 'index'],
['type']
['/^@utils/', '/^@service/', 'type'],
['/^@interfaces/', 'type'],
['parent', 'sibling', 'index', 'type'],
],
alphabetize: { order: 'asc', ignoreCase: true },
},
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brainylab/eslint-config-react",
"version": "0.1.37",
"version": "0.1.38",
"main": "index.js",
"license": "MIT",
"keywords": [
Expand All @@ -14,7 +14,7 @@
"url": "git+https://github.com/brainylab/eslint-config"
},
"dependencies": {
"@brainylab/eslint-config-base": "0.7.0",
"@brainylab/eslint-config-base": "0.7.1",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0"
Expand Down

0 comments on commit 054aab4

Please sign in to comment.