chore(eslint): restrict compute-core subpath imports to local-runtime
This commit is contained in:
parent
55acf05ad6
commit
057d2a4e32
1 changed files with 19 additions and 0 deletions
|
|
@ -11,6 +11,25 @@ const compat = new FlatCompat({
|
||||||
|
|
||||||
const eslintConfig = [
|
const eslintConfig = [
|
||||||
...compat.extends("next/core-web-vitals", "next/typescript"),
|
...compat.extends("next/core-web-vitals", "next/typescript"),
|
||||||
|
{
|
||||||
|
rules: {
|
||||||
|
"no-restricted-imports": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
patterns: [
|
||||||
|
{
|
||||||
|
group: [
|
||||||
|
"@openreader/compute-core/*",
|
||||||
|
"!@openreader/compute-core/local-runtime",
|
||||||
|
],
|
||||||
|
message:
|
||||||
|
"Use '@openreader/compute-core' root imports for light APIs. The only allowed subpath is '@openreader/compute-core/local-runtime'.",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default eslintConfig;
|
export default eslintConfig;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue