eslint-plugin-import-lite 0.1.0 → 0.2.0
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 +5 -1
- package/dist/ast.js +3 -3
- package/dist/consistent-type-specifier-style.js +676 -0
- package/dist/{rules/first2.js → first.js} +2 -5
- package/dist/index.js +9 -9
- package/dist/index2.d.ts +0 -1
- package/dist/{rules/newline-after-import2.js → newline-after-import.js} +2 -5
- package/dist/{rules/no-default-export2.js → no-default-export.js} +2 -2
- package/dist/{rules/no-duplicates2.js → no-duplicates.js} +1 -2
- package/dist/{rules/no-mutable-exports2.js → no-mutable-exports.js} +1 -1
- package/dist/{rules/no-named-default2.js → no-named-default.js} +2 -2
- package/dist/rules/consistent-type-specifier-style.d.ts +1 -1
- package/dist/rules/consistent-type-specifier-style.js +1 -1
- package/dist/rules/first.js +1 -1
- package/dist/rules/newline-after-import.js +1 -1
- package/dist/rules/no-default-export.js +1 -1
- package/dist/rules/no-duplicates.js +1 -1
- package/dist/rules/no-mutable-exports.js +1 -1
- package/dist/rules/no-named-default.js +1 -1
- package/dist/utils.js +234 -3
- package/package.json +27 -27
- package/dist/rules/consistent-type-specifier-style2.js +0 -111
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# eslint-plugin-import-lite
|
|
2
2
|
|
|
3
|
+
> [!WARNING]
|
|
4
|
+
> WIP
|
|
5
|
+
|
|
3
6
|
[![npm version][npm-version-src]][npm-version-href]
|
|
4
7
|
[![npm bundle size][npm-bundle-size-src]][npm-bundle-size-href]
|
|
5
8
|
[![License][license-src]][license-href]
|
|
@@ -24,7 +27,8 @@ But there are some useful rules and [some people (include me) want to bring the
|
|
|
24
27
|
|
|
25
28
|
## Credits
|
|
26
29
|
|
|
27
|
-
[eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x) - [MIT](https://github.com/un-ts/eslint-plugin-import-x/blob/master/LICENSE)
|
|
30
|
+
- [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x) - source codes [MIT](https://github.com/un-ts/eslint-plugin-import-x/blob/master/LICENSE)
|
|
31
|
+
- [eslint-stylistic](https://github.com/eslint-stylistic/eslint-stylistic) - project structure and scripts [MIT](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/LICENSE)
|
|
28
32
|
|
|
29
33
|
## License
|
|
30
34
|
|
package/dist/ast.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/ast.ts
|
|
4
4
|
function getValue(node) {
|
|
5
5
|
switch (node.type) {
|
|
6
|
-
case
|
|
7
|
-
case
|
|
6
|
+
case AST_NODE_TYPES.Identifier: return node.name;
|
|
7
|
+
case AST_NODE_TYPES.Literal: return node.value;
|
|
8
8
|
default: throw new Error(`Unsupported node type: ${node.type}`);
|
|
9
9
|
}
|
|
10
10
|
}
|