Giter Site home page Giter Site logo

sir-dunxalot / ember-cli-sass-lint Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 11.0 125 KB

Pure Node.js sass/scss linting for Ember CLI projects

License: MIT License

JavaScript 81.38% HTML 15.57% CSS 3.04%
ember-cli sass-lint ember-addon ember sass linting

ember-cli-sass-lint's People

Contributors

chrisvdp avatar ember-tomster avatar kuatsure avatar lukemelia avatar phillbaker avatar robbiethewagner avatar rwjblue avatar yoranbrondsema avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ember-cli-sass-lint's Issues

TestLoader Failure

Linting seems to work properly and report errors and warnings at the start of testing, but then I get these two failures which ultimately fail the build:

not ok 10 PhantomJS 1.9 - TestLoader Failures ecommerce/tests/app.sass-lint-test: could not be loaded
    ---
        message: >
            Can't find variable: module
        stack: >
            ReferenceError: Can't find variable: module
                at http://localhost:7357/assets/tests.js:67
                at http://localhost:7357/assets/vendor.js:92
                at http://localhost:7357/assets/vendor.js:142
                at findModule (http://localhost:7357/assets/vendor.js:190)
                at http://localhost:7357/assets/vendor.js:177
                at http://localhost:7357/assets/test-loader.js:67
                at http://localhost:7357/assets/test-loader.js:58
                at http://localhost:7357/assets/test-loader.js:89
                at http://localhost:7357/assets/test-support.js:25971
        Log: |
    ...
not ok 11 PhantomJS 1.9 - TestLoader Failures ecommerce/tests/app.sass-lint-test: could not be loaded
    ---
        message: >
            Can't find variable: module
        stack: >
            ReferenceError: Can't find variable: module
                at http://localhost:7357/assets/tests.js:67
                at http://localhost:7357/assets/vendor.js:92
                at http://localhost:7357/assets/vendor.js:142
                at findModule (http://localhost:7357/assets/vendor.js:190)
                at http://localhost:7357/assets/vendor.js:177
                at http://localhost:7357/assets/test-loader.js:67
                at http://localhost:7357/assets/test-loader.js:58
                at http://localhost:7357/assets/test-loader.js:89
                at http://localhost:7357/assets/test-support.js:25971
        Log: |
    ...

What do I need to do to fix this? I'm using Mocha/Chai instead of Qunit. Thanks!

Linting in addon

I am trying to install ember-cli-sass-lint in an addon with the following simplified folder structure:

addon
app
-- styles
    -- my-addon-name
        addon.scss
        _partial1.scss
        _partial2.scss

In my (dummy) app's app.scss I then use

import 'my-addon-name/addon';

Which works well so far. However, I cannot get the files in app/styles to lint. I tried to include the example config file, slightly adapted:

#########################
## Sample Sass Lint File
#########################
# Linter Options
# options:
# File Options
files:
  include: 'app/styles/**/*.scss'
# Rule Configuration
rules:
  extends-before-mixins: 2
  extends-before-declarations: 2
  placeholder-in-extend: 2
  mixins-before-declarations:
    - 2
    -
      exclude:
        - breakpoint
        - mq

  no-warn: 1
  no-debug: 1
  no-ids: 2
  no-important: 2
  hex-notation:
    - 2
    -
      style: uppercase
  indentation:
    - 2
    -
      size: 2
  property-sort-order:
    - 1
    -
      order:
        - display
        - margin
      ignore-custom-properties: true
  variable-for-property:
    - 2
    -
      properties:
        - margin
        - content

But it is only linting the app.scss file from the dummy app.

Lint entire app tree to include .scss/.sass files in pod-style dirs

I'd like to propose changing the tree passed to broccoli-sass-lint from this.app.trees.styles as currently implemented to this.app.trees.app. The latter is a superset of the former, and it results in including .scss/.sass files that are colocated with their components in app/components subdirectories. I don't think there would be an appreciable performance hit or other problems.

File options ignored

All file options seem to be ignored. Even when setting it to include nonsense files, it still uses the sass-lint default glob pattern of **/*.s+(c|a)ss. I've tried using the following, but it still tries to lint every scss file in the project.

files:
  include: '*.asdasdasd'
  ignore:
    - '**/semantic-ui/**/*.scss'
    - '**/auth0-override.scss'
    - '**/login.scss'
    - '**/header.scss'
    - '**/banners.scss'
rules:
  property-sort-order: 0
  ....

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.