@nzyme/eslint 0.8.0 → 0.9.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/dist/esm/imports.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Linter } from 'eslint';
|
|
2
1
|
export interface ImportGroup {
|
|
3
2
|
pattern: string;
|
|
4
3
|
group: 'builtin' | 'external' | 'internal' | 'parent' | 'sibling' | 'index';
|
|
@@ -7,4 +6,4 @@ export interface ImportGroup {
|
|
|
7
6
|
export interface ImportsOptions {
|
|
8
7
|
groups?: ImportGroup[];
|
|
9
8
|
}
|
|
10
|
-
export declare function imports(options?: ImportsOptions):
|
|
9
|
+
export declare function imports(options?: ImportsOptions): import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
package/dist/esm/imports.js
CHANGED
|
@@ -1,42 +1,41 @@
|
|
|
1
|
+
import tseslint from 'typescript-eslint';
|
|
1
2
|
import importsPlugin from 'eslint-plugin-import';
|
|
2
3
|
export function imports(options = {}) {
|
|
3
|
-
return
|
|
4
|
-
importsPlugin.flatConfigs.recommended,
|
|
5
|
-
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
'
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
position: 'before',
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
pathGroupsExcludedImportTypes: ['builtin'],
|
|
31
|
-
alphabetize: {
|
|
32
|
-
order: 'asc',
|
|
4
|
+
return tseslint.config({
|
|
5
|
+
extends: [importsPlugin.flatConfigs.recommended, importsPlugin.flatConfigs.typescript],
|
|
6
|
+
ignores: ['dist/**/*', 'node_modules/**/*'],
|
|
7
|
+
rules: {
|
|
8
|
+
'sort-imports': [
|
|
9
|
+
'warn',
|
|
10
|
+
{
|
|
11
|
+
ignoreCase: false,
|
|
12
|
+
ignoreDeclarationSort: true,
|
|
13
|
+
ignoreMemberSort: false,
|
|
14
|
+
allowSeparatedGroups: true,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
'import/order': [
|
|
18
|
+
'warn',
|
|
19
|
+
{
|
|
20
|
+
'newlines-between': 'always',
|
|
21
|
+
groups: ['builtin', 'external', 'internal', ['parent', 'sibling'], 'index'],
|
|
22
|
+
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md#pathgroups-array-of-objects
|
|
23
|
+
pathGroups: options.groups ?? [
|
|
24
|
+
{
|
|
25
|
+
pattern: '@nzyme/**',
|
|
26
|
+
group: 'internal',
|
|
27
|
+
position: 'before',
|
|
33
28
|
},
|
|
29
|
+
],
|
|
30
|
+
pathGroupsExcludedImportTypes: ['builtin'],
|
|
31
|
+
alphabetize: {
|
|
32
|
+
order: 'asc',
|
|
34
33
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
// we have TypeScript handling that
|
|
37
|
+
'import/no-unresolved': 'off',
|
|
39
38
|
},
|
|
40
|
-
|
|
39
|
+
});
|
|
41
40
|
}
|
|
42
41
|
//# sourceMappingURL=imports.js.map
|
package/dist/esm/imports.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imports.js","sourceRoot":"","sources":["../../src/imports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"imports.js","sourceRoot":"","sources":["../../src/imports.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAYjD,MAAM,UAAU,OAAO,CAAC,UAA0B,EAAE;IAChD,OAAO,QAAQ,CAAC,MAAM,CAAC;QACnB,OAAO,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC,WAAW,EAAE,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC;QACtF,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;QAC3C,KAAK,EAAE;YACH,cAAc,EAAE;gBACZ,MAAM;gBACN;oBACI,UAAU,EAAE,KAAK;oBACjB,qBAAqB,EAAE,IAAI;oBAC3B,gBAAgB,EAAE,KAAK;oBACvB,oBAAoB,EAAE,IAAI;iBAC7B;aACJ;YACD,cAAc,EAAE;gBACZ,MAAM;gBACN;oBACI,kBAAkB,EAAE,QAAQ;oBAC5B,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC;oBAC3E,gHAAgH;oBAChH,UAAU,EAAE,OAAO,CAAC,MAAM,IAAI;wBAC1B;4BACI,OAAO,EAAE,WAAW;4BACpB,KAAK,EAAE,UAAU;4BACjB,QAAQ,EAAE,QAAQ;yBACrB;qBACJ;oBACD,6BAA6B,EAAE,CAAC,SAAS,CAAC;oBAC1C,WAAW,EAAE;wBACT,KAAK,EAAE,KAAK;qBACf;iBACJ;aACJ;YACD,mCAAmC;YACnC,sBAAsB,EAAE,KAAK;SAChC;KACJ,CAAC,CAAC;AACP,CAAC"}
|
package/dist/esm/typescript.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type Target = 'node' | 'browser';
|
|
2
2
|
export interface TypescriptOptions {
|
|
3
3
|
target?: Target[] | Target;
|
|
4
|
+
project?: string | string[];
|
|
4
5
|
}
|
|
5
|
-
export declare function typescript(options
|
|
6
|
+
export declare function typescript(options: TypescriptOptions): import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
package/dist/esm/typescript.js
CHANGED
|
@@ -4,14 +4,19 @@ import globals from 'globals';
|
|
|
4
4
|
import js from '@eslint/js';
|
|
5
5
|
import tseslint from 'typescript-eslint';
|
|
6
6
|
import prettier from 'eslint-config-prettier';
|
|
7
|
-
export function typescript(options
|
|
7
|
+
export function typescript(options) {
|
|
8
8
|
const config = {
|
|
9
|
-
ignores: ['dist/**/*', 'node_modules/**/*'],
|
|
9
|
+
ignores: ['dist/**/*', 'node_modules/**/*', 'eslint.config.js'],
|
|
10
10
|
files: ['**/*.{ts,tsx}'],
|
|
11
11
|
plugins: {
|
|
12
12
|
workspaces,
|
|
13
13
|
monorepo,
|
|
14
14
|
},
|
|
15
|
+
languageOptions: {
|
|
16
|
+
parserOptions: {
|
|
17
|
+
project: options.project || './tsconfig.json',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
15
20
|
rules: {
|
|
16
21
|
curly: 'error',
|
|
17
22
|
'require-await': 'error',
|
|
@@ -47,7 +52,7 @@ export function typescript(options = {}) {
|
|
|
47
52
|
};
|
|
48
53
|
}
|
|
49
54
|
return tseslint.config({
|
|
50
|
-
extends: [js.configs.recommended, ...tseslint.configs.
|
|
55
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommendedTypeChecked, prettier],
|
|
51
56
|
...config,
|
|
52
57
|
});
|
|
53
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../src/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../src/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,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CAAC;IACN,CAAC;SAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACxB,MAAM,CAAC,eAAe,GAAG;YACrB,GAAG,MAAM,CAAC,eAAe;YACzB,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC;SAC5C,CAAC;IACN,CAAC;IAED,OAAO,QAAQ,CAAC,MAAM,CAAC;QACnB,OAAO,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC,sBAAsB,EAAE,QAAQ,CAAC;QACvF,GAAG,MAAM;KACZ,CAAC,CAAC;AACP,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAc;IACpC,QAAQ,MAAM,EAAE,CAAC;QACb,KAAK,MAAM;YACP,OAAO,OAAO,CAAC,IAAI,CAAC;QACxB,KAAK,SAAS;YACV,OAAO,OAAO,CAAC,OAAO,CAAC;IAC/B,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nzyme/eslint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@eslint/js": "^9.
|
|
26
|
-
"eslint": "^9.
|
|
25
|
+
"@eslint/js": "^9.23.0",
|
|
26
|
+
"eslint": "^9.23.0",
|
|
27
27
|
"eslint-config-prettier": "^10.1.1",
|
|
28
28
|
"eslint-plugin-import": "^2.31.0",
|
|
29
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
29
|
+
"eslint-plugin-jsdoc": "^50.6.9",
|
|
30
30
|
"eslint-plugin-monorepo": "^0.3.2",
|
|
31
31
|
"eslint-plugin-vue": "^10.0.0",
|
|
32
32
|
"eslint-plugin-workspaces": "^0.10.1",
|
|
33
33
|
"globals": "^16.0.0",
|
|
34
34
|
"tslib": "^2.8.1",
|
|
35
|
-
"typescript-eslint": "^8.
|
|
35
|
+
"typescript-eslint": "^8.28.0",
|
|
36
36
|
"vue-eslint-parser": "^10.1.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@nzyme/tsconfig": "0.
|
|
39
|
+
"@nzyme/tsconfig": "0.9.0",
|
|
40
40
|
"jiti": "^2.4.2",
|
|
41
41
|
"typescript": "^5.8.2"
|
|
42
42
|
}
|