Giter VIP home page Giter VIP logo

dukeluo / eslint-plugin-check-file Goto Github PK

View Code? Open in Web Editor NEW
509.0 5.0 19.0 341 KB

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

License: Apache License 2.0

JavaScript 99.91% Shell 0.09%
eslint eslint-plugin folder filename path naming-conventions naming-pattern glob-matching file well-documented

eslint-plugin-check-file's Introduction

Hi ๐Ÿ‘‹, I'm Huan

Skills

JavaScript Typescript Java Python
HTML CSS React Vue.js Redux Webpack GraphQL styled-components Ramda
React Native Realm
Jest React Testing Library
GitHub Actions Vercel Heroku
Git IDEA VS Code Chrome

eslint-plugin-check-file's People

Contributors

atlastom avatar dukeluo avatar florianehmke avatar jbkey23 avatar leepowellnbs avatar milos-sikic-nimbus-tech avatar msalar-din avatar ratierd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

eslint-plugin-check-file's Issues

support multiple wildcard matching

Hi there! I'm currently have the following eslint config:

{
    // ...
    "check-file/filename-naming-convention": [
        "error",
        {
            "**/*.ts": "KEBAB_CASE"
        }
    ]
}

And it's working fine with regular (single wildcard) files:

.
โ”œโ”€โ”€ sample-sample.ts
โ””โ”€โ”€ sample.ts

But in multiple wildcards, it throws errors for it:

.
โ”œโ”€โ”€ sample.test.ts
โ”œโ”€โ”€ sample-test.spec.ts
โ”œโ”€โ”€ sample.d.css.ts
โ”œโ”€โ”€ sample.config.ts
โ””โ”€โ”€ sample.d.ts

Snake case - files starting with numbers

Hi in our project we use SNAKE CASE and we have some files named like this:

0123.js
0001_file.js

Eslint shows these files like errors. Is there a reason why the file names can't start with number or be numbers only ?

/**
 * @example hello, hello_world
 */
const SNAKE_CASE = '+([a-z])*([a-z0-9])*(_+([a-z0-9]))';

Markdown file support

Describe the bug

When I configure the filename rule to be able to add a rule on .md files, the rule does not work.

Expected behavior

.md files are linted.

Plugin configuration

'check-fike/filename-naming-convention': ['error', {
  '**/*.{md}': '+([a-z])',
}],

Project structure

.
โ””โ”€โ”€ my-app/
    โ””โ”€โ”€ READme.md

Desktop (please complete the following information):

  • OS: Windows

Additional context

When I set the READme.md extension to .js, it works.

Seems like it's only works for js, jsx, ts and tsx extensions.

Unable to lint .png extension

Describe the bug
Plugin does not work on file extension such as .png and .jpg. (Though they do not really fall under eslint scope, wanted to check if they are supported)

Expected behavior

Below command is not able catch error in the images folder whose .png are not in KEBAB_CASE. Refer the folder code structure. I have also tried keeping only one rule but it fails too. But if you specify hardcoded full path to image file, lint is able to catch error. (For ex. "images/folder/imageCamelCase.png": "KEBAB_CASE" will work)

    "check-file/filename-naming-convention": [
      "error",
      {
        "*.{png}":"KEBAB_CASE", 
        "images/**/*.png": "KEBAB_CASE"
      }
    ],

Plugin configuration

  • Posted above.

Project structure

.
โ”œโ”€โ”€ create_folder_file.sh
โ”œโ”€โ”€ kebab-case
โ”‚   โ”œโ”€โ”€ images
โ”‚   โ”‚   โ”œโ”€โ”€ folder1
โ”‚   โ”‚     โ””โ”€โ”€ imageCamelCase.png
โ”‚   โ”‚   โ”œโ”€โ”€ folder2
โ”‚   โ”‚      โ””โ”€โ”€ image-Some_case.png
โ”‚   โ””โ”€โ”€ index.js
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ .eslintrc.cjs
โ”œโ”€โ”€ package.json
 โ”€โ”€ index.js

Desktop (please complete the following information):

  • OS: MacOS

Additional context
Trying to lint the .png extension and ensuring all are named in KEBAB_CASE.

The new update still requires glob patterns to be matched regardelss of if they are used

Describe the bug
The new pattern:

module.exports = {
  plugins: ['check-file'],
  rules: {
    'check-file/filename-blocklist': [
      'error',
      { '*.models.ts': '*.model.ts' },
      {
        errorMessage:
          'The file "{{ target }}" is blocked since it since it matches the blocklisted pattern "{{ pattern }}", see contribute.md for details',
      },
    ],
  },
};

still requires an expected Glob { '*.models.ts': '*.model.ts' }, despite the errorMessage Not using it at all. In addition the previous PR where a non-glob string could be used in the value {'*models.ts: reson models is not allowed}` also allowed a different reason for each block. The current implementation should at least allow an empty string in value when errorMessage is defined.
It just doesn't make sense to still have to provide a suggested Glob pattern that must pass a glob matching pattern, when it isn't used at all.

Expected behavior

module.exports = {
  plugins: ['check-file'],
  rules: {
    'check-file/filename-blocklist': [
      'error',
      { '*.models.ts':  'The file "{{ target }}" is blocked since it since it matches the blocklisted pattern "{{ pattern }}", see contribute.md for details'
       '*.otherthing.ts':  'The file "{{ target }}" is blocked since it since it matches the blocklisted pattern "{{ pattern }}", see aDifferent.md for details'
      },
      {
        errorMessage: true 
        },
    ],
  },
};

should work and not return the error " 1:1 error There is an invalid pattern "The file "{{ target }}" is blocked since it since it matches the blocklisted pattern", please double-check it and try again check-file/filename-blocklist"

OR at least:

module.exports = {
  plugins: ['check-file'],
  rules: {
    'check-file/filename-blocklist': [
      'error',
      { '*.models.ts': '' },
      {
        errorMessage:
          'The file "{{ target }}" is blocked since it since it matches the blocklisted pattern "{{ pattern }}", see contribute.md for details',
      },
    ],
  },
};

should work and not return the error " 1:1 error There is an invalid pattern "The file "{{ target }}" is blocked since it since it matches the blocklisted pattern", please double-check it and try again check-file/filename-blocklist"

Desktop (please complete the following information):

  • OS: macOS

Additional context
Add any other context about the problem here.

Feature request: Next.JS dynamic routes, slug, catch all and optional catch all support

Feature request
Support Next.JS folder and file naming convention as a named rule.

Acceptance criteria
Folder and file names within a certain directory eg. pages are to be considered valid if at least one of the following conventions hold true:

  • kebab-case (regular pages-folders), eg. posts or web-posts
  • camelCase enclosed in [], eg. [postId]
  • or camelCase enclosed in [...], where this must be a leaf node, eg. [...slug]
  • or camelCase enclosed in [[...]], where this must be a leaf node, eg. [[...slug]]

Current workaround

  • Define own glob pattern.

Further documentation
https://nextjs.org/docs/routing/dynamic-routes

CAMEL_CASE matching pattern exception case

Describe the bug
For file name like g2tClass, current CAMEL_CASE that cannot support very well

Expected behavior
Current if the 2nd char of the file is a number, then no matter what pattern it is, it cannot be recongized as CAMEL_CASE.
I have tried g2tClass.js g2TClass.js and G2TClass.js, all of them failed the CAMCL_CASE, and I expect either g2tClass.js g2TClass.js can pass the case

Plugin configuration
"check-file/filename-naming-convention": ["error", {
"/classes/": "CAMEL_CASE",
}],

Project structure
If applicable, add a minimal reproducible project structure generated by the tree cmd like the one below.

.
โ”œโ”€โ”€ create_folder_file.sh
โ”œโ”€โ”€ classes
โ”‚   โ”œโ”€โ”€ classes
โ”‚   โ””โ”€โ”€ g2tClass.js
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ src
    โ””โ”€โ”€ kebab-case
        โ””โ”€โ”€ index.js

Desktop (please complete the following information):
Linux

Additional context
Correct me if this is my mistake

Glob to exclude __tests__ folder is not working as expected

Describe the bug
I'm currently working in a monorepo and want to enforce the Kebab Case convention for my domains folder but exclude all the __tests__ folders inside it.
I've tried to use the expression described in the documentation but it does not work as expected on my project.
If I use the full path, it works as expected. But if I change the intermediate folders for /**/, then it doesn't work.

Expected behavior
Files inside the __tests__ should not throw check-file/folder-naming-convention error

Plugin configuration

[.eslintrc.base.json]
...
    "check-file/folder-naming-convention": [
      "error",
      {
        "domains/**/!(__tests__)/**": "KEBAB_CASE", // this doesn't work
        "domains/sub-domain-a/src/!(__tests__)/**": "KEBAB_CASE", // this works
        "domains/**/src/!(__tests__)/**": "KEBAB_CASE", // this works but I want to have a more flexible configuration
      },
    ],

Project structure
If applicable, add a minimal reproducible project structure generated by the tree cmd like the one below.

.
โ”œโ”€โ”€ domains
โ”‚   โ”œโ”€โ”€ sub-domain-a
โ”‚   โ”‚   โ”œโ”€โ”€ src
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ __tests__
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ test.ts
โ”‚   โ”œโ”€โ”€ sub-domain-b
โ”‚   โ”‚   โ”œโ”€โ”€ app
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ __tests__
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ test.js
โ”‚   โ”œโ”€โ”€ sub-domain-c
โ”‚   โ”‚   โ”œโ”€โ”€ feature-a
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ src
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ __tests__
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ test.js
โ”œโ”€โ”€ libs
โ”œโ”€โ”€ scripts
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ .eslintrc.base.json

Desktop:

  • OS: macOS Sonoma

allow numbers at the start of the file name

great project!

for some reason I get this error:

seeds/01-applications.ts
  1:1  error  The filename "seeds/01-applications.ts" does not match the "KEBAB_CASE" style  check-file/filename-naming-convention

for this config:

"check-file/filename-naming-convention":[
			"error",
			{
				"**/*.{js,ts}":"KEBAB_CASE"
			},
			{
				"ignoreMiddleExtensions": true
			}
		],
		"check-file/folder-naming-convention":[
			"error",
			{
				"app/**/":"KEBAB_CASE",
				"test/!(__fixtures__)/**/":"KEBAB_CASE"
			}
		]

How to support the configuration of multiple matching rules

Project structure
I would like to support both canonical configurations. as follows:

โ””โ”€โ”€ src
    โ””โ”€โ”€ kebabCase.js
    โ””โ”€โ”€ kebab-case.js

Whether the following configurations are supported๏ผš

 "src/**/!(App).vue": "KEBAB_CASE|PASCAL_CASE",

SubFolder name depending on ParentFolder name

Hey. Thank you for this plugin !

Is it possible to have a naming convention rule for Folders, that takes into account the parent folder name ?
I know it's possible to enforce fileNames to contain the name of the parentFolder. But is it possbile for folders ?
Eg. something like :

"src/folder/*/*": "<1>"

With a structure like :

โ””โ”€โ”€ src
    โ””โ”€โ”€ folder
        โ””โ”€โ”€ sub-folder
             โ””โ”€โ”€ sub-folder.sub-sub-foldername

Also. the final rule should match folders with 'parentFolderName.kebab-case' . So a combination between parentFolder name and kebab-case afterwards

Custom error message for filename-naming-convention rule

Hi, is there any chance to provide custom error message rule for filename-naming-convention?
Currently, especially when used with prefined match syntax - error message is very misleading/unclear
We would get error like

 error  The filename "MyComponent.tsx" does not match the "<1>" pattern  check-file/filename-naming-convention

What I would like to have instead is the ability to define custom error message (even hard coded, without dynamic parts like exact file name or so)

Error like this would be much more helpful

 error  The filename doesn't match file naming convention defined for this project. See contribute.md for details

Help with glob syntax (Next.js special routes related)

Hi there!

I've been trying to make a glob pattern that would match what this regex matches for a while:

^(?:\[[a-z]+(?:-[a-z]+)*]|(?:[a-z]+(?:-[a-z]+)*))$

But unfortunately, I can't figure it out.

I have seen #20 and I agree with you that it should not be part of the library, but I would like to ask for your help for a glob that would match what's needed, if it's possible. If not, would you consider supporting regexes?

Test data

Should pass

some
some-string
[some-string]
[some]

Should not pass

[some-string
some-string]
[some]-string

Thank you for the tool. I would happily submit a PR that documents these custom globs for Next.js if we can make some.

folder rule: reported multiple times (once per containing file)

I've setup this proj: a folder with an invalid name contains two files. When linting, the folder is reported twice as not matching its rule.

$ find src/
src/
src/Bar
src/Bar/a.ts
src/Bar/b.ts
$ cat .eslintrc.yml
env:
  es2021: true
  node: true
overrides: [ ]
parser: '@typescript-eslint/parser'
parserOptions:
  ecmaVersion: latest
  sourceType: module
plugins:
  - 'check-file'
rules: {
  'check-file/folder-naming-convention': [ 'warn', { 'src/**': 'KEBAB_CASE' } ],
}
$ cat package.json
{
  "name": "bar",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "lint": "eslint \"{src,apps,libs,test}/**/*.ts\""
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@typescript-eslint/parser": "^5.59.11",
    "eslint": "^8.42.0",
    "eslint-plugin-check-file": "^2.4.0",
    "typescript": "^4.9.3",
    "typescript-eslint": "^0.0.1-alpha.0"
  }
}
$ npm run lint

> [email protected] lint
> eslint "{src,apps,libs,test}/**/*.ts"


C:\Users\amitd\AppData\Local\Temp\bar\src\Bar\a.ts
  1:1  warning  The folder "Bar" does not match the "KEBAB_CASE" pattern  check-file/folder-naming-convention

C:\Users\amitd\AppData\Local\Temp\bar\src\Bar\b.ts
  1:1  warning  The folder "Bar" does not match the "KEBAB_CASE" pattern  check-file/folder-naming-convention

โœ– 2 problems (0 errors, 2 warnings)

Feature request: pascal case and multiple cases

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!

The plugin ignores to check folders where only index.{js,ts} is present

Steps to reproduce

  • Follow the installation process
  • Add rule
   "check-file/folder-naming-convention": [
      "error",
      {
        "*/!(__tests__)/**/": "KEBAB_CASE"
      }
    ]
  • Create a folder with "NotKebabCase" and create "index.js" inside it
  • Run a linter

Current behavior

No error is reported

Expected behavior

"NotKebabCase" folder should be reported as eslint error

Some functions are not compatible with windows

https://github.com/DukeLuo/eslint-plugin-check-file/blob/ac5fa6b851f29c5cb2e69dd3665fccd94becf809/lib/utils/filename.js#L11

https://github.com/DukeLuo/eslint-plugin-check-file/blob/ac5fa6b851f29c5cb2e69dd3665fccd94becf809/lib/utils/filename.js#L17

The windows style path is D:\\path-to\\dir\\filename.js, is it possible to use path.basename, path.dirname ?

่ฟ™ไธคไธชๅ‡ฝๆ•ฐไธๅ…ผๅฎน windows ็ณป็ปŸ็š„่ทฏๅพ„้ฃŽๆ ผ๏ผŒๅบ”่ฏฅๅฏไปฅ็”จ path.basename ๅ’Œ path.dirname ๆ›ฟไปฃ

Support for "Flat Config"

Hello!

Does this plugin support Flat config? (eslint.config.js). Since the other config files will be deprecated after ESLint v9.0.0, it would be great if we could use it with the new config. (Sorry if it is already available. I might have missed)

Currently, if I import the plugin to the new config file, it shows error as

import eslintCheckFile from 'eslint-plugin-check-file';
       ^^^^^^^^^^^^^^^
SyntaxError: The requested module 'eslint-plugin-check-file' does not provide an export named 'default'
// eslint.config.js
import eslintCheckFile from 'eslint-plugin-check-file';
export default [
	...eslintCheckFile,
];

errors thrown for config and test/spec files (babel.config.js, jest.config.js, index.test.ts)

I would like to use KEBAB_CASE for almost all files and overall it seems to work well, however I think some cases are matched too loosely.
This is my config:

โ€œcheck-file/filename-naming-conventionโ€: [
    โ€œerrorโ€,
    {
        โ€œ*.{js,ts,jsx,tsx,json}โ€œ: โ€œKEBAB_CASEโ€
    }
],
โ€œcheck-file/folder-naming-conventionโ€: [
    โ€œerrorโ€,
    {
        โ€œsrc/**โ€œ: โ€œKEBAB_CASEโ€,
        โ€œpackages/**โ€œ: โ€œKEBAB_CASEโ€
    }
]

However I think these errors are false positives:

1:1 error The filename โ€œbabel.config.jsโ€ does not match the โ€œKEBAB_CASEโ€ style check-file/filename-naming-convention
7:1 error The filename โ€œjest.config.jsโ€ does not match the โ€œKEBAB_CASEโ€ style check-file/filename-naming-convention
3:1 error The filename โ€œindex.test.tsโ€ does not match the โ€œKEBAB_CASEโ€ style check-file/filename-naming-convention
3:1 error The filename โ€œindex.spec.tsโ€ does not match the โ€œKEBAB_CASEโ€ style check-file/filename-naming-convention
3:1 error The filename โ€œsome-test.spec.tsโ€ does not match the โ€œKEBAB_CASEโ€ style check-file/filename-naming-convention

Also I could not make it work with other cases:

3:1 error The filename โ€œsome-test.spec.tsโ€ does not match the โ€œCAMEL_CASEโ€ style check-file/filename-naming-convention
3:1 error The filename โ€œsome_test.spec.tsโ€ does not match the โ€œSNAKE_CASEโ€ style check-file/filename-naming-convention

I could not find away to adjust the file matching to make it work or exclude the rule for these files without disabling eslint for them entirely.

I think .config, .test and .spec should be valid for KEBAB_CASE and most other as well.

Any suggestions to change my config or could this be improved in the file name matching?

[Bug?] Inconsistent matching patterns for files & folders

First of all, thank you for creating this.

Here are my current rules:

{
  "check-file/folder-naming-convention": [
    "error",
    {
      "*": "KEBAB_CASE"
    }
  ],
  "check-file/filename-naming-convention": [
    "error",
    {
      "*": "KEBAB_CASE"
    }
  ]
}

As you can see, the file name foB didn't throw the error:
image
But if I change the rules to:

{
  "check-file/folder-naming-convention": [
    "error",
    {
      "*": "KEBAB_CASE"
    }
  ],
  "check-file/filename-naming-convention": [
    "error",
    {
      "**": "KEBAB_CASE"
    }
  ]
}

Now it works as expected:
image
Notice the file pattern uses ** whereas the folder pattern uses *, is this inconsistency intentional or a bug?

'check-file/folder-naming-convention' doesn't work with Angular naming convention

Hi!

I notice issue with 'check-file/folder-naming-convention' (v1.2.0).

With this settings:

 rules: {
    'check-file/folder-naming-convention': [
      'error',
      {
        'src/**': 'KEBAB_CASE',
      },
    ],
  },

I got errors on folders with correct kebab-case name:

Users/adrian/Workspace/my-project/src/app/components/announcement/modal/modal.component.ts
  9:5  error  The folder "modal.component.ts" does not match the "KEBAB_CASE" style  check-file/folder-naming-convention

/Users/adrian/Workspace/my-project/src/app/components/status-dot/status-dot.component.ts
  0:1  error  The folder "status-dot.component.ts" does not match the "KEBAB_CASE" style  check-file/folder-naming-convention

/Users/adrian/Workspace/my-project/src/app/page/authorized-area/account/activities/activities.component.ts
  16:5  error  The folder "activities.component.ts" does not match the "KEBAB_CASE" style  check-file/folder-naming-convention

/Users/adrian/Workspace/my-project/src/app/page/authorized-area/export/download-history/download-history.component.ts
  18:5  error  The folder "download-history.component.ts" does not match the "KEBAB_CASE" style  check-file/folder-naming-convention

/Users/adrian/Workspace/my-project/src/app/page/authorized-area/export/last-update/last-update.component.ts
  16:5  error  The folder "last-update.component.ts" does not match the "KEBAB_CASE" style  check-file/folder-naming-convention

/Users/adrian/Workspace/my-project/src/app/page/authorized-area/export/list/item/item.component.ts
  21:5  error  The folder "item.component.ts" does not match the "KEBAB_CASE" style  check-file/folder-naming-convention

I used also regex +([a-z0-9])*(-+([a-z0-9])) but still the same result.

Problem with check-file/folder-naming-convention

Describe the bug
cannot exclude folders named tests

Expected behavior
'check-file/folder-naming-convention' : I would like to check every name's folder except tests

Project structure

Capture dโ€™eฬcran 2024-03-04 aฬ€ 16 19 29

Here is how I am using it :
'check-file/folder-naming-convention': [
'error',
{
'src/components!(tests)/**/': 'CAMEL_CASE',
},
],

'KEBAB_CASE' fails on dot notation

When using KEBAB_CASE filename convention. It is not uncommon to use the .test.js file extension as a filename convention for tests.

 โ””โ”€โ”€ src
     โ””โ”€โ”€ my-module.js
 โ””โ”€โ”€ tests
     โ””โ”€โ”€ my-module.test.js

However, this causes the KEBAB_CASE filename enforcement to fail for { "**/*.js": "KEBAB_CASE" } This can currently be worked around with a custom Regex, however, I wanted to bring attention to this.

Is this desired behavior?

check-file/filename-naming-convention application is not working as expected with custom matching

Describe the bug
check-file/filename-naming-convention application is not working as expected with custom matching

Expected behavior
I expected it to work with custom glob matching

Plugin configuration

  "check-file/filename-naming-convention": [
      "error",
      {
        "**/tests/e2e/*": "*.{spec,test}.e2e.ts",
      },
    ]

Desktop (please complete the following information):

  • OS: macos

Additional context
It prints the error The filename "my-controller.spec.e2e.ts" does not match the "*.{spec,test}.e2e.ts" pattern
Even thought console.log(micromatch.isMatch('my-controller.spec.e2e.ts', '*.{spec,test}.e2e.ts')) // returns true
Is there anything i am doing wrong or is there a bug with this?

Glob exclusion on non-root level does not apply recursively to all sub-folders

Describe the bug
Given a config like

		'check-file/folder-naming-convention': [
			'error',
			{
				'src/pages/**': 'KEBAB_CASE'',
				'src/!(pages)/**': 'CAMEL_CASE',
			}
               ]

Then the following folder-names are considered valid:

  • src/pages/first-page/**
  • src/components/visual/interactiveButton/**
  • src/components/visual/interactive-button/**

Expected behavior

  • src/components/visual/interactive-button/** should not be valid, because interactive-buttonis violating the CAMEL_CASE rule.

Project structure

.
โ””โ”€โ”€ src
    โ””โ”€โ”€ components
        โ””โ”€โ”€ visual
            โ””โ”€โ”€ interactive-button // should fail here!
                 โ””โ”€โ”€ SomeFile.tsx
            โ””โ”€โ”€ interactiveButton // should be the only valid format
                 โ””โ”€โ”€ SomeFile.tsx
    โ””โ”€โ”€ pages
        โ””โ”€โ”€ first-page
            โ””โ”€โ”€ page.tsx

Desktop (please complete the following information):

  • OS: Ubuntu 23.04

Additional information
This bug only exist if the exclusion is applied on a sub-folder. It doesn't exist if the root-folder (here src) is excluded.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.