eslint-plugin-quintoandar
Advanced tools
Comparing version 1.5.1 to 1.5.2
@@ -13,2 +13,4 @@ /* eslint-disable global-require */ | ||
'no-npm-registry': require('./rules/no-npm-registry'), | ||
'no-theme-import': require('./rules/no-theme-import'), | ||
'no-themeprovider-import': require('./rules/no-themeprovider-import'), | ||
}, | ||
@@ -23,2 +25,4 @@ configs: { | ||
'no-npm-registry': 2, | ||
'no-theme-import': 2, | ||
'no-themeprovider-import': 2, | ||
}, | ||
@@ -25,0 +29,0 @@ }, |
{ | ||
"name": "eslint-plugin-quintoandar", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "An eslint-plugin for PWA-Tenants custom rules", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -87,5 +87,4 @@ <div align="center"> | ||
Don't allow usage of Block-party colors. | ||
Use withTheme instead (see: https://material-ui.com/css-in-js/api/#withtheme-component-component) | ||
or use ThemeProvider (see: https://material-ui.com/css-in-js/api/#themeprovider) | ||
Don't allow usage of Block-party colors.\ | ||
Use withTheme instead (see: https://material-ui.com/css-in-js/api/#withtheme-component-component)\ | ||
Make sure to follow the guidelines to fix it (see: https://github.com/quintoandar/guidelines/blob/master/pwa/styling.md#theme). | ||
@@ -103,3 +102,3 @@ | ||
Don't allow usage of hardcoded rgba colors. | ||
Don't allow usage of hardcoded rgba colors.\ | ||
Use colorToRgbString instead with color and opacity. Like: | ||
@@ -116,2 +115,28 @@ `colorToRgbString(themeColor, 0.5)` | ||
### No theme import | ||
Do not import theme directly. (except for test files).\ | ||
Use withTheme instead (see: https://material-ui.com/css-in-js/api/#withtheme-component-component) | ||
#### How to use it | ||
Just add the code below in your rules array: | ||
```js | ||
"quintoandar/no-theme-import": 2, | ||
``` | ||
### No ThemeProvider import | ||
Do not use ThemeProvider in components. (except for app.js)\ | ||
Use withTheme instead (see: https://material-ui.com/css-in-js/api/#withtheme-component-component) | ||
#### How to use it | ||
Just add the code below in your rules array: | ||
```js | ||
"quintoandar/no-themeprovider-import": 2, | ||
``` | ||
### No npm registry | ||
@@ -118,0 +143,0 @@ |
28655
589
205