Code Monkey home page Code Monkey logo

Comments (12)

CSM-800 avatar CSM-800 commented on August 16, 2024 1

Yes, and there was no problem.
I had a question of understanding.

from stylelint-config-standard.

ybiquitous avatar ybiquitous commented on August 16, 2024

@CSM-800 Thanks for using the template.

Since stylelint-config-standard has a dependency on stylelint-config-recommended, any package managers should install stylelint-config-recommended automatically when installing stylelint-config-standard.

"dependencies": {
"stylelint-config-recommended": "^9.0.0"
},

I don't think it's necessary to explain it because this package managers' behavior is common.

What kind of trouble do you have?

from stylelint-config-standard.

CSM-800 avatar CSM-800 commented on August 16, 2024

I interpret your answer to my question as "yes".

I installed "stylelint" and "stylelint-config-standard" via npm on macOS and it did not load "stylelint-config-recommended" automatically.

I don't have any errors and don't see any.

Because of the hints everywhere that the standard config extends the recommend and I have no errors although the recommend config is not present I wanted to know this more precisely to be able to understand whether I need this or not.

from stylelint-config-standard.

ybiquitous avatar ybiquitous commented on August 16, 2024

Umm..., is it possible to provide your reproduction info about "don't have any errors and don't see any"? For example:

  • package.json
  • .stylelintrc.json (or another format like .js)
  • Your CSS code

from stylelint-config-standard.

CSM-800 avatar CSM-800 commented on August 16, 2024

The error display related to CSS works.

I meant that there is no error because of the missing recommend config. I have installed only "stylint" and "stylelint-config-standard". And still everything works.

Can't describe it better because I don't know english that well.

from stylelint-config-standard.

ybiquitous avatar ybiquitous commented on August 16, 2024

Did you configure Stylelint via .stylelintrc.json like this?

{
  "extends": "stylelint-config-standard"
}

If doing so, I believe stylelint-config-recommended should be loaded automatically: 🤔

extends: 'stylelint-config-recommended',

See also https://github.com/stylelint/stylelint-config-standard#usage

from stylelint-config-standard.

CSM-800 avatar CSM-800 commented on August 16, 2024

That's exactly how I configured it.

from stylelint-config-standard.

ybiquitous avatar ybiquitous commented on August 16, 2024

Then, could you please share your CSS code?

from stylelint-config-standard.

CSM-800 avatar CSM-800 commented on August 16, 2024

Yes, my scss code.

.entry {
	.entry-content {
		> {
			.wp-block-group,
			.wp-block-columns,
			.wp-block-media-text,
			.wp-block-cover,
			.wp-block-separator {
				margin-top: 3rem;
				margin-bottom: 3rem;
			}
		}

		*:last-child {
			margin-bottom: 0;
		}

		.wp-block-separator {
			border-top: 5px solid $primary;
		}

		.img-4x3 {
			margin-bottom: 0;

			img {
				aspect-ratio: 4/3;
				object-fit: cover;
			}
		}
	}
}

from stylelint-config-standard.

ybiquitous avatar ybiquitous commented on August 16, 2024

Thanks. When running the command npx stylelint a.css, I can see many errors on my console:

@ybiquitous ➜ /workspaces/codespaces-blank $ npx stylelint a.scss
/workspaces/codespaces-blank/a.scss: When linting something other than CSS, you should install an appropriate syntax, e.g. "postcss-scss", and use the "customSyntax" option

a.scss
  2:2  ✖  Expected indentation of 2 spaces          indentation                     
  3:3  ✖  Expected indentation of 4 spaces          indentation                     
  4:4  ✖  Expected indentation of 6 spaces          indentation                     
  5:4  ✖  Expected indentation of 6 spaces          indentation                     
  6:4  ✖  Expected indentation of 6 spaces          indentation                     
  7:4  ✖  Expected indentation of 6 spaces          indentation                     
  8:4  ✖  Expected indentation of 6 spaces          indentation                     
  9:5  ✖  Expected indentation of 8 spaces          indentation                     
 10:5  ✖  Expected indentation of 8 spaces          indentation                     
 11:4  ✖  Expected indentation of 6 spaces          indentation                     
 12:3  ✖  Expected indentation of 4 spaces          indentation                     
 14:3  ✖  Expected indentation of 4 spaces          indentation                     
 15:4  ✖  Expected indentation of 6 spaces          indentation                     
 16:3  ✖  Expected indentation of 4 spaces          indentation                     
 18:3  ✖  Expected indentation of 4 spaces          indentation                     
 19:4  ✖  Expected indentation of 6 spaces          indentation                     
 20:3  ✖  Expected indentation of 4 spaces          indentation                     
 22:3  ✖  Expected indentation of 4 spaces          indentation                     
 23:4  ✖  Expected indentation of 6 spaces          indentation                     
 25:4  ✖  Expected indentation of 6 spaces          indentation                     
 26:5  ✖  Expected indentation of 8 spaces          indentation                     
 27:5  ✖  Expected indentation of 8 spaces          indentation                     
 28:4  ✖  Expected indentation of 6 spaces          indentation                     
 29:3  ✖  Expected indentation of 4 spaces          indentation                     
 30:2  ✖  Expected indentation of 2 spaces          indentation                     
 31:1  ✖  Unexpected missing end-of-source newline  no-missing-end-of-source-newline

26 problems (26 errors, 0 warnings)

Can you try to confirm the behavior on my codespace?

If using SCSS instead of the standard CSS, I recommend switching to stylelint-config-standard-scss. See also the following resources:

from stylelint-config-standard.

CSM-800 avatar CSM-800 commented on August 16, 2024

Ok I realize we are talking past each other :D
I thank you anyway for your help :)

from stylelint-config-standard.

ybiquitous avatar ybiquitous commented on August 16, 2024

Is the problem resolved? If so, please feel free to close this issue.

from stylelint-config-standard.

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.