mirror of
https://github.com/outline/outline.git
synced 2025-12-30 07:19:52 -06:00
fix: @shared path in shared directory, added linting to prevent in the future
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
"extends": [
|
||||
"../.eslintrc",
|
||||
"plugin:react/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
"plugin:react-hooks/recommended"
|
||||
],
|
||||
"plugins": [
|
||||
"eslint-plugin-react-hooks",
|
||||
"eslint-plugin-react-hooks"
|
||||
],
|
||||
"env": {
|
||||
"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";
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user