Coder Social home page Coder Social logo

Comments (7)

LitoMore avatar LitoMore commented on August 27, 2024

We could allow kebab-case and PascalCase both currently.

For markdown files, I think we don't need too much rules for restricting its name. Because we need to append some language tags (zhCN, zhTW) to our markdown files.

"unicorn/filename-case": [
	"error",
	{
		"cases": {
			"kebabCase": true,
			"pascalCase": true,
			"ignore": [
				/.*\.md$/,
				/.*\.(yml|yaml)$/,
			],
		}
	}
]

from flat.

BlackHole1 avatar BlackHole1 commented on August 27, 2024

That feels down to the fact that this rule may not apply to our situation.
How about we redevelop it on top of it?

from flat.

BlackHole1 avatar BlackHole1 commented on August 27, 2024

Or we write a script to do this. Because the main rule of eslint is the code specification, not the filename specification. Its an AST we will not be using.

How do you feel?
cc: @netless-io/developers

from flat.

Cyberhan123 avatar Cyberhan123 commented on August 27, 2024

That feels down to the fact that this rule may not apply to our situation. How about we redevelop it on top of it?

yes, you are right. other issue sindresorhus/eslint-plugin-unicorn#1577 .There seem to be other special problems

from flat.

LitoMore avatar LitoMore commented on August 27, 2024

That's what I want to mention. We are putting ourselves into a complicated situation: create another tool.

If we only use kebab-case then we have nothing to worry about.

For eslint-plugin-unicorn, if some rules will occur with lots of file changes and are hard to fix then let us disable them or mark them as warnings.

My main point is to make our project rules simple and easy to maintain.

Any thoughts?

from flat.

Cyberhan123 avatar Cyberhan123 commented on August 27, 2024

That's what I want to mention. We are putting ourselves into a complicated situation: create another tool.

If we only use kebab-case then we have nothing to worry about.

For eslint-plugin-unicorn, if some rules will occur with lots of file changes and are hard to fix then let us disable them or mark them as warnings.

My main point is to make our project rules simple and easy to maintain.

Any thoughts?

Do not worry, just write an git hook . that's enough

from flat.

LitoMore avatar LitoMore commented on August 27, 2024

Just write a git hook. that's enough.

Let's go for it.

from flat.

Related Issues (20)

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.