Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonnam committed Mar 24, 2019
0 parents commit 82ed10a
Show file tree
Hide file tree
Showing 13 changed files with 523 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "standardpress"
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
package-lock.json
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock = false
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: node_js
node_js:
- "11"
- "10"
- "9"
- "8"
- "7"
- "6"
cache: npm
before_install:
- nvm install-latest-npm
script:
- npm run lint
- npm test
jobs:
include:
- stage: deploying to npm
node_js: "11"
script: echo "Deploying to npm ..."
deploy:
provider: npm
email: $NPM_EMAIL
api_key: $NPM_API_KEY
on:
branch: master
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.1.0 - 2019-03-24
### Added
- stylelint css shareable config.
- stylelint scss shareable config.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Jason Nam

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.
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# stylelint-config-standardpress

[![npm version](https://img.shields.io/npm/v/stylelint-config-standardpress.svg)](https://npmjs.com/package/stylelint-config-standardpress)
[![travis-ci build status](https://travis-ci.com/standardpress/stylelint-config-standardpress.svg?branch=master)](https://travis-ci.com/standardpress/stylelint-config-standardpress)
[![appveyor build status](https://ci.appveyor.com/api/projects/status/ygxptjl6u9450761/branch/master?svg=true)](https://ci.appveyor.com/project/jasonnam/stylelint-config-standardpress/branch/master)

stylelint shareable config by StandardPress.

## Installation

### install-peerdeps

Install with [`install-peerdeps`](https://npmjs.com/package/install-peerdeps):

```sh
npx install-peerdeps --dev stylelint-config-standardpress
```

### npm

Install with npm:

```sh
npm install --save-dev stylelint-config-standardpress
```

Next, install the correct versions of each package, which are listed by the command:

```sh
npm info "stylelint-config-standardpress@latest" peerDependencies
```

## Usage

### CSS

Extend stylelint config with `stylelint-config-standardpress/css`.

```json
{
"extends": "stylelint-config-standardpress/css"
}
```

### Sass

Extend stylelint config with `stylelint-config-standardpress/scss`.

```json
{
"extends": "stylelint-config-standardpress/scss"
}
```

## License

stylelint-config-standardpress is released under the MIT license. [See LICENSE](https://github.com/standardpress/stylelint-config-standardpress/blob/master/LICENSE) for details.
30 changes: 30 additions & 0 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use strict';

const stylelint = require('stylelint');

test('all css rules are configured correctly', () => {
const config = require('../css');

return stylelint.lint({
code: 'a { font-weight: bold; }',
config
}).then(data => {
expect(data.results.length).toBeGreaterThan(0);
expect(data.results[0].invalidOptionWarnings).toHaveLength(0);
expect(data.results[0].deprecations).toHaveLength(0);
});
});

test('all scss rules are configured correctly', () => {
const config = require('../scss');

return stylelint.lint({
code: 'a { font-weight: bold; }',
configBasedir: __dirname,
config
}).then(data => {
expect(data.results.length).toBeGreaterThan(0);
expect(data.results[0].invalidOptionWarnings).toHaveLength(0);
expect(data.results[0].deprecations).toHaveLength(0);
});
});
24 changes: 24 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
environment:
matrix:
- nodejs_version: "6"
- nodejs_version: "7"
- nodejs_version: "8"
- nodejs_version: "9"
- nodejs_version: "10"
- nodejs_version: "11"
platform:
- x86
- x64
cache:
- node_modules
install:
- ps: Install-Product node $env:nodejs_version $env:platform
- npm install npm --global
- npm install
build: off
test_script:
- node --version
- npm --version
- npm run lint
- npm test
deploy: off
Loading

0 comments on commit 82ed10a

Please sign in to comment.