Yuki Takei 3 лет назад
Родитель
Сommit
543f25a626

+ 2 - 2
packages/core/src/test/plugin/service/tag-cache-manager.test.js

@@ -3,8 +3,8 @@
 // import each from 'jest-each';
 // import each from 'jest-each';
 jest.mock('~/service/localstorage-manager');
 jest.mock('~/service/localstorage-manager');
 
 
-import TagCacheManager from '~/plugin/service/tag-cache-manager';
-import LocalStorageManager from '~/service/localstorage-manager';
+import * as TagCacheManager from '~/plugin/service/tag-cache-manager';
+import * as LocalStorageManager from '~/service/localstorage-manager';
 /* eslint-enable import/first */
 /* eslint-enable import/first */
 
 
 describe('TagCacheManager.constructor', () => {
 describe('TagCacheManager.constructor', () => {

+ 1 - 1
packages/core/src/test/service/localstorage-manager.test.js

@@ -1,7 +1,7 @@
 // eslint-disable-next-line import/no-unresolved
 // eslint-disable-next-line import/no-unresolved
 import 'jest-localstorage-mock';
 import 'jest-localstorage-mock';
 
 
-import LocalStorageManager from '~/service/localstorage-manager';
+import * as LocalStorageManager from '~/service/localstorage-manager';
 
 
 let localStorageManager = null;
 let localStorageManager = null;
 
 

+ 4 - 2
packages/plugin-attachment-refs/src/client/js/components/AttachmentList.jsx

@@ -1,11 +1,11 @@
+import React from 'react';
+
 import { Attachment } from '@growi/ui';
 import { Attachment } from '@growi/ui';
 import axios from 'axios'; // import axios from growi dependencies
 import axios from 'axios'; // import axios from growi dependencies
 import PropTypes from 'prop-types';
 import PropTypes from 'prop-types';
-import React from 'react';
 
 
 // eslint-disable-next-line import/no-unresolved
 // eslint-disable-next-line import/no-unresolved
 
 
-import styles from '../../css/index.css';
 import RefsContext from '../util/RefsContext';
 import RefsContext from '../util/RefsContext';
 import TagCacheManagerFactory from '../util/TagCacheManagerFactory';
 import TagCacheManagerFactory from '../util/TagCacheManagerFactory';
 
 
@@ -13,6 +13,8 @@ import TagCacheManagerFactory from '../util/TagCacheManagerFactory';
 
 
 import ExtractedAttachments from './ExtractedAttachments';
 import ExtractedAttachments from './ExtractedAttachments';
 
 
+import styles from '../../css/index.css';
+
 const AttachmentLink = Attachment;
 const AttachmentLink = Attachment;
 
 
 export default class AttachmentList extends React.Component {
 export default class AttachmentList extends React.Component {

+ 2 - 1
packages/plugin-attachment-refs/src/client/js/components/ExtractedAttachments.jsx

@@ -1,5 +1,6 @@
-import PropTypes from 'prop-types';
 import React from 'react';
 import React from 'react';
+
+import PropTypes from 'prop-types';
 import Carousel, { Modal, ModalGateway } from 'react-images';
 import Carousel, { Modal, ModalGateway } from 'react-images';
 
 
 import RefsContext from '../util/RefsContext';
 import RefsContext from '../util/RefsContext';

+ 2 - 1
packages/plugin-attachment-refs/src/client/js/util/Interceptor/RefsPostRenderInterceptor.js

@@ -1,5 +1,6 @@
-import { BasicInterceptor } from '@growi/core';
 import React from 'react';
 import React from 'react';
+
+import { BasicInterceptor } from '@growi/core';
 import ReactDOM from 'react-dom';
 import ReactDOM from 'react-dom';
 
 
 
 

+ 1 - 1
packages/plugin-attachment-refs/tsconfig.json

@@ -1,3 +1,3 @@
 {
 {
-  "extends": "../../tsconfig.base.json"
+  "extends": "./tsconfig.base.json",
 }
 }

+ 2 - 1
packages/plugin-lsx/src/client/js/components/Lsx.jsx

@@ -8,13 +8,14 @@ import axios from 'axios';
 import PropTypes from 'prop-types';
 import PropTypes from 'prop-types';
 
 
 // eslint-disable-next-line no-unused-vars
 // eslint-disable-next-line no-unused-vars
-import styles from '../../css/index.css';
 import { LsxContext } from '../util/LsxContext';
 import { LsxContext } from '../util/LsxContext';
 import { TagCacheManagerFactory } from '../util/TagCacheManagerFactory';
 import { TagCacheManagerFactory } from '../util/TagCacheManagerFactory';
 
 
 import { LsxListView } from './LsxPageList/LsxListView';
 import { LsxListView } from './LsxPageList/LsxListView';
 import { PageNode } from './PageNode';
 import { PageNode } from './PageNode';
 
 
+import styles from '../../css/index.css';
+
 export class Lsx extends React.Component {
 export class Lsx extends React.Component {
 
 
   constructor(props) {
   constructor(props) {

+ 2 - 1
packages/plugin-lsx/src/client/js/components/LsxPageList/PagePathWrapper.jsx

@@ -1,6 +1,7 @@
+import React from 'react';
+
 import { PagePathLabel } from '@growi/ui';
 import { PagePathLabel } from '@growi/ui';
 import PropTypes from 'prop-types';
 import PropTypes from 'prop-types';
-import React from 'react';
 
 
 
 
 export class PagePathWrapper extends React.Component {
 export class PagePathWrapper extends React.Component {

+ 27 - 0
packages/slackbot-proxy/.eslintrc.js

@@ -0,0 +1,27 @@
+module.exports = {
+  env: {
+  },
+  globals: {
+  },
+  settings: {
+  },
+  rules: {
+    indent: [
+      'error',
+      2,
+      {
+        SwitchCase: 1,
+        ArrayExpression: 'first',
+        FunctionDeclaration: { body: 1, parameters: 2 },
+        FunctionExpression: { body: 1, parameters: 2 },
+        ignoredNodes: [
+          'ClassBody > PropertyDefinition[decorators] > Identifier',
+          'ClassBody > MethodDefinition[decorators] > Identifier',
+        ],
+      },
+    ],
+
+    // set 'warn' temporarily -- 2022.07.13 Yuki Takei
+    '@typescript-eslint/no-explicit-any': ['warn'],
+  },
+};

+ 1 - 1
packages/slackbot-proxy/src/Server.ts

@@ -1,6 +1,6 @@
 import '@tsed/platform-express'; // !! DO NOT MODIFY !!
 import '@tsed/platform-express'; // !! DO NOT MODIFY !!
-import '@tsed/typeorm'; // !! DO NOT MODIFY !! -- https://github.com/tsedio/tsed/issues/1332#issuecomment-837840612
 import '@tsed/swagger';
 import '@tsed/swagger';
+import '@tsed/typeorm'; // !! DO NOT MODIFY !! -- https://github.com/tsedio/tsed/issues/1332#issuecomment-837840612
 
 
 import { createTerminus } from '@godaddy/terminus';
 import { createTerminus } from '@godaddy/terminus';
 import { HttpServer, PlatformApplication } from '@tsed/common';
 import { HttpServer, PlatformApplication } from '@tsed/common';

+ 1 - 1
packages/slackbot-proxy/src/models/errors.ts

@@ -11,7 +11,7 @@ export class InvalidUrlError extends ExtensibleCustomError {
 
 
 export class CustomHttpError extends Error {
 export class CustomHttpError extends Error {
 
 
-  httpError: HttpError
+  httpError: HttpError;
 
 
   constructor(httpError: HttpError) {
   constructor(httpError: HttpError) {
     super(httpError.message);
     super(httpError.message);

+ 3 - 3
packages/ui/src/components/User/UserPicture.jsx

@@ -34,7 +34,7 @@ export class UserPicture extends React.Component {
 
 
   RootElmWithoutLink = (props) => {
   RootElmWithoutLink = (props) => {
     return <span {...props}>{props.children}</span>;
     return <span {...props}>{props.children}</span>;
-  }
+  };
 
 
   RootElmWithLink = (props) => {
   RootElmWithLink = (props) => {
     const { user } = this.props;
     const { user } = this.props;
@@ -43,7 +43,7 @@ export class UserPicture extends React.Component {
     // Nested anchor tags causes a warning.
     // Nested anchor tags causes a warning.
     // https://stackoverflow.com/questions/13052598/creating-anchor-tag-inside-anchor-taga
     // https://stackoverflow.com/questions/13052598/creating-anchor-tag-inside-anchor-taga
     return <span onClick={() => { window.location.href = href }} {...props}>{props.children}</span>;
     return <span onClick={() => { window.location.href = href }} {...props}>{props.children}</span>;
-  }
+  };
 
 
   withTooltip = (RootElm) => {
   withTooltip = (RootElm) => {
     const { user } = this.props;
     const { user } = this.props;
@@ -58,7 +58,7 @@ export class UserPicture extends React.Component {
         </UncontrolledTooltip>
         </UncontrolledTooltip>
       </>
       </>
     );
     );
-  }
+  };
 
 
   render() {
   render() {
     const user = this.props.user;
     const user = this.props.user;