1.3.7 • Published 10 months ago

eslint9-plugin-mui-path-imports v1.3.7

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Mui path imports

CI:UT

Deprecated: See this comment for more info.

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";
1.3.7

10 months ago

1.3.6

10 months ago

1.3.5

10 months ago

1.3.4

10 months ago

1.3.3

10 months ago

1.3.2

10 months ago

1.3.1

10 months ago

1.3.0

10 months ago

1.2.0

10 months ago

1.1.0

10 months ago