dukeluo / eslint-plugin-check-file

ESLint rules for consistent filename and folder. Allows you to enforce a consistent naming pattern for the filename and folder.

Home Page:https://www.npmjs.com/package/eslint-plugin-check-file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: pascal case and multiple cases

divmgl opened this issue · comments

We use PascalCase.tsx for components in our React projects. We also use camelCase for hooks.

Would be nice to be able to enforce this:

{
  "**/*.{jsx,tsx}": ["PASCAL_CASE", "CAMEL_CASE"]
}

Thanks!

commented

@divmgl You can do this in one of two ways:

  • Target your different types of files, and give them their own naming pattern.
  • Write your own naming expression which can match both PASCAL_CASE and CAMEL_CASE.