Commit 4f4980c3 authored by Matija Obreza's avatar Matija Obreza
Browse files

I18n: Using relative import paths

parent e95d6af7
......@@ -103,7 +103,7 @@
"import/no-internal-modules": "off",
"import/order": "off",
"indent": [2, 2, {"SwitchCase": 1}],
"no-restricted-imports": ["error", {"patterns": ["./*", "../*"]}],
"no-restricted-imports": ["error", {"patterns": ["../*"]}],
"max-classes-per-file": [
"error",
10
......
import languages from 'data/Languages';
import languages from './data/Languages';
export default function detectLocaleFromPath(virtualPath: string, path: string, index: number) {
if (virtualPath && path.startsWith(virtualPath)) {
......
......@@ -2,9 +2,9 @@
import i18n from 'i18next';
import axios from 'axios';
// eslint-disable-next-line no-restricted-imports
import optionsBase from 'options-base';
import optionsBase from './options-base';
// eslint-disable-next-line no-restricted-imports
import langDetector from 'langDetector';
import langDetector from './langDetector';
import XHR from 'i18next-xhr-backend';
import LanguageDetector from 'i18next-browser-languagedetector';
......
// @ts-ignore
import i18n from 'i18next';
import * as path from 'path';
import optionsBase from 'options-base';
import optionsBase from './options-base';
import Backend from 'i18next-sync-fs-backend';
import { initReactI18next } from 'react-i18next';
......
import detectLocaleFromPath from 'detectLocaleFromPath';
import detectLocaleFromPath from './detectLocaleFromPath';
export default {
name: 'pathStartLangDetector',
......
......@@ -5,12 +5,8 @@
"paths": {
"*": [
"src/*",
"server/*",
"node_modules/*"
],
"@gringlobal/client/*": [
"../client/src/*"
],
]
},
"outDir": "./lib",
"module": "esnext",
......
......@@ -3,7 +3,6 @@
"baseUrl": ".",
"paths": {
"*": [
"*",
"src/*",
"node_modules/*"
]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment