fix: @shared path in shared directory, added linting to prevent in the future
This commit is contained in:
@@ -2,10 +2,10 @@
|
|||||||
"extends": [
|
"extends": [
|
||||||
"../.eslintrc",
|
"../.eslintrc",
|
||||||
"plugin:react/recommended",
|
"plugin:react/recommended",
|
||||||
"plugin:react-hooks/recommended",
|
"plugin:react-hooks/recommended"
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"eslint-plugin-react-hooks",
|
"eslint-plugin-react-hooks"
|
||||||
],
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"jest": true,
|
"jest": true,
|
||||||
|
|||||||
25
shared/.eslintrc
Normal file
25
shared/.eslintrc
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"extends": [
|
||||||
|
"../.eslintrc",
|
||||||
|
"plugin:react/recommended",
|
||||||
|
"plugin:react-hooks/recommended"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"eslint-plugin-react-hooks"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"no-restricted-imports": ["error", {
|
||||||
|
"patterns": [{
|
||||||
|
"group": ["@shared/*"],
|
||||||
|
"message": "Use relative imports."
|
||||||
|
}, {
|
||||||
|
"group": ["@server/*"],
|
||||||
|
"message": "Do not reference server code from shared code."
|
||||||
|
}]
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"jest": true,
|
||||||
|
"browser": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import sharedEnv from "@shared/env";
|
import sharedEnv from "../env";
|
||||||
import parseDocumentSlug from "./parseDocumentSlug";
|
import parseDocumentSlug from "./parseDocumentSlug";
|
||||||
|
|
||||||
sharedEnv.URL = "https://app.outline.dev";
|
sharedEnv.URL = "https://app.outline.dev";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import sharedEnv from "@shared/env";
|
import sharedEnv from "../env";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse the likely document identifier from a given url.
|
* Parse the likely document identifier from a given url.
|
||||||
|
|||||||
Reference in New Issue
Block a user