@kirill.konshin/lint 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/package.json +1 -1
- package/rules/mui.md +10 -2
package/README.md
CHANGED
package/package.json
CHANGED
package/rules/mui.md
CHANGED
|
@@ -5,8 +5,16 @@ paths:
|
|
|
5
5
|
- '**/*.tsx'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
-
|
|
9
|
-
-
|
|
8
|
+
- Full adherence to MUI best practices, which preserve semantics and accessibility
|
|
9
|
+
- If contradicts or not sure, as user what to do
|
|
10
|
+
- No negative margins hacks or similar
|
|
11
|
+
- Use bare minimum of JSX to code needed behavior
|
|
12
|
+
- Good example: `Toolbar → ButtonGroup → anchored Menu`
|
|
13
|
+
- Always import components or icons this way: `import { Paper, Button } from '@mui/material';` and `import { Xxx } from '@mui/icons-material';`
|
|
14
|
+
- See barrel handling section
|
|
15
|
+
- Exception: if developing a library use direct imports with minimal bundle footprint (libraries may not be used with barrel handling)
|
|
16
|
+
- To use MUI default classes always use stable minifiable class names:
|
|
17
|
+
- Import: `import { inputClasses } from '@mui/material';` or `import { inputClasses } from '@mui/material/Input';` (see rule about imports)
|
|
10
18
|
- Usage: `<Box sx={{ [``& .${inputClasses.root}``]: { /* styles */ } }}><Input /></Box>`
|
|
11
19
|
|
|
12
20
|
# Admin Pages & Login
|