Skip to content

Linting individual files have too wide extension pattern match #36

Open
@CMCDragonkai

Description

@CMCDragonkai

Describe the bug

When I run the npm run lintfix I can see something like:

cmcdragonkai ➜ matrix-ml-1  ➜ ~/Projects/zeta.house
 $ npm run lintfix

> lintfix
> matrixai-lint --fix

Found 1 tsconfig.json files:
  /home/cmcdragonkai/Projects/zeta.house/tsconfig.json
Linting files:
  global.d.ts.{js,mjs,ts,mts,jsx,tsx,json}
  src/**/*.{js,mjs,ts,mts,jsx,tsx,json}
  docs/**/*.{js,mjs,ts,mts,jsx,tsx,json}
  pages/**/*.{js,mjs,ts,mts,jsx,tsx,json}
  blog/**/*.{js,mjs,ts,mts,jsx,tsx,json}
  server/**/*.{js,mjs,ts,mts,jsx,tsx,json}
  scripts/**/*.{js,mjs,ts,mts,jsx,tsx,json}
  docusaurus.config.ts.{js,mjs,ts,mts,jsx,tsx,json}
  tailwind.config.ts.{js,mjs,ts,mts,jsx,tsx,json}

Notice that:

  global.d.ts.{js,mjs,ts,mts,jsx,tsx,json}
  docusaurus.config.ts.{js,mjs,ts,mts,jsx,tsx,json}
  tailwind.config.ts.{js,mjs,ts,mts,jsx,tsx,json}

Doesn't make sense. These files have specific extensions, they cannot have .js, .mjs... etc.

The right way to do this would be to change the .ts to be the full pattern match.

For example:

tailwind.config.{js,mjs,ts,mts,jsx,tsx,json}

And even then, some of these don't make sense, you would not have json at the endnorjsxortsx`.

tailwind.config.{js,mjs,ts,mts}

Same goes for any .ts file that's listed above.

To Reproduce

  1. Run npm run lintfix

Expected behavior

Should be more finegrained.

Screenshots

Platform

N/A

Notify maintainers

@CDeltakai

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions