stylelint-config | Default stylelint config used by @ atolye15 | Style Language library
kandi X-RAY | stylelint-config Summary
kandi X-RAY | stylelint-config Summary
Default stylelint config used by @atolye15
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stylelint-config
stylelint-config Key Features
stylelint-config Examples and Code Snippets
Community Discussions
Trending Discussions on stylelint-config
QUESTION
I'm trying to add Stylelint to a brand new NextJS Typescript project with EmotionJS and almost no rules works on my styles files, the only error that I manage to see was Unknown word CssSyntaxError
.
This Unknown word
error happens because I'm using CSS in JS syntax and was fixed adding this line on .eslintrc
as I figure out here
ANSWER
Answered 2022-Mar-26 at 23:03I tried to reach the core projects of this questions.
Unfortunately for EmotionJS its needed to create a EmotionJS Stylelint Custom Syntax. For further information read the discussion: https://github.com/emotion-js/emotion/discussions/2694
QUESTION
I am currently setting up a boilerplate with React, Typescript, styled components, webpack etc. and I am getting an error when trying to run eslint:
Error: Must use import to load ES Module
Here is a more verbose version of the error:
...ANSWER
Answered 2022-Mar-15 at 16:08I think the problem is that you are trying to use the deprecated babel-eslint parser, last updated a year ago, which looks like it doesn't support ES6 modules. Updating to the latest parser seems to work, at least for simple linting.
So, do this:
- In package.json, update the line
"babel-eslint": "^10.0.2",
to"@babel/eslint-parser": "^7.5.4",
. This works with the code above but it may be better to use the latest version, which at the time of writing is 7.16.3. - Run
npm i
from a terminal/command prompt in the folder - In .eslintrc, update the parser line
"parser": "babel-eslint",
to"parser": "@babel/eslint-parser",
- In .eslintrc, add
"requireConfigFile": false,
to the parserOptions section (underneath"ecmaVersion": 8,
) (I needed this or babel was looking for config files I don't have) - Run the command to lint a file
Then, for me with just your two configuration files, the error goes away and I get appropriate linting errors.
QUESTION
i have been trying to find documentation on this but i havent been able to. I use stylint in a project and we have the css order option activated. I haven't been able to set up VS code to show the errors and i haven't found a page with the information to actually know the order,so i always need to check on compile time if i have any mistakes in the CSS order properties, and it shows a huge error on screen.
this are the stylelint rules we have
...ANSWER
Answered 2022-Feb-24 at 16:46You are extending the stylelint-config-concentric-order community config. This config includes and configures the stylelint-order community plugin. You can find the order of the properties in the repo on GitHub.
You can see Stylelint errors in VS Code using the official Stylelint extension.
And you can have the extension automatically fix problems on save, which will include the order of your properties, using the editor.codeActionsOnSave
configuration property:
QUESTION
I'm trying to configure a visual studio code project to format SCSS code according to WordPress standards. So far I've done the following but no indication of errors and no formatting occurs on save.
Installed the stylelint extension, also have prettier installed.
Installed the stylelint-config package:
npm install @wordpress/stylelint-config --save-dev
Added the following lines to package.json to format SCSS:
"stylelint": {
"extends": "@wordpress/stylelint-config/scss"
},
No errors are displayed and no formatting is corrected on save.
I have 'format on save' enabled.
As I want stylelint to format the code, I've added the following lines to settings.json to use stylelint instead of prettier for formatting SCSS:
...ANSWER
Answered 2022-Feb-22 at 17:25The official Stylelint VS Code extension will only lint CSS and PostCSS by default.
You should use specify "scss"
the stylelint.validate
property:
QUESTION
I am working on project upgrade from Vue 2 to Vue 3. The code base changed according to Vue migration documents: https://v3.vuejs.org/guide/migration/introduction.html#overview. I have mismatch of above mentioned libraries. Does somebody has a running project and would share their working library versions
Current mismatch error is :
...ANSWER
Answered 2022-Feb-18 at 14:50My colleague solved it by moving to Vite. My suggestion would be to drop webpack and use Vite instead.
Migration guide for Vue 2 to 3 here: https://v3-migration.vuejs.org/ Vuetify migration guide: https://next.vuetifyjs.com/en/getting-started/upgrade-guide
QUESTION
I have stylelint installed in my project, and I've configured its configuration.
I added a script to run this linter on my src
folder.
For some reason, the linter scans only one folder.
Here is my configuration file stylelint.config.js:
...ANSWER
Answered 2022-Feb-17 at 19:57You need to quote your input glob, otherwise the shell (which differs on Windows and Mac) will interpret it rather than Stylelint itself.
If you're only targeting *nix, you can use single quotes:
QUESTION
In my latest project, I'm using laravel-mix with the built in browserSync, and I've added tailwindCss as a package.
This is the webpack.mix.js
file:
ANSWER
Answered 2022-Feb-15 at 22:01Ah, I think I discovered what's going on here. Looks like it's a known issue with Webpack documented by Tailwind themselves:
If your CSS seems to be rebuilding in an infinite loop, there’s a good chance it’s because your build tool doesn’t support the glob option when registering PostCSS dependencies.
Many build tools (such as webpack) don’t support this option, and as a result we can only tell them to watch specific files or entire directories. We can’t tell webpack to only watch *.html files in a directory for example.
That means that if building your CSS causes any files in those directories to change, a rebuild will be triggered, even if the changed file doesn’t match the extension in your glob.
And here's their recommendation:
To solve this problem, use more specific paths in your content config, making sure to only include directories that won’t change when your CSS builds:
QUESTION
I'm trying to use the following code:
@apply w-[calc(theme(width.1/3)_-_1rem)]
which according to the docs, should work. But every time I try and compile the code I get the following error:
ANSWER
Answered 2022-Jan-17 at 19:05It seems Tailwind cannot take a value from config file on the fly (within square brackets in a JIT mode). I see the option to register custom width class within configuration file like
QUESTION
I tried to follow every comment with a possible solution here to the letter. I relied on an example project on github as well which works perfectly.
This also started to happen to me after updating everything manually and when running the nx test command, occurrs this error.
My jest.config.js inside apps/my-app:
...ANSWER
Answered 2022-Jan-13 at 22:47From what I've found online, this seems like a common issue to projects using Jest and upgrading to Angular 13. Our project doesn't use nx
but are the updates to our Jest config:
QUESTION
I have a project that make use of styled-components and I just have installed Stylelint
following the official guide[1].
My .stylelintrc.json
already have declaration-no-important set to true
but seems have no effect, because I have one component that make use of !important
(see bellow)
ANSWER
Answered 2022-Jan-11 at 14:19Could you try this instead?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install stylelint-config
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page