diff --git a/.eslintrc.cjs b/.eslintrc.cjs index e836ee63..ec979fa4 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -123,6 +123,24 @@ module.exports = { ], }, }, + /* Disable `environment` directory imports for library files */ + { + files: ['./src/lib/**/*.*'], + rules: { + 'no-restricted-imports': [ + 'error', + { + patterns: [ + { + group: ['**/environment/**'], + message: + 'Imports from environment directory are forbidden in the library files.', + }, + ], + }, + ], + }, + }, ], }; diff --git a/src/App.tsx b/src/env/App/App.tsx similarity index 100% rename from src/App.tsx rename to src/env/App/App.tsx diff --git a/src/index.css b/src/env/App/index.css similarity index 100% rename from src/index.css rename to src/env/App/index.css diff --git a/src/main.tsx b/src/main.tsx index b2e3183b..3a404590 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,8 +1,7 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; -import App from './App.tsx'; -import './index.css'; +import App from '@/env/App/App.tsx'; // eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope ReactDOM.createRoot(document.getElementById('root')!).render(