Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d.ts files aren't linted #20272

Open
ngaritagoitia opened this issue May 7, 2024 · 0 comments
Open

d.ts files aren't linted #20272

ngaritagoitia opened this issue May 7, 2024 · 0 comments
Assignees
Labels
issue: bug Issue reporting a bug severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: typescript Source is related to TypeScript (typings, tooling, ...) status: pending reproduction Waiting for free time to reproduce the issue, or more information

Comments

@ngaritagoitia
Copy link

Bug report

Required System information

  • Node.js version: lts/iron
  • NPM version: 10.5.0
  • Strapi version: "@strapi/strapi": "4.22.1",
  • Database: mysql2
  • Operating system: linux ubuntu
  • Is your project Javascript or Typescript: typescript

Describe the bug

Currently, no linting for erros in d.ts files.
image

this is the default tsconfig.json:

{
  "extends": "@strapi/typescript-utils/tsconfigs/server",
  "compilerOptions": {
    "outDir": "dist",
    "rootDir": "."
  },
  "include": [
    "./",
    "./**/*.ts",
    "./**/*.js",
    "src/**/*.json"
  ],
  "exclude": [
    "node_modules/",
    "build/",
    "dist/",
    ".cache/",
    ".tmp/",
    "src/admin/",
    "**/*.test.*",
    "src/plugins/**"
  ]
}

I tried adding strict and including ./**/*.d.tsin the include array, but to no avail.

Steps to reproduce the behavior

  1. Create a *.d.ts file in src/api, or anywhere really
  2. Create an interface like in the image
  3. expect an error, but receive none

Expected behavior

An error saying that the interface AAAAAAAAAAA doesn't exist

Screenshots

If applicable, add screenshots to help explain your problem.

Code snippets

interface CompanyAttributes {
  legalRepresentative: string;
  companyProfile: string;
  businessName: string;
  CIF: string;
  registeredOffice: AAAAAAAAAAA;
}

Additional context

Add any other context about the problem here.

@joshuaellis joshuaellis added issue: bug Issue reporting a bug severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve status: pending reproduction Waiting for free time to reproduce the issue, or more information source: typescript Source is related to TypeScript (typings, tooling, ...) labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: typescript Source is related to TypeScript (typings, tooling, ...) status: pending reproduction Waiting for free time to reproduce the issue, or more information
Projects
Status: To be reviewed (Open)
Status: To review
Development

No branches or pull requests

3 participants