neet/refined-itsukara-link

View on GitHub

Showing 278 of 278 total issues

Function ActiveLivers has 79 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const ActiveLivers = (props: ActiveLiversProps): JSX.Element => {
  const { upcomingEvents: events } = props;
  const [expanded, setExpanded] = useState(false);

  useEffect(() => {

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

              {twitter && (
                <Button
                  variant="wash"
                  as="a"
                  size="sm"
    packages/@neet/vschedule-client/src/components/app/Liver/Liver.tsx on lines 32..43

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 96.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

              {youtube && (
                <Button
                  variant="wash"
                  as="a"
                  size="sm"
    packages/@neet/vschedule-client/src/components/app/Liver/Liver.tsx on lines 45..56

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 96.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      async queryByYoutubeChannelId(
        youtubeChannelId: YoutubeChannelId,
      ): Promise<PerformerDto | undefined> {
        const performer = await this._prisma.performer.findFirst({
          where: {
    packages/@neet/vschedule-api/src/adapters/query-services/organization-query-service-prisma.ts on lines 31..44
    packages/@neet/vschedule-api/src/adapters/query-services/organization-query-service-prisma.ts on lines 46..61
    packages/@neet/vschedule-api/src/adapters/query-services/performer-query-service-prisma.ts on lines 39..52
    packages/@neet/vschedule-api/src/adapters/query-services/stream-query-service-prisma.ts on lines 48..61

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 95.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      async query(id: OrganizationId): Promise<OrganizationDto | undefined> {
        const data = await this._prisma.organization.findFirst({
          where: {
            id: id.value,
          },
    packages/@neet/vschedule-api/src/adapters/query-services/organization-query-service-prisma.ts on lines 46..61
    packages/@neet/vschedule-api/src/adapters/query-services/performer-query-service-prisma.ts on lines 39..52
    packages/@neet/vschedule-api/src/adapters/query-services/performer-query-service-prisma.ts on lines 54..69
    packages/@neet/vschedule-api/src/adapters/query-services/stream-query-service-prisma.ts on lines 48..61

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 95.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      async queryByYoutubeChannelId(
        id: YoutubeChannelId,
      ): Promise<OrganizationDto | undefined> {
        const data = await this._prisma.organization.findFirst({
          where: {
    packages/@neet/vschedule-api/src/adapters/query-services/organization-query-service-prisma.ts on lines 31..44
    packages/@neet/vschedule-api/src/adapters/query-services/performer-query-service-prisma.ts on lines 39..52
    packages/@neet/vschedule-api/src/adapters/query-services/performer-query-service-prisma.ts on lines 54..69
    packages/@neet/vschedule-api/src/adapters/query-services/stream-query-service-prisma.ts on lines 48..61

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 95.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    export const useEvents = (config?: SWRConfiguration<EventsResponse>) => {
      const { data, error, isValidating } = useSWR<EventsResponse, unknown>(
        '/api/v1.2/events.json',
        proxyAPI.fetchEvents,
        config,
    packages/@neet/vschedule-client/src/components/hooks/useGenres.ts on lines 9..17

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 95.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    export const useGenres = (config?: SWRConfiguration<GenresResponse>) => {
      const { data, error, isValidating } = useSWR<GenresResponse, unknown>(
        '/api/v1.2/genres.json',
        proxyAPI.fetchGenres,
        config,
    packages/@neet/vschedule-client/src/components/hooks/useEvents.ts on lines 9..17

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 95.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      async query(performerId: PerformerId): Promise<PerformerDto | undefined> {
        const performer = await this._prisma.performer.findFirst({
          where: {
            id: performerId.value,
          },
    packages/@neet/vschedule-api/src/adapters/query-services/organization-query-service-prisma.ts on lines 31..44
    packages/@neet/vschedule-api/src/adapters/query-services/organization-query-service-prisma.ts on lines 46..61
    packages/@neet/vschedule-api/src/adapters/query-services/performer-query-service-prisma.ts on lines 54..69
    packages/@neet/vschedule-api/src/adapters/query-services/stream-query-service-prisma.ts on lines 48..61

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 95.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      async query(id: StreamId): Promise<StreamDto | undefined> {
        const data = await this._prisma.stream.findFirst({
          where: {
            id: id.value,
          },
    packages/@neet/vschedule-api/src/adapters/query-services/organization-query-service-prisma.ts on lines 31..44
    packages/@neet/vschedule-api/src/adapters/query-services/organization-query-service-prisma.ts on lines 46..61
    packages/@neet/vschedule-api/src/adapters/query-services/performer-query-service-prisma.ts on lines 39..52
    packages/@neet/vschedule-api/src/adapters/query-services/performer-query-service-prisma.ts on lines 54..69

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 95.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function Timetable has 73 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const Timetable = (props: TimetableProps): JSX.Element => {
      const { schedules, swapDelta, loading } = props;
    
      const { ref, scale, startAt, setFocusedAt, setFocusedAtRaw } = useTimetable();
      const { x: fromLeft } = useScroll(ref);

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

        async findById(id: TokenId): Promise<Token | null> {
          const data = await this._prisma.token.findFirst({
            where: {
              id: id.value,
            },
      packages/@neet/vschedule-api/src/adapters/repositories/user-repository-prisma.ts on lines 29..41
      packages/@neet/vschedule-api/src/adapters/repositories/user-repository-prisma.ts on lines 43..55

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 92.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

        async findByEmail(email: UserEmail): Promise<User | null> {
          const user = await this._prisma.user.findFirst({
            where: {
              email: email.value,
            },
      packages/@neet/vschedule-api/src/adapters/repositories/token-repository-prisma.ts on lines 28..40
      packages/@neet/vschedule-api/src/adapters/repositories/user-repository-prisma.ts on lines 29..41

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 92.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

        async findById(id: UserId): Promise<User | null> {
          const user = await this._prisma.user.findFirst({
            where: {
              id: id.value,
            },
      packages/@neet/vschedule-api/src/adapters/repositories/token-repository-prisma.ts on lines 28..40
      packages/@neet/vschedule-api/src/adapters/repositories/user-repository-prisma.ts on lines 43..55

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 92.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function Skyscraper has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const Skyscraper = (props: SkyscraperProps): JSX.Element => {
        const {
          mode = 'events',
          events,
          loading,

        Function ModalPure has 70 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const ModalPure = (props: ModalProps): JSX.Element | null => {
          const { show, title, children, className, getRoot, getContainer, onHide } =
            props;
        
          const root = getRoot instanceof Element ? getRoot : getRoot?.();
        Severity: Major
        Found in packages/@neet/vschedule-client/src/components/ui/Modal/Modal.tsx - About 2 hrs to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          registry.registerPath({
            method: 'get',
            path: '/rest/v1/organizations/{organizationId}',
            operationId: 'showOrganization',
            summary: '組織を表示',
          packages/@neet/vschedule-api-spec/src/paths/rest/v1/performers.ts on lines 7..25

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 91.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          registry.registerPath({
            method: 'get',
            path: '/rest/v1/performers/{performerId}',
            operationId: 'showPerformer',
            summary: 'パフォーマーを表示',
          packages/@neet/vschedule-api-spec/src/paths/rest/v1/organizations.ts on lines 7..25

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 91.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Function MinuteHand has 70 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const MinuteHand = (): JSX.Element => {
            const { focusedAt } = useTimetable();
          
            return (
              <div

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

              async findByFilename(
                filename: MediaAttachmentFilename,
              ): Promise<MediaAttachment | undefined> {
                const data = await this._prisma.mediaAttachment.findFirst({
                  where: {
            packages/@neet/vschedule-api/src/adapters/repositories/media-attachment-repository-prisma.ts on lines 26..38

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 90.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language