@abinnovision/eslint-config-base 2.2.0 → 3.0.1
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/CHANGELOG.md +23 -0
- package/README.md +81 -5
- package/dist/index.cjs +787 -27
- package/dist/index.d.cts +46 -71
- package/dist/index.d.ts +46 -71
- package/dist/index.js +779 -28
- package/package.json +22 -15
package/dist/index.d.cts
CHANGED
|
@@ -1,73 +1,48 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as eslint_config from 'eslint/config';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
plugins: {
|
|
9
|
-
/**
|
|
10
|
-
* eslint-plugin-import is not yet compatible with ESLint v9.
|
|
11
|
-
* This is a temporary fix to make it compatible in the meantime.
|
|
12
|
-
*
|
|
13
|
-
* @see https://github.com/import-js/eslint-plugin-import/issues/2948
|
|
14
|
-
*/
|
|
15
|
-
import: Plugin;
|
|
16
|
-
"unused-imports": eslint.ESLint.Plugin;
|
|
17
|
-
};
|
|
18
|
-
rules: {
|
|
19
|
-
/**
|
|
20
|
-
* Enforce a consistent order and grouping of import statements.
|
|
21
|
-
*
|
|
22
|
-
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
|
|
23
|
-
*/
|
|
24
|
-
"import/order": ["error", {
|
|
25
|
-
groups: string[][];
|
|
26
|
-
"newlines-between": string;
|
|
27
|
-
alphabetize: {
|
|
28
|
-
order: string;
|
|
29
|
-
caseInsensitive: boolean;
|
|
30
|
-
};
|
|
31
|
-
warnOnUnassignedImports: boolean;
|
|
32
|
-
}];
|
|
33
|
-
/**
|
|
34
|
-
* Enforce the "export" statement is placed at the end of the file.
|
|
35
|
-
* This avoids sprinkling export statements throughout the file.
|
|
36
|
-
*
|
|
37
|
-
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/exports-last.md
|
|
38
|
-
*/
|
|
39
|
-
"import/exports-last": "warn";
|
|
40
|
-
/**
|
|
41
|
-
* Import statements should always be the first statements in a file.
|
|
42
|
-
* This makes it easier to identify the dependencies of a file.
|
|
43
|
-
*
|
|
44
|
-
* NOTE: Directives (e.g. "use strict") are allowed to come before import statements.
|
|
45
|
-
*
|
|
46
|
-
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
|
|
47
|
-
*/
|
|
48
|
-
"import/first": "error";
|
|
49
|
-
/**
|
|
50
|
-
* Enforce a newline after the import statements.
|
|
51
|
-
*
|
|
52
|
-
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
|
|
53
|
-
*/
|
|
54
|
-
"import/newline-after-import": "error";
|
|
55
|
-
/**
|
|
56
|
-
* Disable the "no-return-await" rule.
|
|
57
|
-
*/
|
|
58
|
-
"no-return-await": "off";
|
|
59
|
-
/**
|
|
60
|
-
* Disable the "no-unused-vars" rule as unused-imports is used instead.
|
|
61
|
-
*/
|
|
62
|
-
"no-unused-vars": "off";
|
|
63
|
-
"unused-imports/no-unused-imports": "error";
|
|
64
|
-
"unused-imports/no-unused-vars": ["warn", {
|
|
65
|
-
vars: string;
|
|
66
|
-
varsIgnorePattern: string;
|
|
67
|
-
args: string;
|
|
68
|
-
argsIgnorePattern: string;
|
|
69
|
-
}];
|
|
70
|
-
};
|
|
71
|
-
}[];
|
|
3
|
+
/**
|
|
4
|
+
* Base ESLint Configuration
|
|
5
|
+
*/
|
|
6
|
+
declare const config$3: eslint_config.Config[];
|
|
72
7
|
|
|
73
|
-
|
|
8
|
+
/**
|
|
9
|
+
* ESLint configuration for build tool and project configuration files.
|
|
10
|
+
*
|
|
11
|
+
* This configuration does not specify file patterns - consumers decide which
|
|
12
|
+
* files to apply this to (e.g., vite.config.ts, webpack.config.js, etc.).
|
|
13
|
+
*
|
|
14
|
+
* Usage example:
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { base, configFiles } from "@abinnovision/eslint-config-base";
|
|
17
|
+
*
|
|
18
|
+
* export default [
|
|
19
|
+
* { extends: [base] },
|
|
20
|
+
* {
|
|
21
|
+
* files: ["**\/*.config.{ts,js}", "vite.config.ts"],
|
|
22
|
+
* extends: [configFiles],
|
|
23
|
+
* }
|
|
24
|
+
* ];
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare const config$2: eslint_config.Config[];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* ESLint configuration tailored for NestJS projects.
|
|
31
|
+
* Adjusts rules to accommodate NestJS patterns, especially for dependency injection.
|
|
32
|
+
*
|
|
33
|
+
* NOTE: This configuration is meant to be used in conjunction with
|
|
34
|
+
* the base TypeScript ESLint configuration.
|
|
35
|
+
*/
|
|
36
|
+
declare const config$1: eslint_config.Config[];
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* ESLint configuration tailored for Vitest test files.
|
|
40
|
+
* Relaxes strict rules to accommodate common testing patterns while adding
|
|
41
|
+
* Vitest-specific linting rules.
|
|
42
|
+
*
|
|
43
|
+
* NOTE: This configuration is meant to be used in conjunction with
|
|
44
|
+
* the base TypeScript ESLint configuration.
|
|
45
|
+
*/
|
|
46
|
+
declare const config: eslint_config.Config[];
|
|
47
|
+
|
|
48
|
+
export { config$3 as base, config$2 as configFiles, config$1 as nestjs, config as vitest };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,73 +1,48 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as eslint_config from 'eslint/config';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
plugins: {
|
|
9
|
-
/**
|
|
10
|
-
* eslint-plugin-import is not yet compatible with ESLint v9.
|
|
11
|
-
* This is a temporary fix to make it compatible in the meantime.
|
|
12
|
-
*
|
|
13
|
-
* @see https://github.com/import-js/eslint-plugin-import/issues/2948
|
|
14
|
-
*/
|
|
15
|
-
import: Plugin;
|
|
16
|
-
"unused-imports": eslint.ESLint.Plugin;
|
|
17
|
-
};
|
|
18
|
-
rules: {
|
|
19
|
-
/**
|
|
20
|
-
* Enforce a consistent order and grouping of import statements.
|
|
21
|
-
*
|
|
22
|
-
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
|
|
23
|
-
*/
|
|
24
|
-
"import/order": ["error", {
|
|
25
|
-
groups: string[][];
|
|
26
|
-
"newlines-between": string;
|
|
27
|
-
alphabetize: {
|
|
28
|
-
order: string;
|
|
29
|
-
caseInsensitive: boolean;
|
|
30
|
-
};
|
|
31
|
-
warnOnUnassignedImports: boolean;
|
|
32
|
-
}];
|
|
33
|
-
/**
|
|
34
|
-
* Enforce the "export" statement is placed at the end of the file.
|
|
35
|
-
* This avoids sprinkling export statements throughout the file.
|
|
36
|
-
*
|
|
37
|
-
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/exports-last.md
|
|
38
|
-
*/
|
|
39
|
-
"import/exports-last": "warn";
|
|
40
|
-
/**
|
|
41
|
-
* Import statements should always be the first statements in a file.
|
|
42
|
-
* This makes it easier to identify the dependencies of a file.
|
|
43
|
-
*
|
|
44
|
-
* NOTE: Directives (e.g. "use strict") are allowed to come before import statements.
|
|
45
|
-
*
|
|
46
|
-
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
|
|
47
|
-
*/
|
|
48
|
-
"import/first": "error";
|
|
49
|
-
/**
|
|
50
|
-
* Enforce a newline after the import statements.
|
|
51
|
-
*
|
|
52
|
-
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
|
|
53
|
-
*/
|
|
54
|
-
"import/newline-after-import": "error";
|
|
55
|
-
/**
|
|
56
|
-
* Disable the "no-return-await" rule.
|
|
57
|
-
*/
|
|
58
|
-
"no-return-await": "off";
|
|
59
|
-
/**
|
|
60
|
-
* Disable the "no-unused-vars" rule as unused-imports is used instead.
|
|
61
|
-
*/
|
|
62
|
-
"no-unused-vars": "off";
|
|
63
|
-
"unused-imports/no-unused-imports": "error";
|
|
64
|
-
"unused-imports/no-unused-vars": ["warn", {
|
|
65
|
-
vars: string;
|
|
66
|
-
varsIgnorePattern: string;
|
|
67
|
-
args: string;
|
|
68
|
-
argsIgnorePattern: string;
|
|
69
|
-
}];
|
|
70
|
-
};
|
|
71
|
-
}[];
|
|
3
|
+
/**
|
|
4
|
+
* Base ESLint Configuration
|
|
5
|
+
*/
|
|
6
|
+
declare const config$3: eslint_config.Config[];
|
|
72
7
|
|
|
73
|
-
|
|
8
|
+
/**
|
|
9
|
+
* ESLint configuration for build tool and project configuration files.
|
|
10
|
+
*
|
|
11
|
+
* This configuration does not specify file patterns - consumers decide which
|
|
12
|
+
* files to apply this to (e.g., vite.config.ts, webpack.config.js, etc.).
|
|
13
|
+
*
|
|
14
|
+
* Usage example:
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { base, configFiles } from "@abinnovision/eslint-config-base";
|
|
17
|
+
*
|
|
18
|
+
* export default [
|
|
19
|
+
* { extends: [base] },
|
|
20
|
+
* {
|
|
21
|
+
* files: ["**\/*.config.{ts,js}", "vite.config.ts"],
|
|
22
|
+
* extends: [configFiles],
|
|
23
|
+
* }
|
|
24
|
+
* ];
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare const config$2: eslint_config.Config[];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* ESLint configuration tailored for NestJS projects.
|
|
31
|
+
* Adjusts rules to accommodate NestJS patterns, especially for dependency injection.
|
|
32
|
+
*
|
|
33
|
+
* NOTE: This configuration is meant to be used in conjunction with
|
|
34
|
+
* the base TypeScript ESLint configuration.
|
|
35
|
+
*/
|
|
36
|
+
declare const config$1: eslint_config.Config[];
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* ESLint configuration tailored for Vitest test files.
|
|
40
|
+
* Relaxes strict rules to accommodate common testing patterns while adding
|
|
41
|
+
* Vitest-specific linting rules.
|
|
42
|
+
*
|
|
43
|
+
* NOTE: This configuration is meant to be used in conjunction with
|
|
44
|
+
* the base TypeScript ESLint configuration.
|
|
45
|
+
*/
|
|
46
|
+
declare const config: eslint_config.Config[];
|
|
47
|
+
|
|
48
|
+
export { config$3 as base, config$2 as configFiles, config$1 as nestjs, config as vitest };
|