Skip to content

Commit 749e12a

Browse files
committed
feat: add css-in-js-config
1 parent 3063e31 commit 749e12a

File tree

4 files changed

+103
-0
lines changed

4 files changed

+103
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2019 Code Quality Resources
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# StyleLint CSS-IN-JS Config
2+
3+
[**stylelint**](https://github.com/stylelint/stylelint) modern linter that helps you avoid errors and enforce conventions in your styles.
4+
5+
## Install
6+
7+
```sh
8+
yarn add stylelint @linters/stylelint-css-in-js-config -D
9+
```
10+
11+
## Usage
12+
13+
Create a _.stylelintrc.js_ file with the following contents:
14+
15+
```js
16+
module.exports = {
17+
extends: [
18+
'@linters/stylelint-css-in-js-config',
19+
],
20+
}
21+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
extends: [
3+
'@linters/stylelint-config',
4+
],
5+
rules: {
6+
//
7+
// Turn off base rules
8+
//
9+
10+
// Possible errors
11+
12+
'font-family-no-missing-generic-family-keyword': null,
13+
'no-empty-source': null,
14+
'string-no-newline': null,
15+
'selector-pseudo-class-no-unknown': null,
16+
'selector-pseudo-element-no-unknown': null,
17+
'selector-type-no-unknown': null,
18+
'no-descending-specificity': null,
19+
20+
// Limit language features
21+
22+
'selector-max-empty-lines': null,
23+
'selector-no-vendor-prefix': null,
24+
25+
// Stylistic issues
26+
27+
'no-missing-end-of-source-newline': null,
28+
'function-name-case': null,
29+
'value-keyword-case': null,
30+
'no-empty-first-line': null,
31+
}
32+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "@linters/stylelint-css-in-js-config",
3+
"description": "The css-in-js config you have been looking for.",
4+
"version": "0.0.1",
5+
"repository": "https://github.com/developer239/linters",
6+
"main": "index.js",
7+
"publishConfig": {
8+
"access": "public"
9+
},
10+
"engines": {
11+
"node": ">=12",
12+
"npm": ">=6"
13+
},
14+
"dependencies": {
15+
"@linters/stylelint-config": "^1.0.0"
16+
},
17+
"peerDependencies": {
18+
"prettier": ">=1.18.2",
19+
"stylelint": ">=11.0.0"
20+
},
21+
"keywords": [
22+
"config",
23+
"stylelint",
24+
"styled-components",
25+
"react",
26+
"angular",
27+
"vue"
28+
]
29+
}

0 commit comments

Comments
 (0)