Skip to content

Commit 126d91b

Browse files
committed
feat: improve css in js configuration for RN and WEB
1 parent dd29557 commit 126d91b

File tree

6 files changed

+500
-110
lines changed

6 files changed

+500
-110
lines changed
Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,10 @@
1-
const config = require('@linters/stylelint-config')
2-
3-
delete config.rules['unit-disallowed-list']
4-
delete config.rules['media-feature-name-disallowed-list']
5-
61
module.exports = {
7-
...config,
8-
processors: ['stylelint-processor-styled-components'],
2+
extends: ['@linters/stylelint-config'],
3+
customSyntax: '@stylelint/postcss-css-in-js',
94
rules: {
10-
...config.rules,
11-
//
12-
// Turn off base rules
13-
//
14-
15-
// Possible errors
16-
17-
'font-family-no-missing-generic-family-keyword': null,
18-
'no-empty-source': null,
19-
'string-no-newline': null,
20-
'selector-pseudo-class-no-unknown': null,
21-
'selector-pseudo-element-no-unknown': null,
22-
'selector-type-no-unknown': null,
23-
'no-descending-specificity': null,
24-
25-
// Limit language features
26-
27-
'selector-max-empty-lines': null,
28-
'selector-no-vendor-prefix': null,
29-
30-
// Stylistic issues
31-
32-
'no-missing-end-of-source-newline': null,
33-
'function-name-case': null,
34-
'value-keyword-case': null,
5+
// false positive
356
'no-empty-first-line': null,
7+
8+
// TODO: add styled-components rules
369
},
3710
}

packages/stylelint-css-in-js-config/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@linters/stylelint-css-in-js-config",
33
"description": "The css-in-js config you have been looking for.",
4-
"version": "1.5.6",
4+
"version": "1.5.5",
55
"repository": "https://github.com/developer239/linters",
66
"main": "index.js",
77
"publishConfig": {
@@ -13,7 +13,9 @@
1313
},
1414
"dependencies": {
1515
"@linters/stylelint-config": "^1.6.3",
16-
"stylelint-processor-styled-components": "^1.10.0"
16+
"@stylelint/postcss-css-in-js": "^0.38.0",
17+
"postcss": "^8.4.21",
18+
"postcss-syntax": "^0.36.2"
1719
},
1820
"peerDependencies": {
1921
"stylelint": ">=14.0.0"

0 commit comments

Comments
 (0)