Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Dec 26, 2017
0 parents commit 2894e5c
Show file tree
Hide file tree
Showing 12 changed files with 204 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/.*
**/node_modules
**/coverage
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict'

module.exports = {
extends: 'eslint-config-antife'
}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
node_modules
npm-debug.log
.idea/*
Thumbs.db
coverage/
*.gz
*.sw*
*.un~
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.travis.yml
test/
.eslintrc
.eslintignore
coverage/
*.sw*
*.un~
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: node_js
sudo: false
node_js:
- 8
script:
- npm i
- npm run ci
after_script:
- npm install coveralls@2 && cat ./coverage/lcov.info | coveralls
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 1.0.0 / 2017-12-26

* first release
22 changes: 22 additions & 0 deletions LISENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT LICENSE

Copyright (c) 2017 Alibaba Group Holding Limited and other contributors.

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

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![node version][node-image]][node-url]

[npm-image]: http://img.shields.io/npm/v/stylelint-config-antife.svg?style=flat-square
[npm-url]: http://npmjs.org/package/stylelint-config-antife
[travis-image]: https://img.shields.io/travis/ant-ife/stylelint-config-antife.svg?style=flat-square
[travis-url]: https://travis-ci.org/ant-ife/stylelint-config-antife
[coveralls-image]: https://img.shields.io/coveralls/ant-ife/stylelint-config-antife.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/ant-ife/stylelint-config-antife?branch=master
[node-image]: https://img.shields.io/badge/node.js-%3E=8-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/

Stylelint config for Ant international FE team

## Installment

```bash
$ npm i stylelint-config-antife --save-dev
```

## Usage

Add `.stylelintrc.js` in your root directory.

```javascript
module.exports = {
extends: 'stylelint-config-intl'
}
```

## License

The MIT License (MIT)
64 changes: 64 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
'use strict'

module.exports = {
rules: {
'at-rule-semicolon-newline-after': 'always',
'block-no-empty': true,
'block-opening-brace-newline-after': 'always',
'block-closing-brace-newline-before': 'always',
'block-opening-brace-space-before': 'always',
'color-hex-length': 'short',
'color-no-invalid-hex': true,
'declaration-block-no-duplicate-properties': [true, { ignore: ['consecutive-duplicates'] }],
'declaration-block-no-shorthand-property-overrides': true,
'declaration-block-trailing-semicolon': 'always',
'function-url-quotes': 'never',
indentation: 2,
'max-empty-lines': 2,
'max-line-length': 120,
'max-nesting-depth': 5,
'no-duplicate-selectors': true,
'no-eol-whitespace': true,
'no-missing-end-of-source-newline': true,
'no-unknown-animations': true,
'length-zero-no-unit': true,
'rule-empty-line-before': ['always-multi-line', { ignore: ['after-comment', 'inside-block'] }],
'string-no-newline': true,
'time-min-milliseconds': 100,
'unit-no-unknown': true,

'function-linear-gradient-no-nonstandard-direction': true,
'property-no-vendor-prefix': true,
'selector-no-vendor-prefix': true,
'value-no-vendor-prefix': true,

'comment-whitespace-inside': 'always',
'declaration-bang-space-after': 'never',
'declaration-bang-space-before': 'always',
'declaration-colon-space-after': 'always',
'declaration-colon-space-before': 'never',
'function-comma-space-after': 'always',
'function-comma-space-before': 'never',
'function-calc-no-unspaced-operator': true,
'function-whitespace-after': 'always',
'media-feature-colon-space-after': 'always',
'media-feature-colon-space-before': 'never',
'media-feature-parentheses-space-inside': 'never',
'media-feature-range-operator-space-after': 'always',
'media-feature-range-operator-space-before': 'always',
'selector-combinator-space-after': 'always',
'selector-combinator-space-before': 'always',
'selector-list-comma-space-after': 'always-single-line',
'selector-list-comma-space-before': 'never',
'value-list-comma-space-after': 'always',
'value-list-comma-space-before': 'never',

'at-rule-name-case': 'lower',
'function-name-case': 'lower',
'property-case': 'lower',
'selector-pseudo-class-case': 'lower',
'selector-pseudo-element-case': 'lower',
'selector-type-case': 'lower',
'unit-case': 'lower',
},
}
34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "stylelint-config-antife",
"version": "1.0.0",
"description": "Stylelint config for Ant international FE team",
"keywords": [
"stylelint"
],
"main": "index.js",
"files": [
"index.js"
],
"repository": {
"type": "git",
"url": "https://github.com/ant-ife/stylelint-config-antife"
},
"dependencies": {
},
"devDependencies": {
"eslint": "^4.13.1",
"eslint-config-antife": "^1.0.0",
"istanbul": "^0.4.5",
"mocha": "^4.0.1",
"pre-commit": "^1.2.2"
},
"scripts": {
"test": "istanbul cover `npm bin`/_mocha",
"lint": "eslint --fix .",
"ci": "npm run lint && npm run test"
},
"pre-commit": [
"lint"
],
"license": "MIT"
}
1 change: 1 addition & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--reporter spec
10 changes: 10 additions & 0 deletions test/stylelint-config-intl.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict'

const core = require('..')
const assert = require('assert')

describe('test', () => {
it('should be ok', () => {
assert.ok(core)
})
})

0 comments on commit 2894e5c

Please sign in to comment.