Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bemlinter.js

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bemlinter.js

BEM linter

  • 0.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

bemlinter.js Build Status

A cli tool to lint bem component isolation in SCSS files

The main rules are:

  1. A SCSS component should only contain its own classes

  2. A SCSS file, even if it is not a component, should not style a class of another component

Quick start

npm i bemlinter.js --save

You can set your package.json to use bemlinter:

{
  "scripts": {
    "lint": "bemlinter the/path/to/your/*.scss"
  }
}

Configuration file

If you need more configuration you can use a configuration file:

{
  "scripts": {
    "lint": "bemlinter --config .bemlinter"
  }
}

The configuration file is a json file:

sources

To define the paths of your source files

{
  "sources": [
    "a/path/to/your/scss/*.scss",
    "a/path/to/a/specific/scss/main.scss
  ]
}

excludePath (option)

To define the paths of some exclude source files

default: []

{
  "excludePath": [
    "an/exclude/path/of/scss/*.scss"
  ]
}

excludeComponent (option)

To define the names of some component that are not isolated yet, so the linter will be kind ;)

default: []

{
  "excludeComponent": [
    "messed-up-component",
    "disorder-file",
    "old-component"
  ]
}

checkLowerCase (option)

To disable lower case check

default: true

{
  "checkLowerCase": false
}

prefix (option)

To set the authorized prefix

default: ['']

{
  "prefix": ["c-"]
}

How to Contribute

  1. Star the project!
  2. Report a bug that you have found.
  3. Tweet or blog about sass-test.sh and Let me know about it.
  4. Pull requests are also highly appreciated.

Author & Community

bemlinter.js is under MIT License.
It was created & is maintained by Thomas ZILLIOX.

Keywords

FAQs

Package last updated on 06 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc