commit 51a816c2a463c703c3aafb97c99096d2cb571379 Author: Matthias Kretschmann Date: Tue May 30 19:14:24 2017 +0200 ✨ initial commit diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..b64e0cd --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ + +# EditorConfig is awesome: http://EditorConfig.org + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +insert_final_newline = true +charset = utf-8 +trim_trailing_whitespace = true + +[*.json] +indent_size = 2 diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..eda0d65 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,6 @@ +{ + "extends": "ascribe", + "rules": { + "semi": 0 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..22fbdbe --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +yarn.lock +package-lock.json diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..83a38c6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: node + +notifications: + email: false diff --git a/index.js b/index.js new file mode 100644 index 0000000..e4d9aa9 --- /dev/null +++ b/index.js @@ -0,0 +1,37 @@ +module.exports = { + 'extends': 'stylelint-config-standard', + 'rules': { + 'indentation': 4, + 'string-quotes': 'single', + 'no-duplicate-selectors': true, + 'color-hex-case': 'lower', + 'color-hex-length': 'short', + 'color-named': 'never', + 'selector-no-qualifying-type': true, + 'selector-no-id': true, + 'selector-combinator-space-after': 'always', + 'selector-attribute-quotes': 'always', + 'selector-attribute-operator-space-before': 'never', + 'selector-attribute-operator-space-after': 'never', + 'selector-attribute-brackets-space-inside': 'never', + 'declaration-block-trailing-semicolon': 'always', + 'declaration-empty-line-before': false, + 'declaration-no-important': true, + 'declaration-colon-space-before': 'never', + 'declaration-colon-space-after': 'always', + 'number-leading-zero': 'never', + 'function-url-quotes': 'always', + 'font-weight-notation': 'numeric', + 'font-family-name-quotes': 'always-where-recommended', + 'comment-whitespace-inside': 'always', + 'comment-empty-line-before': 'always', + 'selector-pseudo-element-colon-notation': 'single', + 'selector-pseudo-class-parentheses-space-inside': 'never', + 'selector-no-type': true, + 'media-feature-range-operator-space-before': 'always', + 'media-feature-range-operator-space-after': 'always', + 'media-feature-parentheses-space-inside': 'never', + 'media-feature-colon-space-before': 'never', + 'media-feature-colon-space-after': 'always' + } +} diff --git a/license b/license new file mode 100644 index 0000000..3cda2b3 --- /dev/null +++ b/license @@ -0,0 +1,13 @@ +Copyright 2017 BigchainDB GmbH + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/media/cat-linter-fail.gif b/media/cat-linter-fail.gif new file mode 100644 index 0000000..8cc4599 Binary files /dev/null and b/media/cat-linter-fail.gif differ diff --git a/media/repo-banner.sketch b/media/repo-banner.sketch new file mode 100644 index 0000000..e10286e Binary files /dev/null and b/media/repo-banner.sketch differ diff --git a/media/repo-banner@2x.png b/media/repo-banner@2x.png new file mode 100644 index 0000000..312ffb0 Binary files /dev/null and b/media/repo-banner@2x.png differ diff --git a/package.json b/package.json new file mode 100644 index 0000000..7d640d6 --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "name": "stylelint-config-bigchaindb", + "version": "1.0.0", + "description": "For consistent CSS across BigchainDB, IPDB & ascribe's repos.", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "eslint . --ignore-path .gitignore" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/bigchaindb/stylelint-config-bigchaindb.git" + }, + "author": { + "name": "Matthias Kretschmann", + "email": "matthias@bigchaindb.com" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/bigchaindb/stylelint-config-bigchaindb/issues" + }, + "homepage": "https://github.com/bigchaindb/stylelint-config-bigchaindb#readme", + "devDependencies": { + "babel-eslint": "^7.2.3", + "eslint": "^3.19.0", + "eslint-config-ascribe": "^3.0.1", + "eslint-plugin-import": "^2.3.0" + }, + "peerDependencies": { + "stylelint": "^7.8.0" + } +} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..117d659 --- /dev/null +++ b/readme.md @@ -0,0 +1,41 @@ +# [![stylelint-config-bigchaindb](media/repo-banner@2x.png)](https://www.bigchaindb.com) + +> 💅 For consistent CSS across BigchainDB, IPDB & ascribe's repos. Extends on [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) + +[![npm](https://img.shields.io/npm/v/stylelint-config-bigchaindb.svg)](https://www.npmjs.com/package/stylelint-config-bigchaindb) +[![Build Status](https://travis-ci.org/bigchaindb/stylelint-config-bigchaindb.svg?branch=master)](https://travis-ci.org/bigchaindb/stylelint-config-bigchaindb) +[![Greenkeeper badge](https://badges.greenkeeper.io/bigchaindb/stylelint-config-bigchaindb.svg)](https://greenkeeper.io/) + +This cat clearly forgot to lint her CSS before deployment: + +![cat not linting correctly](media/cat-linter-fail.gif) + +Don't be like that cat. + +## Installation + +```bash +npm install stylelint-config-bigchaindb +``` + +## Usage + +Add this to your `.stylelintrc` file: + +```json +{ + "extends": "stylelint-config-bigchaindb" +} +``` + +Then use `stylelint` against your css files, e.g.: + +```bash +stylelint *.scss +``` + +Or lint in your editor with one of the many editor plugins for [stylelint](https://stylelint.io), e.g. for Atom: + +```bash +apm install linter-stylelint +```