@kirill.konshin/lint 0.4.1 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/rules/mui.md +10 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kirill.konshin/lint",
3
3
  "description": "ESLint + Prettier + lint-staged config and AI agent rules/skills for monorepos",
4
- "version": "0.4.1",
4
+ "version": "0.4.2",
5
5
  "type": "module",
6
6
  "skipGenerate": true,
7
7
  "bin": {
package/rules/mui.md CHANGED
@@ -5,8 +5,16 @@ paths:
5
5
  - '**/*.tsx'
6
6
  ---
7
7
 
8
- - To use MUI default classes always use following notation because it's the only one that works with minification:
9
- - Import: `import Input, { inputClasses } from '@mui/material/Input';`
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