From 91f6ad1fc656570e42f27719d840321b6cd10e1b Mon Sep 17 00:00:00 2001 From: Rafal Dziegielewski Date: Tue, 21 Mar 2023 10:38:05 +0100 Subject: [PATCH] chore: fix linter issues --- .eslintrc.cjs | 11 ----------- package.json | 2 +- src/utils.ts | 6 ++++-- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index f88323a..ca9fc49 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -2,7 +2,6 @@ module.exports = { env: { browser: true, es2020: true, - 'cypress/globals': true, }, extends: [ 'airbnb', @@ -27,8 +26,6 @@ module.exports = { sourceType: 'module', }, plugins: [ - 'react', - 'cypress', '@typescript-eslint', ], rules: { @@ -36,7 +33,6 @@ module.exports = { 'no-unused-vars': 'off', 'import/extensions': 'off', 'import/no-unresolved': 'off', - 'react/jsx-filename-extension': 'off', indent: [ 'error', 2, @@ -45,11 +41,4 @@ module.exports = { 'object-curly-newline': 'off', '@typescript-eslint/no-explicit-any': 'off', }, - overrides: [{ - files: ['*.tsx'], - rules: { - 'react/prop-types': 'off', - 'react/jsx-props-no-spreading': 'off', - }, - }], } diff --git a/package.json b/package.json index c94df27..068f31c 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "release": "semantic-release", "build": "tsc", "check:all": "yarn lint && yarn build && cd example-app && yarn build", - "lint": "eslint --ext='.ts,.js.tsx' './src/**/*' './example-app/**/*'" + "lint": "eslint --ext='.ts,.js' './src/**/*'" }, "husky": { "hooks": { diff --git a/src/utils.ts b/src/utils.ts index 559dc66..935a4b1 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -74,8 +74,10 @@ const addAdminJsRoutes = (admin: AdminJS, router: Router, app: Application): voi const { assets } = AdminJSRouter assets.forEach((asset) => app.use( - mount(admin.options.rootPath + asset.path, - serve(path.dirname(asset.src), { index: path.basename(asset.src) })), + mount( + admin.options.rootPath + asset.path, + serve(path.dirname(asset.src), { index: path.basename(asset.src) }), + ), )) }