Skip to content

Commit 053f30b

Browse files
committed
feat: add vite import massager plugin
This should improve eslint performance for negligable vite performance as the straight string transforms are faster than the TS parsing needed for the eslint-plugin rule BREAKING CHANGE: eslint-plugin has ‘forbidden imports’ replaced with vite plugin
1 parent 102dd97 commit 053f30b

22 files changed

+688
-324
lines changed

package-lock.json

+53-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"storybook": "^6.5.16",
7272
"type-fest": "4.4.0",
7373
"typescript": "5.4.5",
74-
"vite": "5.3.1",
74+
"vite": "5.3.5",
7575
"vite-plugin-eslint": "^1.8.1",
7676
"vite-tsconfig-paths": "4.3.2",
7777
"vitest": "1.6.0"

packages/eslint-config/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
},
8585
"devDependencies": {
8686
"eslint": "^8",
87-
"vite": "5.3.1",
87+
"vite": "5.3.5",
8888
"vite-tsconfig-paths": "4.3.2"
8989
},
9090
"engines": {

packages/eslint-config/src/rules/general.ts

-1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,5 @@ export const generalRules: Linter.RulesRecord = {
101101
},
102102
],
103103
'no-unused-vars': 'error',
104-
'@tablecheck/forbidden-imports': 'error',
105104
'@nx/enforce-module-boundaries': 'error',
106105
};

packages/eslint-plugin/README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ npm install --save-dev @tablecheck/eslint-plugin
2121
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
2222
💭 Requires type information.
2323

24-
| Name                    | Description | 🔧 | 💭 |
25-
| :--------------------------------------------------------------- | :------------------------------------------------------------------------------------------ | :-- | :-- |
26-
| [consistent-react-import](docs/rules/consistent-react-import.md) | Ensure that react is always imported and used consistently | 🔧 | |
27-
| [forbidden-imports](docs/rules/forbidden-imports.md) | Ensure that certain packages are using specific imports instead of using the default import | 🔧 | |
28-
| [prefer-shortest-import](docs/rules/prefer-shortest-import.md) | Enforce the consistent use of preferred import paths | 🔧 | 💭 |
24+
| Name                    | Description | 🔧 | 💭 |
25+
| :--------------------------------------------------------------- | :--------------------------------------------------------- | :-- | :-- |
26+
| [consistent-react-import](docs/rules/consistent-react-import.md) | Ensure that react is always imported and used consistently | 🔧 | |
27+
| [prefer-shortest-import](docs/rules/prefer-shortest-import.md) | Enforce the consistent use of preferred import paths | 🔧 | 💭 |
2928

3029
<!-- end auto-generated rules list -->

packages/eslint-plugin/__tests__/forbiddenImports.test.ts

-135
This file was deleted.

packages/eslint-plugin/docs/rules/forbidden-imports.md

-5
This file was deleted.

packages/eslint-plugin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"prettier": "3.0.3",
3737
"type-fest": "4.4.0",
3838
"typescript": "5.1.6",
39-
"vite": "5.3.1",
39+
"vite": "5.3.5",
4040
"vite-tsconfig-paths": "4.3.2",
4141
"vitest": "1.6.0"
4242
},

0 commit comments

Comments
 (0)