mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 03:32:54 -05:00
♻️ (eslint) disallow importing actual-app/web in loot-core (#4347)
This commit is contained in:
committed by
GitHub
parent
7d9190ea9c
commit
be1c194eb4
@@ -671,7 +671,6 @@ export default [
|
||||
},
|
||||
{
|
||||
files: ['packages/loot-core/src/**/*'],
|
||||
|
||||
rules: {
|
||||
'no-restricted-imports': [
|
||||
'warn',
|
||||
@@ -691,6 +690,10 @@ export default [
|
||||
message:
|
||||
'Please use relative imports in loot-core instead of importing from `loot-core/*`',
|
||||
},
|
||||
{
|
||||
group: ['@actual-app/web/*'],
|
||||
message: 'Please do not import `@actual-app/web` in `loot-core`',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// eslint-disable-next-line no-restricted-imports -- fix me -- do not import @actual-app/web in loot-core
|
||||
import { setI18NextLanguage } from '@actual-app/web/src/i18n';
|
||||
|
||||
import { send } from '../../platform/client/fetch';
|
||||
|
||||
@@ -8,6 +8,7 @@ import React, {
|
||||
useState,
|
||||
} from 'react';
|
||||
|
||||
// eslint-disable-next-line no-restricted-imports -- fix me -- do not import @actual-app/web in loot-core
|
||||
import { useSyncedPref } from '@actual-app/web/src/hooks/useSyncedPref';
|
||||
|
||||
import { q, type Query } from '../../shared/query';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useEffect, useRef, useState, useMemo, useCallback } from 'react';
|
||||
|
||||
// eslint-disable-next-line no-restricted-imports -- fix me -- do not import @actual-app/web in loot-core
|
||||
import { useSyncedPref } from '@actual-app/web/src/hooks/useSyncedPref';
|
||||
import * as d from 'date-fns';
|
||||
import debounce from 'lodash/debounce';
|
||||
|
||||
6
upcoming-release-notes/4347.md
Normal file
6
upcoming-release-notes/4347.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Maintenance
|
||||
authors: [MatissJanis]
|
||||
---
|
||||
|
||||
Disallow importing `@actual-app/web` in `loot-core` - circular dependencies.
|
||||
Reference in New Issue
Block a user