stylefmt icon indicating copy to clipboard operation
stylefmt copied to clipboard

Error: Undefined rule font-family-no-missing-generic-family-keyword

Open sergeysova opened this issue 7 years ago • 13 comments

.stylelintrc

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

sergeysova avatar Feb 01 '18 13:02 sergeysova

still not fixed?

allex avatar Feb 02 '18 09:02 allex

Same error with recommended config

sergeysova avatar Feb 02 '18 09:02 sergeysova

Same error with rule no-duplicate-at-import-rules

sergeysova avatar Feb 02 '18 09:02 sergeysova

I'm also getting this error with stylefmt 6.0.0 and the same config,

Since this library appears to be unmaintained, I'd recommend this package instead:

https://github.com/kennyinthirathclq/stylefmt/

yarn add --dev https://github.com/kennyinthirathclq/stylefmt/tarball/6a5be19ef62f353f866740726d91e5bcceade650

Run via a package.json command with:

"lint-styles-fix": "node ./node_modules/stylefmt-kenny/bin/cli.js -r app/scss/*.scss",

Nantris avatar Apr 06 '18 18:04 Nantris

Gives the same error for me. Needs to be fixed.

ronilaukkarinen avatar Nov 06 '18 10:11 ronilaukkarinen

This bug also affects gulp-stylefmt and sublime-stylefmt. For googlers, this can be fixed easily by updating the dependencies of stylefmt:

  1. cd to node_modules/stylefmt (with gulpstylefmt it's under node_modules/gulp-stylefmt/node_modules/stylefmt and with sublime-stylefmt under ~/Library/Application Support/Sublime Text 3/Packages/Stylefmt/node_modules/stylefmt)
  2. Run ncu -u (npm package npm-check-updates has to be installed)
  3. Update dependencies with npm update

These changes should eventually be added to stylefmt repository.

ronilaukkarinen avatar Nov 07 '18 09:11 ronilaukkarinen

Note to self, need to copy stylelint directly under gulp-stylefmt: sudo cp -Rv /usr/local/lib/node_modules/stylelint "/Users/rolle/Projects/airdev/content/themes/air-light/node_modules/gulp-stylefmt/node_modules/"

See also.

ronilaukkarinen avatar Nov 07 '18 10:11 ronilaukkarinen

@ronilaukkarinen I ran went into Application Support/ST3/stylefmt/node_modules/etc.... and ran npm update and then npm install for good measure.

I'm still seeing the error. Did this fix it in sublime for you?

saltcod avatar Nov 13 '18 10:11 saltcod

@saltcod Nope, because stylelint is not included in the package.json of sublime-stylefmt, it comes directly from node_modules that is included within the repo, see this.

Let me clarify the issue and all the others this is related.

This repository

Stylelint version in package.json of stylefmt is currently 7.10.1, newest is 9.8.0.

sublime-stylefmt

Only fix I've seen working is to manually overwrite globally installed stylelint folder with the newer version. Updated my devpackages Known issues for this reason and also to my WordPress theme issue tracker and also opened issue #26.

gulp-stylefmt

Gulp-stylefmt in the other hand has old stylefmt version in package.json that needs to be update for this to get solved and stylelint version of stylefmt updated after.

ronilaukkarinen avatar Nov 13 '18 11:11 ronilaukkarinen

Wow. That's a lot of headache there. Looking like I can't use sublime anymore b/c we just added stylelint to our tooling, and prettier is a deal-breaker for me now. Hooray for the future.

saltcod avatar Nov 13 '18 12:11 saltcod

Yeah, for our team we have the "install global stylelint and overwrite dependencies" commands in our build scripts and workflow so that "solves" it for now, but of course I expect these to get really solved in the future.

ronilaukkarinen avatar Nov 13 '18 12:11 ronilaukkarinen

For reference:

I still use stylefmt daily and all you need for it to work is update stylelint to latest version and run npm update... this repo has not been updated for two years now and I'm getting frustrated since at least 5 other tools (like vscode and gulp plugins referenced above) are outdated as well because of outdated stylefmt dependencies. I have emailed the maintainer if he would be willing to share access, here's one active maintainer that would close most of the issues just with npm update... there are pull requests and issues that are almost all related to this one and only problem - maintainer unresponsive.

I hope we get more muscle power to keep stylefmt alive as I love it. It's way better than prettier and others when developing SCSS/CSS in my honest opinion. Prettier and others concentrate too much on JS and other languages rather than CSS which is my top lang. I hope @morishitter will read these messages, there are still people who use stylefmt daily.

ronilaukkarinen avatar Jul 14 '20 08:07 ronilaukkarinen

FYI anyone who still might follow the stylefmt project. I have discontinued using gulp-stylefmt and sublime-stylefmt in favor of VSCode for the better part of the year. For this reason I have created vscode-stylefmt that uses my active fork of stylefmt (will release an npm package of the fork with unit tests soon!) with permission of the original maintainer of vscode-stylefmt.

ronilaukkarinen avatar Oct 19 '20 21:10 ronilaukkarinen