-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
README.md
Outdated
|
||
## Supported Rules | ||
|
||
* `@lokalise/package-boundary`: Ensures all the imports and exports happen trough index. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trough -> through
|
||
![npm](https://img.shields.io/npm/v/@lokalise/eslint-plugin) | ||
![Downloads total](https://img.shields.io/npm/dt/@lokalise/eslint-plugin) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to give a brief explanation of what those rules cover: are they for FE, BE, do they include anything framework-specific? Are they completely standalone or are derived from other popular ruleset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe @artursvonda (I think he first built this) could help me elaborate further on this over this document -> https://github.com/lokalise/eslint-plugin/blob/d7f8cc3733800ea642a563838c3b529706547e18/docs/rules/package-boundary.md
package.json
Outdated
"eslint", | ||
"imports", | ||
"boundaries", | ||
"javascript" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no typescript?
We could use code of conduct and contribution guides. Examples that we could use as a base: |
Igor I wasn't thinking in adding all of these already but added a couple of simple ones for the moment. Let me know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, feel free to adapt or ignore.
utils.js
Outdated
import path from 'path'; | ||
|
||
// warms up the module cache. this import takes a while (>500ms) | ||
import 'babel-eslint'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently updating dependencies and this dependency is deprecated so I replaced it with stable one – @babel/eslint-parser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rules/package-boundary.js
Outdated
/** | ||
* This is temporary solution to the rule that's being proposed to `eslint-plugin-import` | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They declined so no longer temporary :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adjusted.
docs/rules/package-boundary.md
Outdated
@@ -0,0 +1,3 @@ | |||
# Package Boundary | |||
|
|||
Ensures all the imports and exports happen through index and not a different file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensures all the imports and exports happen through index and not a different file. | |
Ensures boundaries for modules are enforced. Boundaries are defined by presence of index file in the directory. Anything that can be consumed outside module boundary should be exported from the index file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adjusted.
The intention is not to change heavily existing code. This is just a migration to a new repo so we are able to push this plugin to npm and clean up both Lokalise main app as well as Louis.