Skip to content

Commit

Permalink
feat: improve css in js configuration for RN and WEB
Browse files Browse the repository at this point in the history
  • Loading branch information
developer239 committed Feb 3, 2023
1 parent dd29557 commit 126d91b
Show file tree
Hide file tree
Showing 6 changed files with 500 additions and 110 deletions.
37 changes: 5 additions & 32 deletions packages/stylelint-css-in-js-config/index.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,10 @@
const config = require('@linters/stylelint-config')

delete config.rules['unit-disallowed-list']
delete config.rules['media-feature-name-disallowed-list']

module.exports = {
...config,
processors: ['stylelint-processor-styled-components'],
extends: ['@linters/stylelint-config'],
customSyntax: '@stylelint/postcss-css-in-js',
rules: {
...config.rules,
//
// Turn off base rules
//

// Possible errors

'font-family-no-missing-generic-family-keyword': null,
'no-empty-source': null,
'string-no-newline': null,
'selector-pseudo-class-no-unknown': null,
'selector-pseudo-element-no-unknown': null,
'selector-type-no-unknown': null,
'no-descending-specificity': null,

// Limit language features

'selector-max-empty-lines': null,
'selector-no-vendor-prefix': null,

// Stylistic issues

'no-missing-end-of-source-newline': null,
'function-name-case': null,
'value-keyword-case': null,
// false positive
'no-empty-first-line': null,

// TODO: add styled-components rules
},
}
6 changes: 4 additions & 2 deletions packages/stylelint-css-in-js-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@linters/stylelint-css-in-js-config",
"description": "The css-in-js config you have been looking for.",
"version": "1.5.6",
"version": "1.5.5",
"repository": "https://github.com/developer239/linters",
"main": "index.js",
"publishConfig": {
Expand All @@ -13,7 +13,9 @@
},
"dependencies": {
"@linters/stylelint-config": "^1.6.3",
"stylelint-processor-styled-components": "^1.10.0"
"@stylelint/postcss-css-in-js": "^0.38.0",
"postcss": "^8.4.21",
"postcss-syntax": "^0.36.2"
},
"peerDependencies": {
"stylelint": ">=14.0.0"
Expand Down
Loading

0 comments on commit 126d91b

Please sign in to comment.