eslint-config-decent 2.0.0 → 2.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/LICENSE +1 -1
- package/README.md +13 -1
- package/dist/index.cjs +4 -2
- package/dist/index.d.cts +6 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
- package/src/index.ts +7 -2
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -56,7 +56,19 @@ export default [
|
|
|
56
56
|
rules: {
|
|
57
57
|
'@typescript-eslint/no-confusing-void-expression': 'off',
|
|
58
58
|
},
|
|
59
|
-
}
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Use typescript-eslint config
|
|
64
|
+
|
|
65
|
+
```mjs
|
|
66
|
+
// eslint.config.mjs
|
|
67
|
+
|
|
68
|
+
import { tsEslintConfig } from 'eslint-config-decent';
|
|
69
|
+
import tsEslint from 'typescript-eslint';
|
|
70
|
+
|
|
71
|
+
export default tsEslint(...tsEslintConfig());
|
|
60
72
|
```
|
|
61
73
|
|
|
62
74
|
## License
|
package/dist/index.cjs
CHANGED
|
@@ -671,7 +671,8 @@ const configs = {
|
|
|
671
671
|
base
|
|
672
672
|
};
|
|
673
673
|
|
|
674
|
-
|
|
674
|
+
const defaultConfig = tsEslintConfig;
|
|
675
|
+
function tsEslintConfig(options) {
|
|
675
676
|
const enableRequireExtensionRule = options?.enableRequireExtensionRule ?? true;
|
|
676
677
|
const languageOptions = {
|
|
677
678
|
globals: {
|
|
@@ -766,7 +767,7 @@ function defaultConfig(options) {
|
|
|
766
767
|
];
|
|
767
768
|
}
|
|
768
769
|
function config(options) {
|
|
769
|
-
return tsEslint__default.config(...
|
|
770
|
+
return tsEslint__default.config(...tsEslintConfig(options));
|
|
770
771
|
}
|
|
771
772
|
|
|
772
773
|
exports.config = config;
|
|
@@ -777,5 +778,6 @@ exports.jsdocConfigs = configs$6;
|
|
|
777
778
|
exports.promiseConfigs = configs$4;
|
|
778
779
|
exports.reactConfigs = configs$3;
|
|
779
780
|
exports.securityConfigs = configs$2;
|
|
781
|
+
exports.tsEslintConfig = tsEslintConfig;
|
|
780
782
|
exports.typescriptEslintConfigs = configs$1;
|
|
781
783
|
exports.unicornConfigs = configs;
|
package/dist/index.d.cts
CHANGED
|
@@ -39,12 +39,16 @@ interface DefaultConfigOptions {
|
|
|
39
39
|
parserOptions?: NonNullable<ConfigWithExtends['languageOptions']>['parserOptions'];
|
|
40
40
|
enableRequireExtensionRule?: boolean;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated Use `tsEslintConfig` instead
|
|
44
|
+
*/
|
|
45
|
+
declare const defaultConfig: typeof tsEslintConfig;
|
|
42
46
|
/**
|
|
43
47
|
* Exports the default configuration to be passed to `tsEslint.config`. Use this if you want more control of typescript-eslint configuration output.
|
|
44
48
|
* @param {DefaultConfigOptions} options
|
|
45
49
|
* @returns Array of typescript-eslint configurations
|
|
46
50
|
*/
|
|
47
|
-
declare function
|
|
51
|
+
declare function tsEslintConfig(options?: DefaultConfigOptions): ConfigWithExtends[];
|
|
48
52
|
/**
|
|
49
53
|
* Exports eslint configurations. Use this if you do not need to explicitly import typescript-eslint in your project.
|
|
50
54
|
* @param options
|
|
@@ -52,4 +56,4 @@ declare function defaultConfig(options?: DefaultConfigOptions): ConfigWithExtend
|
|
|
52
56
|
*/
|
|
53
57
|
declare function config(options?: DefaultConfigOptions): TSESLint.FlatConfig.ConfigArray;
|
|
54
58
|
|
|
55
|
-
export { type DefaultConfigOptions, config, defaultConfig, configs$7 as eslintConfigs, configs$6 as importConfigs, configs$5 as jsdocConfigs, configs$4 as promiseConfigs, configs$3 as reactConfigs, configs$2 as securityConfigs, configs$1 as typescriptEslintConfigs, configs as unicornConfigs };
|
|
59
|
+
export { type DefaultConfigOptions, config, defaultConfig, configs$7 as eslintConfigs, configs$6 as importConfigs, configs$5 as jsdocConfigs, configs$4 as promiseConfigs, configs$3 as reactConfigs, configs$2 as securityConfigs, tsEslintConfig, configs$1 as typescriptEslintConfigs, configs as unicornConfigs };
|
package/dist/index.d.mts
CHANGED
|
@@ -39,12 +39,16 @@ interface DefaultConfigOptions {
|
|
|
39
39
|
parserOptions?: NonNullable<ConfigWithExtends['languageOptions']>['parserOptions'];
|
|
40
40
|
enableRequireExtensionRule?: boolean;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated Use `tsEslintConfig` instead
|
|
44
|
+
*/
|
|
45
|
+
declare const defaultConfig: typeof tsEslintConfig;
|
|
42
46
|
/**
|
|
43
47
|
* Exports the default configuration to be passed to `tsEslint.config`. Use this if you want more control of typescript-eslint configuration output.
|
|
44
48
|
* @param {DefaultConfigOptions} options
|
|
45
49
|
* @returns Array of typescript-eslint configurations
|
|
46
50
|
*/
|
|
47
|
-
declare function
|
|
51
|
+
declare function tsEslintConfig(options?: DefaultConfigOptions): ConfigWithExtends[];
|
|
48
52
|
/**
|
|
49
53
|
* Exports eslint configurations. Use this if you do not need to explicitly import typescript-eslint in your project.
|
|
50
54
|
* @param options
|
|
@@ -52,4 +56,4 @@ declare function defaultConfig(options?: DefaultConfigOptions): ConfigWithExtend
|
|
|
52
56
|
*/
|
|
53
57
|
declare function config(options?: DefaultConfigOptions): TSESLint.FlatConfig.ConfigArray;
|
|
54
58
|
|
|
55
|
-
export { type DefaultConfigOptions, config, defaultConfig, configs$7 as eslintConfigs, configs$6 as importConfigs, configs$5 as jsdocConfigs, configs$4 as promiseConfigs, configs$3 as reactConfigs, configs$2 as securityConfigs, configs$1 as typescriptEslintConfigs, configs as unicornConfigs };
|
|
59
|
+
export { type DefaultConfigOptions, config, defaultConfig, configs$7 as eslintConfigs, configs$6 as importConfigs, configs$5 as jsdocConfigs, configs$4 as promiseConfigs, configs$3 as reactConfigs, configs$2 as securityConfigs, tsEslintConfig, configs$1 as typescriptEslintConfigs, configs as unicornConfigs };
|
package/dist/index.d.ts
CHANGED
|
@@ -39,12 +39,16 @@ interface DefaultConfigOptions {
|
|
|
39
39
|
parserOptions?: NonNullable<ConfigWithExtends['languageOptions']>['parserOptions'];
|
|
40
40
|
enableRequireExtensionRule?: boolean;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated Use `tsEslintConfig` instead
|
|
44
|
+
*/
|
|
45
|
+
declare const defaultConfig: typeof tsEslintConfig;
|
|
42
46
|
/**
|
|
43
47
|
* Exports the default configuration to be passed to `tsEslint.config`. Use this if you want more control of typescript-eslint configuration output.
|
|
44
48
|
* @param {DefaultConfigOptions} options
|
|
45
49
|
* @returns Array of typescript-eslint configurations
|
|
46
50
|
*/
|
|
47
|
-
declare function
|
|
51
|
+
declare function tsEslintConfig(options?: DefaultConfigOptions): ConfigWithExtends[];
|
|
48
52
|
/**
|
|
49
53
|
* Exports eslint configurations. Use this if you do not need to explicitly import typescript-eslint in your project.
|
|
50
54
|
* @param options
|
|
@@ -52,4 +56,4 @@ declare function defaultConfig(options?: DefaultConfigOptions): ConfigWithExtend
|
|
|
52
56
|
*/
|
|
53
57
|
declare function config(options?: DefaultConfigOptions): TSESLint.FlatConfig.ConfigArray;
|
|
54
58
|
|
|
55
|
-
export { type DefaultConfigOptions, config, defaultConfig, configs$7 as eslintConfigs, configs$6 as importConfigs, configs$5 as jsdocConfigs, configs$4 as promiseConfigs, configs$3 as reactConfigs, configs$2 as securityConfigs, configs$1 as typescriptEslintConfigs, configs as unicornConfigs };
|
|
59
|
+
export { type DefaultConfigOptions, config, defaultConfig, configs$7 as eslintConfigs, configs$6 as importConfigs, configs$5 as jsdocConfigs, configs$4 as promiseConfigs, configs$3 as reactConfigs, configs$2 as securityConfigs, tsEslintConfig, configs$1 as typescriptEslintConfigs, configs as unicornConfigs };
|
package/dist/index.mjs
CHANGED
|
@@ -652,7 +652,8 @@ const configs = {
|
|
|
652
652
|
base
|
|
653
653
|
};
|
|
654
654
|
|
|
655
|
-
|
|
655
|
+
const defaultConfig = tsEslintConfig;
|
|
656
|
+
function tsEslintConfig(options) {
|
|
656
657
|
const enableRequireExtensionRule = options?.enableRequireExtensionRule ?? true;
|
|
657
658
|
const languageOptions = {
|
|
658
659
|
globals: {
|
|
@@ -747,7 +748,7 @@ function defaultConfig(options) {
|
|
|
747
748
|
];
|
|
748
749
|
}
|
|
749
750
|
function config(options) {
|
|
750
|
-
return tsEslint.config(...
|
|
751
|
+
return tsEslint.config(...tsEslintConfig(options));
|
|
751
752
|
}
|
|
752
753
|
|
|
753
|
-
export { config, defaultConfig, configs$9 as eslintConfigs, configs$7 as importConfigs, configs$6 as jsdocConfigs, configs$4 as promiseConfigs, configs$3 as reactConfigs, configs$2 as securityConfigs, configs$1 as typescriptEslintConfigs, configs as unicornConfigs };
|
|
754
|
+
export { config, defaultConfig, configs$9 as eslintConfigs, configs$7 as importConfigs, configs$6 as jsdocConfigs, configs$4 as promiseConfigs, configs$3 as reactConfigs, configs$2 as securityConfigs, tsEslintConfig, configs$1 as typescriptEslintConfigs, configs as unicornConfigs };
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -31,12 +31,17 @@ export interface DefaultConfigOptions {
|
|
|
31
31
|
enableRequireExtensionRule?: boolean;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use `tsEslintConfig` instead
|
|
36
|
+
*/
|
|
37
|
+
export const defaultConfig = tsEslintConfig;
|
|
38
|
+
|
|
34
39
|
/**
|
|
35
40
|
* Exports the default configuration to be passed to `tsEslint.config`. Use this if you want more control of typescript-eslint configuration output.
|
|
36
41
|
* @param {DefaultConfigOptions} options
|
|
37
42
|
* @returns Array of typescript-eslint configurations
|
|
38
43
|
*/
|
|
39
|
-
export function
|
|
44
|
+
export function tsEslintConfig(options?: DefaultConfigOptions): ConfigWithExtends[] {
|
|
40
45
|
const enableRequireExtensionRule = options?.enableRequireExtensionRule ?? true;
|
|
41
46
|
const languageOptions: ConfigWithExtends['languageOptions'] = {
|
|
42
47
|
globals: {
|
|
@@ -140,5 +145,5 @@ export function defaultConfig(options?: DefaultConfigOptions): ConfigWithExtends
|
|
|
140
145
|
* @returns An array of eslint configurations
|
|
141
146
|
*/
|
|
142
147
|
export function config(options?: DefaultConfigOptions): TSESLint.FlatConfig.ConfigArray {
|
|
143
|
-
return tsEslint.config(...
|
|
148
|
+
return tsEslint.config(...tsEslintConfig(options));
|
|
144
149
|
}
|