mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-04-19 19:34:00 +01:00
Update abstract-module-paths-and-init-dot-luau.md
This commit is contained in:
parent
f3a0b7d519
commit
74799e2509
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ name of the current source file in order to know what `require('./foo')` will
|
||||||
do, and if a developer renames a file to or from `init.luau`, they will be
|
do, and if a developer renames a file to or from `init.luau`, they will be
|
||||||
forced to rewrite every `require()`.
|
forced to rewrite every `require()`.
|
||||||
|
|
||||||
We can mitigate this with a new lint: If a module is the parent of other
|
We could someday mitigate this with a new lint: If a module is the parent of other
|
||||||
modules, it is poor style for it to directly import sibling or parent modules.
|
modules, it is poor style for it to directly import sibling or parent modules.
|
||||||
Files named `init.luau` should never issue a require that resolves to a sibling
|
Files named `init.luau` should never issue a require that resolves to a sibling
|
||||||
module. In our example, we would warn if `package/init.luau` were to
|
module. In our example, we would warn if `package/init.luau` were to
|
||||||
|
|
Loading…
Add table
Reference in a new issue