npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

stylelint-config-cuemby

v0.0.1

Published

Style linting and rules for the Cuemby Team.

Downloads

3

Readme

stylelint-config-cuemby

npm version

This package includes a framework-less way to work with any EcmaScript 6 project in the Cuemby Team, you can add it to your .eslintrc file as an extendable configuration.

Table of contents

  1. Installation
  2. Usage
  3. ESLint Approved Code
  4. License

Installation

CLI Installation

Required to have installed Node 8+ and NPM 5+ and ESLint as a global package. Run in the command line:

npm install -g eslint
npm install -D @cuemby/eslint-config-cuemby

Afterwards you can check errors and warnings with:

eslint path/to/file.js or npm run lint

Text Editors Installation

There're many plugins available that allows you to have live linting while working on a project and can throw errors, warnings and auto-corrections on the go. It requires you to have installed the CLI version. Some are listed here:

Usage

Project Usage

Add to your .eslintrc file on the root of the project.

{
  "extends": "@cuemby/cuemby"
}

Global Usage

In case you want to follow this ruleset for all of the projects in your machine or don't want to set up a .eslintrc file for each project, you can create a root machine file, and ESLint will throw errors based on such a file when it doesn't find one in your project.

In any bash or unix based CLI:

npm install -g @cuemby/eslint-config-cuemby
touch ~/.eslinrc
echo '{"extends": "@cuemby/cuemby"}' >> ~/.eslinrc

ESLint Approved Code

Git Hook

Only allow eslint-compliant code into the commits, this ensures only great-quality code to be present in the repository.

  1. Get inside the .git folder for the project
  2. Go to hooks/ and rename commit-msg.sample to commit-msg
  3. Inside commit-msg, add the following code
#!/bin/bash
files=$(git diff --cached --name-only | grep '\.jsx\?$')

# Prevent ESLint help message if no files matched
if [[ $files = "" ]] ; then
  exit 0
fi

failed=0
for file in ${files}; do
  git show :$file | eslint $file
  if [[ $? != 0 ]] ; then
    failed=1
  fi
done;

if [[ $failed != 0 ]] ; then
  echo "ESLint failed, improve your code to commit!"
  exit $failed
fi
  1. Try to committing a file with ESLint errors, you should receive a message and being unable to commit.

    You can also run "npm run eslint-commit" locally or "@cuemby/eslint-config-cuemby eslint-commit" globally to test the Git Hook.

Disable ESLint

If for some given reason, you need to disable ESLint for a code snippet, you can do it this way wrapping the desired code, but allowing to be parsed all across the document:

/* eslint-disable */
var test = function(){}
/* eslint-enable */

In case you need to commit not eslint-compliant code for a strong reason, disable only what you need and add a comment explaining why the ESLint was disabled or that instance is not indicated to have it prevent you from committing your code.

License

(The MIT License)

Copyright © 2015-2018 Cuemby LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The software is provided 'as is', without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.