{"id":19050912,"url":"https://github.com/tomasbasham/ember-cli-scss-lint","last_synced_at":"2025-04-24T01:24:05.104Z","repository":{"id":34707285,"uuid":"38683539","full_name":"tomasbasham/ember-cli-scss-lint","owner":"tomasbasham","description":"An ember-cli addon to integrate sass-lint for standards adherence and improved style consistency","archived":false,"fork":false,"pushed_at":"2022-12-06T22:16:24.000Z","size":1062,"stargazers_count":7,"open_issues_count":10,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T05:31:35.842Z","etag":null,"topics":["ember-addon","ember-cli","sass-lint","scss","standards-adherence","stylesheets"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomasbasham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-07T11:31:32.000Z","updated_at":"2019-02-18T12:54:34.000Z","dependencies_parsed_at":"2023-01-15T08:41:01.924Z","dependency_job_id":null,"html_url":"https://github.com/tomasbasham/ember-cli-scss-lint","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasbasham%2Fember-cli-scss-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasbasham%2Fember-cli-scss-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasbasham%2Fember-cli-scss-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasbasham%2Fember-cli-scss-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomasbasham","download_url":"https://codeload.github.com/tomasbasham/ember-cli-scss-lint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249375355,"owners_count":21260161,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ember-addon","ember-cli","sass-lint","scss","standards-adherence","stylesheets"],"created_at":"2024-11-08T23:16:39.402Z","updated_at":"2025-04-17T20:32:50.667Z","avatar_url":"https://github.com/tomasbasham.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-cli-scss-lint [![Build Status](https://travis-ci.com/tomasbasham/ember-cli-scss-lint.svg?branch=master)](https://travis-ci.com/tomasbasham/ember-cli-scss-lint) [![Maintainability](https://api.codeclimate.com/v1/badges/c14cf45a0ef5339b5104/maintainability)](https://codeclimate.com/github/tomasbasham/ember-cli-scss-lint/maintainability)\n\nAn [Ember CLI](https://ember-cli.com/) addon to integrate\n[sass-lint](https://github.com/sasstools/sass-lint) for standards adherence and\nimproved style consistency.\n\nOne of the many great features of Ember CLI is its rich toolset surrounding the\nframework such as eslint. This provides you with the ability to more easily\nwrite consistent and self documenting code that any developer could understand.\nHowever there is currently no similar feature to lint your stylesheets.\n\nIf you choose to compose your stylesheets using a preprocessor language such as\nSCSS you will equally find no support to ensure your code follows best\npractice. This addon solves this by integrating the `sass-lint` nodejs package\ninto the Ember CLI build process.\n\nPrevious versions of this addon made use of the Ruby implementation of\n[scss-lint](https://github.com/brigade/scss-lint). However the Sass core team\nis now building Sass in Dart instead of Ruby, and will no longer be maintaining\nthe Ruby implementation. Since `scss-lint` relies on the Ruby Sass\nimplementation, this means it will eventually not support the latest Sass\nfeatures and bug fixes. As such `sass-lint` has taken over in it's place which\noffers better integration into an already JavaScript pipeline.\n\n## Compatibility\n\n* Ember.js v2.18 or above\n* Ember CLI v2.13 or above\n\n## Installation\n\nFrom within your Ember CLI project directory run:\n```\nember install ember-cli-scss-lint\n```\n\n## Usage\n\nEvery time you run an Ember CLI process that requires building the application\n(`ember server`, `ember test`, `ember build`) your stylesheets will be linted\nand any errors output to the command line.\n\n```\n$ ember s\nversion: 1.13.13\nLivereload server on http://localhost:49154\nServing on http://localhost:4200/\n\npartials/_pagination.scss\n  1:1   warning  Type-selector should be nested within its parent Class   force-element-nesting\n  1:1   warning  Class should be nested within its parent Type-selector   force-element-nesting\n  1:24  warning  Qualifying elements are not allowed for class selectors  no-qualifying-elements\n\n✖ 3 problems (0 errors, 3 warnings)\n\nBuild successful - 24281ms.\n```\n\n### Configuration\n\n#### sass-lint.yml\n\nLinting can be configured by creating a `.sass-lint.yml` file in the root\ndirectory of your Ember CLI project alongside your `.eslintrc` file. If you\nalready have a config for `scss-lint`, you can instantly convert it to the\nequivalent `sass-lint` config\n[here](sasstools.github.io/make-sass-lint-config).\n\n##### Configuration Example\n\n```yml\nfiles:\n  include: '**/*.scss'\n\noptions:\n  formatter: stylish\n  merge-default-rules: false\n\nrules:\n  border-zero:\n    - 1\n    - convention: zero\n\n  brace-style:\n    - 1\n    - allow-single-line: true\n\n  ...\n```\n\n#### ember-cli-build.js\n\nAny configuration option you can set within the `.sass-lint.yml` file can also\nbe set within the `ember-cli-build.js` file of the consuming application. Any\noption here will take precedence over those in the `.sass-lint.yml` file. This\nis useful when needing to programmatically define rule sets depending upon some\ncondition.\n\n##### JavaScript Configuration Example\n\n```JavaScript\n// ember-cli-build.js\nconst EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function(defaults) {\n  let app = new EmberApp(defaults, {\n    scssLintOptions: {\n      rules: [\n        'border-zero': 2,\n        'brace-style': 0\n      ]\n    }\n  });\n\n  return app.toTree();\n};\n```\n\nFor more information on the available rules see the [sass-lint linters\ndocumentation](https://github.com/sasstools/sass-lint/tree/master/docs/rules).\n\n#### Adding trees\n\nBy default this addon forwards the entire app tree to be linted, but will not\nlint any files outside of the `app` folder. For most use cases this will be\nsufficient, but for others this is limiting. If for example you wish to lint\nfiles contained within the `vendor` tree you must tell the addon to do so. This\ncan be done within the `ember-cli-build.js` file.\n\n##### Trees Example\n\n```JavaScript\n// ember-cli-build.js\nconst EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function(defaults) {\n  let app = new EmberApp(defaults, {\n    scssLintOptions: {\n      includePaths: [\n        'vendor'\n      ]\n    }\n  });\n\n  return app.toTree();\n};\n```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasbasham%2Fember-cli-scss-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomasbasham%2Fember-cli-scss-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasbasham%2Fember-cli-scss-lint/lists"}