-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stylelint): create initial config
- Loading branch information
1 parent
06a4b67
commit 72f571b
Showing
6 changed files
with
907 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# @xerox/stylelint-config | ||
|
||
> Stylelint shareable configuration for Xerox projects. | ||
[![circleci status][circleci-badge]][circleci-link] | ||
[![npm package][npm-badge]][npm-link] | ||
[![license MIT][license-badge]][license-link] | ||
[![commit style angular][commit-style-badge]][commit-style-link] | ||
[![semantic-release][semantic-release-badge]][semantic-release-link] | ||
[![Dependabot Status][dependabot-badge]][dependabot-link] | ||
|
||
## Usage | ||
1. Install this config and stylelint as a `devDependency`: | ||
```bash | ||
yarn add stylelint @xerox/stylelint-config --dev | ||
# or | ||
npm install stylelint @xerox/stylelint-config --save-dev | ||
``` | ||
2. Add the following to your `package.json`: | ||
```jsonc | ||
{ | ||
// ... | ||
"stylelint": { | ||
"extends": "@xerox/stylelint-config" | ||
} | ||
// ... | ||
} | ||
``` | ||
|
||
--- | ||
[LICENSE][license-link] | [CHANGELOG][changelog-link] | ||
|
||
[license-link]: ../../LICENSE | ||
[changelog-link]: ./CHANGELOG.md | ||
|
||
[circleci-badge]: https://flat.badgen.net/circleci/github/xeroxinteractive/config/master | ||
[circleci-link]: https://circleci.com/gh/xeroxinteractive/config/tree/master | ||
|
||
[npm-badge]: https://flat.badgen.net/npm/v/@xerox/stylelint-config?color=cyan | ||
[npm-link]: https://www.npmjs.com/package/@xerox/stylelint-config | ||
|
||
[license-badge]: https://flat.badgen.net/badge/license/MIT | ||
|
||
[commit-style-badge]: https://flat.badgen.net/badge/commit%20style/angular/purple | ||
[commit-style-link]: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines | ||
|
||
[semantic-release-badge]: https://flat.badgen.net/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80/semantic%20release/e10079 | ||
[semantic-release-link]: https://github.com/semantic-release/semantic-release | ||
|
||
[dependabot-badge]: https://flat.badgen.net/dependabot/xeroxinteractive/config?icon=dependabot | ||
[dependabot-link]: https://dependabot.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const standalone = require('stylelint/lib/standalone'); | ||
const { join } = require('path'); | ||
|
||
test.each(['index.js', 'sass.js'])('%s config valid', (filename) => { | ||
return expect( | ||
standalone({ | ||
code: 'a {}', | ||
config: { | ||
extends: `./${filename}`, | ||
}, | ||
configBasedir: join(__dirname, '../'), | ||
}) | ||
).resolves.toBeTruthy(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
extends: ['stylelint-config-recommended', 'stylelint-prettier/recommended'], | ||
rules: { | ||
'color-hex-length': 'long', | ||
'max-empty-lines': 3, | ||
'no-descending-specificity': null, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "@xerox/stylelint-config", | ||
"version": "0.0.0", | ||
"description": "Stylelint shareable configuration for Xerox projects.", | ||
"keywords": [ | ||
"xerox", | ||
"stylelint", | ||
"stylelint-config" | ||
], | ||
"main": "index.json", | ||
"repository": "git@github.com:xeroxinteractive/config.git", | ||
"homepage": "https://github.com/xeroxinteractive/config/blob/master/packages/xerox-stylelint-config", | ||
"author": "Andrew Leedham <andrew.leedham@xerox.com>", | ||
"license": "MIT", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"peerDependencies": { | ||
"stylelint": "*" | ||
}, | ||
"devDependencies": { | ||
"@xerox/prettier-config": "*", | ||
"stylelint": "^12.0.1", | ||
"stylelint-config-prettier": "^8.0.0", | ||
"stylelint-config-recommended": "^3.0.0", | ||
"stylelint-prettier": "^1.1.2", | ||
"stylelint-scss": "^3.13.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
extends: './index.js', | ||
plugins: ['stylelint-scss'], | ||
rules: { | ||
'at-rule-no-unknown': null, | ||
'scss/at-rule-no-unknown': true, | ||
}, | ||
}; |
Oops, something went wrong.