0.0.15 ā€¢ Published 1 year ago

eslint-plugin-mui-path-imports v0.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Mui path imports

CI:UT

Use path import to avoid pulling in unused modules. Decreases waiting time.

Reduces about 10000 modules.

BEFORE

event - compiled successfully in 287 ms (11756 modules)
wait  - compiling...
event - compiled successfully in 384 ms (11756 modules)
wait  - compiling...
event - compiled successfully in 301 ms (11756 modules)
wait  - compiling...
event - compiled successfully in 298 ms (11756 modules)

AFTER

event - compiled successfully in 69 ms (1867 modules)
wait  - compiling...
event - compiled successfully in 72 ms (1867 modules)
wait  - compiling...
event - compiled successfully in 64 ms (1867 modules)
wait  - compiling...
event - compiled successfully in 84 ms (1867 modules)

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-mui-path-imports:

npm install eslint-plugin-mui-path-imports --save-dev

Usage

Add plugin and rules to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "mui-path-imports"
    ],
    "rules": {
        "mui-path-imports/mui-path-imports": "error"
    }
}

And eslint --fix

import { Box } from '@mui/material';
ā†“
import Box from "@mui/material/Box";
0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.15

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.0

2 years ago