feat(admin, admin-ui, medusa-js, medusa-react, medusa): Support Admin Extensions (#4761)
Co-authored-by: Rares Stefan <948623+StephixOne@users.noreply.github.com> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
26c78bbc03
commit
f1a05f4725
47
.eslintrc.js
47
.eslintrc.js
@@ -85,6 +85,7 @@ module.exports = {
|
||||
"./packages/medusa-payment-stripe/tsconfig.spec.json",
|
||||
"./packages/medusa-payment-paypal/tsconfig.spec.json",
|
||||
"./packages/admin-ui/tsconfig.json",
|
||||
"./packages/admin-ui/tsconfig.spec.json",
|
||||
"./packages/event-bus-local/tsconfig.spec.json",
|
||||
"./packages/event-bus-redis/tsconfig.spec.json",
|
||||
"./packages/medusa-plugin-meilisearch/tsconfig.spec.json",
|
||||
@@ -94,6 +95,7 @@ module.exports = {
|
||||
"./packages/stock-location/tsconfig.spec.json",
|
||||
"./packages/cache-redis/tsconfig.spec.json",
|
||||
"./packages/cache-inmemory/tsconfig.spec.json",
|
||||
"./packages/admin-ui/tsconfig.json",
|
||||
"./packages/create-medusa-app/tsconfig.json",
|
||||
"./packages/product/tsconfig.json",
|
||||
],
|
||||
@@ -141,6 +143,9 @@ module.exports = {
|
||||
sourceType: "module", // Allows for the use of imports
|
||||
project: "./packages/admin-ui/ui/tsconfig.json",
|
||||
},
|
||||
globals: {
|
||||
__BASE__: "readonly",
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
},
|
||||
@@ -177,5 +182,47 @@ module.exports = {
|
||||
project: "./packages/admin/tsconfig.json",
|
||||
},
|
||||
},
|
||||
{
|
||||
files: [
|
||||
"packages/medusa-payment-stripe/src/admin/**/*.ts",
|
||||
"packages/medusa-payment-stripe/src/admin/**/*.tsx",
|
||||
],
|
||||
plugins: ["unused-imports"],
|
||||
extends: [
|
||||
"plugin:react/recommended",
|
||||
"plugin:react/jsx-runtime",
|
||||
"plugin:react-hooks/recommended",
|
||||
],
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
|
||||
sourceType: "module", // Allows for the use of imports
|
||||
project: "./packages/medusa-payment-stripe/tsconfig.admin.json",
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
},
|
||||
rules: {
|
||||
"prettier/prettier": "error",
|
||||
"react/prop-types": "off",
|
||||
"new-cap": "off",
|
||||
"require-jsdoc": "off",
|
||||
"valid-jsdoc": "off",
|
||||
"no-unused-expressions": "off",
|
||||
"unused-imports/no-unused-imports": "error",
|
||||
"unused-imports/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
vars: "all",
|
||||
varsIgnorePattern: "^_",
|
||||
args: "after-used",
|
||||
argsIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user