{"id":25722,"library":"happiness-scss","title":"happiness-scss","description":"A SCSS/Sass linter based on sass-lint that enforces a 'happiness' style guide, similar to the JavaScript happiness linter. Current stable version is 5.3.0 (last released in 2017). It provides a CLI tool and Node.js API to check .scss and .sass files for style errors. Key differentiators: it is a simple, opinionated linter with minimal configuration, intended to bring consistency without debate. However, the project is no longer maintained, and sass-lint itself is deprecated in favor of stylelint. Use in legacy projects only.","status":"deprecated","version":"5.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/dutchenkoOleg/happiness-scss","tags":["javascript","code-style","happiness","happiness-scss","scss","sass","linter","scss-lint","sass-lint"],"install":[{"cmd":"npm install happiness-scss","lang":"bash","label":"npm"},{"cmd":"yarn add happiness-scss","lang":"bash","label":"yarn"},{"cmd":"pnpm add happiness-scss","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"happiness-scss wraps sass-lint for actual linting logic","package":"sass-lint","optional":false}],"imports":[{"note":"Package supports both CommonJS and ES modules, but sass-lint deprecation makes new projects prefer stylelint instead.","wrong":"var happiness = require('happiness-scss')","symbol":"happiness-scss","correct":"import happiness from 'happiness-scss'"},{"note":"Named export for the Linter class. The default export is the main function.","wrong":"import Linter from 'happiness-scss'","symbol":"Linter","correct":"import { Linter } from 'happiness-scss'"},{"note":"CLI export is available for programmatic use of the command-line interface.","wrong":"","symbol":"CLI","correct":"import { CLI } from 'happiness-scss'"}],"quickstart":{"code":"// Install: npm install -g happiness-scss\n// Check all .scss files in current directory and subdirectories:\nhappiness-scss\n// Or specify a glob pattern:\nhappiness-scss \"./src/**/*.scss\"\n// Use different formatter:\nhappiness-scss -f table\n// Ignore patterns:\nhappiness-scss -i \"./test/vendor/**\"\n// Node.js API:\nconst happiness = require('happiness-scss');\nhappiness.lintFiles('./src/**/*.scss', {\n  formatter: 'stylish',\n  options: {\n    'merge-default-rules': false\n  }\n}).then(results => {\n  console.log(results);\n});","lang":"javascript","description":"Shows CLI usage and Node.js API for linting SCSS/Sass files using happiness-scss."},"warnings":[{"fix":"Migrate to stylelint with stylelint-config-standard-scss.","message":"happiness-scss is no longer maintained. Use stylelint instead.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Switch to stylelint and stylelint-scss plugin.","message":"sass-lint is deprecated. happiness-scss wraps sass-lint and thus inherits its deprecation.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Use '--config' flag to specify custom config file if needed.","message":"The CLI does not respect .sass-lint.yml configuration by default; it uses its own built-in rules.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Explicitly add ignore patterns for other directories using -i option.","message":"Ignore pattern defaults to ./node_modules/** but does not ignore other common directories like .git, bower_components.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install sass-lint' as a dependency.","cause":"sass-lint dependency missing or not installed.","error":"Error: Cannot find module 'sass-lint'"},{"fix":"Install globally: 'npm install -g happiness-scss' or use npx: 'npx happiness-scss'.","cause":"happiness-scss not installed globally or not in PATH.","error":"happiness-scss: command not found"},{"fix":"Use 'const happiness = require('happiness-scss');' and call happiness.lintFiles() from v5+.","cause":"Using wrong import/require or older version without that API.","error":"TypeError: happiness.lintFiles is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}