mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-10-03 18:07:21 +03:00
Lint rule to prevent imports of modules from lib/* (#2604)
Summary: Adds a lint rule that rejects imports such as the following: ```js import ECMAScriptSourceFunctionValue from "../../lib/values/ECMAScriptSourceFunctionValue.js"; ``` The path should contain `src` instead of `lib`. Pull Request resolved: https://github.com/facebook/prepack/pull/2604 Differential Revision: D10432286 Pulled By: sb98052 fbshipit-source-id: 55542de99643a7bf49f8a290a35af35f9b795c7b
This commit is contained in:
parent
7207bfd361
commit
f97ccf38d5
@ -218,6 +218,11 @@
|
||||
"parser": "flow",
|
||||
"trailingComma": "es5",
|
||||
"printWidth": 120,
|
||||
}],
|
||||
|
||||
// Reject imports from lib/*
|
||||
"no-restricted-imports": ["error", {
|
||||
"patterns": ["**/../lib/**"]
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
5
scripts/.eslintrc
Normal file
5
scripts/.eslintrc
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"no-restricted-imports": "off"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user