Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
feat: Rename package to stylelint-config-pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Aug 30, 2017
1 parent a71b5ee commit f59678a
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 45 deletions.
6 changes: 4 additions & 2 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ engines:
- .json
ratings:
paths:
- '*-config.js'
- index.js
- '*.js'
- package.json
exclude_paths:
- commitlint.config.js
- .eslintrc.js
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.eslintrc.js
commitlint.config.js
coverage
.nyc_output
8 changes: 1 addition & 7 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
coverage
.nyc_output
.eslintrc.js
test
.gitignore
.npmignore
.travis.yml
.codeclimate.yml
commitlint.config.js
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ script:
- npm run test
after_success:
- if [ -n "${CODECOV_TOKEN:-}" ]; then npm run codecov; fi
- npm run coverage
- npm run semantic-release
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# stylelint-config
# stylelint-config-pretty

Set of Stylelint [shareable config](https://stylelint.io/user-guide/configuration/).
Modular Stylelint [shareable config](https://stylelint.io/user-guide/configuration/).

[![npm](https://img.shields.io/npm/v/@metahub/stylelint-config.svg)](https://www.npmjs.com/package/@metahub/stylelint-config)
[![npm](https://img.shields.io/npm/dt/@metahub/stylelint-config.svg)](https://www.npmjs.com/package/@metahub/stylelint-config)
[![Greenkeeper badge](https://badges.greenkeeper.io/vanduynslagerp/stylelint-config.svg)](https://greenkeeper.io/)
[![license](https://img.shields.io/github/license/vanduynslagerp/stylelint-config.svg)](https://github.com/vanduynslagerp/stylelint-config/blob/master/LICENSE)
[![npm](https://img.shields.io/npm/v/stylelint-config-pretty.svg)](https://www.npmjs.com/package/stylelint-config-pretty)
[![npm](https://img.shields.io/npm/dt/stylelint-config-pretty.svg)](https://www.npmjs.com/package/stylelint-config-pretty)
[![Greenkeeper badge](https://badges.greenkeeper.io/vanduynslagerp/stylelint-config-pretty.svg)](https://greenkeeper.io/)
[![license](https://img.shields.io/github/license/vanduynslagerp/stylelint-config-pretty.svg)](https://github.com/vanduynslagerp/stylelint-config-pretty/blob/master/LICENSE)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

[![Travis](https://img.shields.io/travis/vanduynslagerp/stylelint-config.svg)](https://travis-ci.org/vanduynslagerp/stylelint-config)
[![Code Climate](https://img.shields.io/codeclimate/github/vanduynslagerp/stylelint-config.svg)](https://codeclimate.com/github/vanduynslagerp/stylelint-config)
[![Codecov](https://img.shields.io/codecov/c/github/vanduynslagerp/stylelint-config.svg)](https://codecov.io/gh/vanduynslagerp/stylelint-config)
[![Travis](https://img.shields.io/travis/vanduynslagerp/stylelint-config-pretty.svg)](https://travis-ci.org/vanduynslagerp/stylelint-config-pretty)
[![Code Climate](https://img.shields.io/codeclimate/github/vanduynslagerp/stylelint-config-pretty.svg)](https://codeclimate.com/github/vanduynslagerp/stylelint-config-pretty)
[![Codecov](https://img.shields.io/codecov/c/github/vanduynslagerp/stylelint-config-pretty.svg)](https://codecov.io/gh/vanduynslagerp/stylelint-config-pretty)

## Installation

```
$ npm install --save-dev stylelint @metahub/stylelint-config
$ npm install --save-dev stylelint stylelint-config-pretty
```

## Usage

Once the `@metahub/stylelint-config` package is installed, you can use it by specifying the different configs in the [`extends`](https://stylelint.io/user-guide/configuration/#extends) section of your [Stylelint configuration](https://stylelint.io/user-guide/configuration).
Once the `stylelint-config-pretty` package is installed, you can use it by specifying the different configs in the [`extends`](https://stylelint.io/user-guide/configuration/#extends) section of your [Stylelint configuration](https://stylelint.io/user-guide/configuration).

```js
{
'extends': ['@metahub/stylelint-config/scss-config', '@metahub/stylelint-config/order-config'],
'extends': ['pretty/scss', 'pretty/order'],
'rules': {
// Additional, per-project rules...
}
Expand All @@ -34,8 +34,8 @@ Once the `@metahub/stylelint-config` package is installed, you can use it by spe

## Config files

|Name|Description|Extends|
|:---|:-----|:----------|
|`@metahub`|Base/generic configuration||
|`@metahub/eslint-config/scss-config`|Rules specific to [Scss files](http://sass-lang.com/)|`@metahub`|
|`@metahub/eslint-config/order-config`|Rules to order properties|`@metahub`|
| Name | Description | Extends |
| --------------- | ----------------------------------------------------- | -------- |
| `@pretty` | Base/generic configuration | |
| `pretty/scss` | Rules specific to [Scss files](http://sass-lang.com/) | `pretty` |
| `pretty/order` | Rules to order properties | `pretty` |
File renamed without changes.
42 changes: 29 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@metahub/stylelint-config",
"description": "A set of shareable stylelint configs",
"name": "stylelint-config-pretty",
"description": "Modular Stylelint shareable configuration",
"version": "0.0.0-development",
"author": "Pierre Vanduynslager",
"bugs": {
"url": "https://github.com/vanduynslagerp/stylelint-config/issues"
"url": "https://github.com/vanduynslagerp/stylelint-config-pretty/issues"
},
"config": {
"commitizen": {
Expand Down Expand Up @@ -47,22 +47,36 @@
"sr-commit-analyzer": "^2.0.2",
"sr-release-notes-generator": "^1.1.2"
},
"homepage": "https://github.com/vanduynslagerp/stylelint-config#readme",
"files": [
"*.js",
"!commitlint.config.js",
"!.eslintrc.js"
],
"homepage": "https://github.com/vanduynslagerp/stylelint-config-pretty#readme",
"keywords": [
"stylelint",
"stylelint-config"
],
"license": "MIT",
"main": "index.js",
"nyc": {
"lines": 100,
"statements": 100,
"functions": 100,
"branches": 100,
"include": [
"{*-config,index}.js"
]
"*.js",
"!commitlint.config.js",
"!*.config.js"
],
"reporter": [
"lcov",
"text"
],
"all": true
},
"peerDependencies": {
"stylelint": ">=8.0.0",
"stylelint-order": ">=0.6.0",
"stylelint-scss": ">=2.0.1"
"stylelint": ">=8.0.0"
},
"publishConfig": {
"access": "public"
Expand All @@ -80,18 +94,20 @@
},
"repository": {
"type": "git",
"url": "https://github.com/vanduynslagerp/stylelint-config.git"
"url": "https://github.com/vanduynslagerp/stylelint-config-pretty.git"
},
"scripts": {
"clean": "rimraf coverage && rimraf .nyc_output",
"cm": "git-cz",
"codecov": "codecov",
"commitmsg": "commitlint -e",
"lint": "eslint *-config.js index.js package.json test",
"coverage": "nyc check-coverage",
"lint": "npm run clean && eslint . package.json test",
"postcheckout": "yarn install || (rimraf && npm install)",
"precommit": "npm run lint",
"prepush": "ava -v",
"pretest": "npm run lint && npm run clean",
"pretest": "npm run clean && npm run lint",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"test": "nyc --all ava -v && nyc report --reporter=lcov"
"test": "nyc ava -v"
}
}
File renamed without changes.
12 changes: 6 additions & 6 deletions test/config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ let orderRules;
test.before(async () => {
[indexRules, scssRules, orderRules] = await Promise.all([
getRuleFinder('index.js'),
getRuleFinder('scss-config.js'),
getRuleFinder('order-config.js'),
getRuleFinder('scss.js'),
getRuleFinder('order.js'),
]);
});

Expand All @@ -21,18 +21,18 @@ test('No deprecated or inexistent rules in index.js', t => {
t.deepEqual([], indexRules.unknown);
});

test('No unset rules in scss-config.js', t => {
test('No unset rules in scss.js', t => {
t.deepEqual([], scssRules.unused);
});

test('No deprecated or inexistent rules in scss-config.js', t => {
test('No deprecated or inexistent rules in scss.js', t => {
t.deepEqual([], scssRules.unknown);
});

test('No unset rules in order-config.js', t => {
test('No unset rules in order.js', t => {
t.deepEqual([], orderRules.unused);
});

test('No deprecated or inexistent rules in order-config.js', t => {
test('No deprecated or inexistent rules in order.js', t => {
t.deepEqual([], orderRules.unknown);
});

0 comments on commit f59678a

Please sign in to comment.