@meteorlxy/eslint-config 4.5.0 → 4.6.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/index.cjs CHANGED
@@ -937,6 +937,7 @@ const reactRules = {
937
937
  checkChildContextTypes: true
938
938
  }
939
939
  ],
940
+ "react/forward-ref-uses-ref": "error",
940
941
  "react/function-component-definition": [
941
942
  "error",
942
943
  {
@@ -1321,15 +1322,24 @@ const typescriptRules = {
1321
1322
  ],
1322
1323
  "@typescript-eslint/no-dupe-class-members": "off",
1323
1324
  // checked by typescript
1325
+ "@typescript-eslint/no-duplicate-type-constituents": [
1326
+ "error",
1327
+ { ignoreIntersections: false, ignoreUnions: false }
1328
+ ],
1324
1329
  "@typescript-eslint/no-empty-interface": "off",
1325
1330
  // deprecated
1326
1331
  "@typescript-eslint/no-import-type-side-effects": "error",
1332
+ "@typescript-eslint/no-inferrable-types": [
1333
+ "off",
1334
+ { ignoreParameters: false, ignoreProperties: false }
1335
+ ],
1327
1336
  "@typescript-eslint/no-invalid-this": "off",
1328
1337
  // checked by typescript
1329
1338
  "@typescript-eslint/no-invalid-void-type": "off",
1330
1339
  // @see https://github.com/typescript-eslint/typescript-eslint/issues/8113
1331
1340
  "@typescript-eslint/no-redeclare": "off",
1332
1341
  // checked by typescript
1342
+ "@typescript-eslint/no-redundant-type-constituents": "error",
1333
1343
  "@typescript-eslint/no-require-imports": ["error", { allow: [] }],
1334
1344
  "@typescript-eslint/no-restricted-imports": [
1335
1345
  "off",
@@ -2058,21 +2068,29 @@ const env = {
2058
2068
  IS_EDITOR: IS_EDITOR
2059
2069
  };
2060
2070
 
2061
- const meteorlxy = async (options, ...customConfigs) => [
2071
+ const meteorlxy = async ({
2072
+ ignores: ignores$1 = [],
2073
+ imports: imports$1 = {},
2074
+ javascript: javascript$1 = {},
2075
+ markdown: markdown$1 = true,
2076
+ react: react$1 = false,
2077
+ typescript: typescript$1 = {},
2078
+ vue: vue$1 = false
2079
+ } = {}, ...customConfigs) => [
2062
2080
  // global ignores
2063
- ...ignores(options.ignores),
2081
+ ...ignores(ignores$1),
2064
2082
  // javascript core rules
2065
- ...javascript(options.javascript),
2083
+ ...javascript(javascript$1),
2066
2084
  // imports rules
2067
- ...imports(options.imports),
2085
+ ...imports(imports$1),
2068
2086
  // react rules - should be placed before typescript rules
2069
- ...options.react ? await react(options.react === true ? {} : options.react) : [],
2087
+ ...react$1 ? await react(react$1 === true ? {} : react$1) : [],
2070
2088
  // typescript rules
2071
- ...typescript(options.typescript),
2089
+ ...typescript(typescript$1),
2072
2090
  // vue rules - should be placed after typescript rules
2073
- ...options.vue ? await vue(options.vue === true ? {} : options.vue) : [],
2091
+ ...vue$1 ? await vue(vue$1 === true ? {} : vue$1) : [],
2074
2092
  // markdown rules
2075
- ...options.markdown !== false ? await markdown(options.markdown === true ? {} : options.markdown) : [],
2093
+ ...markdown$1 ? await markdown(markdown$1 === true ? {} : markdown$1) : [],
2076
2094
  // allow custom configs
2077
2095
  ...customConfigs,
2078
2096
  // prettier rules - should be the last one
package/dist/index.d.cts CHANGED
@@ -723,6 +723,7 @@ declare const reactRules: {
723
723
  checkContextTypes: boolean;
724
724
  checkChildContextTypes: boolean;
725
725
  }];
726
+ 'react/forward-ref-uses-ref': "error";
726
727
  'react/function-component-definition': ["error", {
727
728
  namedComponents: string;
728
729
  unnamedComponents: string;
@@ -1056,11 +1057,20 @@ declare const typescriptRules: {
1056
1057
  format: string[];
1057
1058
  }];
1058
1059
  '@typescript-eslint/no-dupe-class-members': "off";
1060
+ '@typescript-eslint/no-duplicate-type-constituents': ["error", {
1061
+ ignoreIntersections: boolean;
1062
+ ignoreUnions: boolean;
1063
+ }];
1059
1064
  '@typescript-eslint/no-empty-interface': "off";
1060
1065
  '@typescript-eslint/no-import-type-side-effects': "error";
1066
+ '@typescript-eslint/no-inferrable-types': ["off", {
1067
+ ignoreParameters: boolean;
1068
+ ignoreProperties: boolean;
1069
+ }];
1061
1070
  '@typescript-eslint/no-invalid-this': "off";
1062
1071
  '@typescript-eslint/no-invalid-void-type': "off";
1063
1072
  '@typescript-eslint/no-redeclare': "off";
1073
+ '@typescript-eslint/no-redundant-type-constituents': "error";
1064
1074
  '@typescript-eslint/no-require-imports': ["error", {
1065
1075
  allow: never[];
1066
1076
  }];
@@ -1378,6 +1388,6 @@ interface EslintOptions {
1378
1388
  typescript?: EslintTypescriptOptions;
1379
1389
  vue?: EslintVueOptions | boolean;
1380
1390
  }
1381
- declare const meteorlxy: (options: EslintOptions, ...customConfigs: FlatConfig.Config[]) => Promise<FlatConfig.Config[]>;
1391
+ declare const meteorlxy: ({ ignores, imports, javascript, markdown, react, typescript, vue, }?: EslintOptions, ...customConfigs: FlatConfig.Config[]) => Promise<FlatConfig.Config[]>;
1382
1392
 
1383
1393
  export { type EslintOptions, index$1 as configs, env, meteorlxy, index as rules, utils };
package/dist/index.d.mts CHANGED
@@ -723,6 +723,7 @@ declare const reactRules: {
723
723
  checkContextTypes: boolean;
724
724
  checkChildContextTypes: boolean;
725
725
  }];
726
+ 'react/forward-ref-uses-ref': "error";
726
727
  'react/function-component-definition': ["error", {
727
728
  namedComponents: string;
728
729
  unnamedComponents: string;
@@ -1056,11 +1057,20 @@ declare const typescriptRules: {
1056
1057
  format: string[];
1057
1058
  }];
1058
1059
  '@typescript-eslint/no-dupe-class-members': "off";
1060
+ '@typescript-eslint/no-duplicate-type-constituents': ["error", {
1061
+ ignoreIntersections: boolean;
1062
+ ignoreUnions: boolean;
1063
+ }];
1059
1064
  '@typescript-eslint/no-empty-interface': "off";
1060
1065
  '@typescript-eslint/no-import-type-side-effects': "error";
1066
+ '@typescript-eslint/no-inferrable-types': ["off", {
1067
+ ignoreParameters: boolean;
1068
+ ignoreProperties: boolean;
1069
+ }];
1061
1070
  '@typescript-eslint/no-invalid-this': "off";
1062
1071
  '@typescript-eslint/no-invalid-void-type': "off";
1063
1072
  '@typescript-eslint/no-redeclare': "off";
1073
+ '@typescript-eslint/no-redundant-type-constituents': "error";
1064
1074
  '@typescript-eslint/no-require-imports': ["error", {
1065
1075
  allow: never[];
1066
1076
  }];
@@ -1378,6 +1388,6 @@ interface EslintOptions {
1378
1388
  typescript?: EslintTypescriptOptions;
1379
1389
  vue?: EslintVueOptions | boolean;
1380
1390
  }
1381
- declare const meteorlxy: (options: EslintOptions, ...customConfigs: FlatConfig.Config[]) => Promise<FlatConfig.Config[]>;
1391
+ declare const meteorlxy: ({ ignores, imports, javascript, markdown, react, typescript, vue, }?: EslintOptions, ...customConfigs: FlatConfig.Config[]) => Promise<FlatConfig.Config[]>;
1382
1392
 
1383
1393
  export { type EslintOptions, index$1 as configs, env, meteorlxy, index as rules, utils };
package/dist/index.d.ts CHANGED
@@ -723,6 +723,7 @@ declare const reactRules: {
723
723
  checkContextTypes: boolean;
724
724
  checkChildContextTypes: boolean;
725
725
  }];
726
+ 'react/forward-ref-uses-ref': "error";
726
727
  'react/function-component-definition': ["error", {
727
728
  namedComponents: string;
728
729
  unnamedComponents: string;
@@ -1056,11 +1057,20 @@ declare const typescriptRules: {
1056
1057
  format: string[];
1057
1058
  }];
1058
1059
  '@typescript-eslint/no-dupe-class-members': "off";
1060
+ '@typescript-eslint/no-duplicate-type-constituents': ["error", {
1061
+ ignoreIntersections: boolean;
1062
+ ignoreUnions: boolean;
1063
+ }];
1059
1064
  '@typescript-eslint/no-empty-interface': "off";
1060
1065
  '@typescript-eslint/no-import-type-side-effects': "error";
1066
+ '@typescript-eslint/no-inferrable-types': ["off", {
1067
+ ignoreParameters: boolean;
1068
+ ignoreProperties: boolean;
1069
+ }];
1061
1070
  '@typescript-eslint/no-invalid-this': "off";
1062
1071
  '@typescript-eslint/no-invalid-void-type': "off";
1063
1072
  '@typescript-eslint/no-redeclare': "off";
1073
+ '@typescript-eslint/no-redundant-type-constituents': "error";
1064
1074
  '@typescript-eslint/no-require-imports': ["error", {
1065
1075
  allow: never[];
1066
1076
  }];
@@ -1378,6 +1388,6 @@ interface EslintOptions {
1378
1388
  typescript?: EslintTypescriptOptions;
1379
1389
  vue?: EslintVueOptions | boolean;
1380
1390
  }
1381
- declare const meteorlxy: (options: EslintOptions, ...customConfigs: FlatConfig.Config[]) => Promise<FlatConfig.Config[]>;
1391
+ declare const meteorlxy: ({ ignores, imports, javascript, markdown, react, typescript, vue, }?: EslintOptions, ...customConfigs: FlatConfig.Config[]) => Promise<FlatConfig.Config[]>;
1382
1392
 
1383
1393
  export { type EslintOptions, index$1 as configs, env, meteorlxy, index as rules, utils };
package/dist/index.mjs CHANGED
@@ -925,6 +925,7 @@ const reactRules = {
925
925
  checkChildContextTypes: true
926
926
  }
927
927
  ],
928
+ "react/forward-ref-uses-ref": "error",
928
929
  "react/function-component-definition": [
929
930
  "error",
930
931
  {
@@ -1309,15 +1310,24 @@ const typescriptRules = {
1309
1310
  ],
1310
1311
  "@typescript-eslint/no-dupe-class-members": "off",
1311
1312
  // checked by typescript
1313
+ "@typescript-eslint/no-duplicate-type-constituents": [
1314
+ "error",
1315
+ { ignoreIntersections: false, ignoreUnions: false }
1316
+ ],
1312
1317
  "@typescript-eslint/no-empty-interface": "off",
1313
1318
  // deprecated
1314
1319
  "@typescript-eslint/no-import-type-side-effects": "error",
1320
+ "@typescript-eslint/no-inferrable-types": [
1321
+ "off",
1322
+ { ignoreParameters: false, ignoreProperties: false }
1323
+ ],
1315
1324
  "@typescript-eslint/no-invalid-this": "off",
1316
1325
  // checked by typescript
1317
1326
  "@typescript-eslint/no-invalid-void-type": "off",
1318
1327
  // @see https://github.com/typescript-eslint/typescript-eslint/issues/8113
1319
1328
  "@typescript-eslint/no-redeclare": "off",
1320
1329
  // checked by typescript
1330
+ "@typescript-eslint/no-redundant-type-constituents": "error",
1321
1331
  "@typescript-eslint/no-require-imports": ["error", { allow: [] }],
1322
1332
  "@typescript-eslint/no-restricted-imports": [
1323
1333
  "off",
@@ -2046,21 +2056,29 @@ const env = {
2046
2056
  IS_EDITOR: IS_EDITOR
2047
2057
  };
2048
2058
 
2049
- const meteorlxy = async (options, ...customConfigs) => [
2059
+ const meteorlxy = async ({
2060
+ ignores: ignores$1 = [],
2061
+ imports: imports$1 = {},
2062
+ javascript: javascript$1 = {},
2063
+ markdown: markdown$1 = true,
2064
+ react: react$1 = false,
2065
+ typescript: typescript$1 = {},
2066
+ vue: vue$1 = false
2067
+ } = {}, ...customConfigs) => [
2050
2068
  // global ignores
2051
- ...ignores(options.ignores),
2069
+ ...ignores(ignores$1),
2052
2070
  // javascript core rules
2053
- ...javascript(options.javascript),
2071
+ ...javascript(javascript$1),
2054
2072
  // imports rules
2055
- ...imports(options.imports),
2073
+ ...imports(imports$1),
2056
2074
  // react rules - should be placed before typescript rules
2057
- ...options.react ? await react(options.react === true ? {} : options.react) : [],
2075
+ ...react$1 ? await react(react$1 === true ? {} : react$1) : [],
2058
2076
  // typescript rules
2059
- ...typescript(options.typescript),
2077
+ ...typescript(typescript$1),
2060
2078
  // vue rules - should be placed after typescript rules
2061
- ...options.vue ? await vue(options.vue === true ? {} : options.vue) : [],
2079
+ ...vue$1 ? await vue(vue$1 === true ? {} : vue$1) : [],
2062
2080
  // markdown rules
2063
- ...options.markdown !== false ? await markdown(options.markdown === true ? {} : options.markdown) : [],
2081
+ ...markdown$1 ? await markdown(markdown$1 === true ? {} : markdown$1) : [],
2064
2082
  // allow custom configs
2065
2083
  ...customConfigs,
2066
2084
  // prettier rules - should be the last one
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meteorlxy/eslint-config",
3
- "version": "4.5.0",
3
+ "version": "4.6.0",
4
4
  "description": "meteorlxy eslint config",
5
5
  "keywords": [
6
6
  "config",
@@ -32,31 +32,31 @@
32
32
  "clean": "rimraf ./dist"
33
33
  },
34
34
  "dependencies": {
35
- "@typescript-eslint/eslint-plugin": "^8.5.0",
36
- "@typescript-eslint/parser": "^8.5.0",
37
- "@typescript-eslint/utils": "^8.5.0",
35
+ "@typescript-eslint/eslint-plugin": "^8.7.0",
36
+ "@typescript-eslint/parser": "^8.7.0",
37
+ "@typescript-eslint/utils": "^8.7.0",
38
38
  "confusing-browser-globals": "^1.0.11",
39
39
  "eslint-config-prettier": "^9.1.0",
40
40
  "eslint-plugin-eslint-comments": "^3.2.0",
41
- "eslint-plugin-import-x": "^4.2.1",
41
+ "eslint-plugin-import-x": "^4.3.0",
42
42
  "eslint-plugin-markdown": "^5.1.0",
43
43
  "globals": "^15.9.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/confusing-browser-globals": "^1.0.3",
47
47
  "@types/eslint": "^9.6.1",
48
- "eslint": "^9.10.0",
49
- "eslint-plugin-react": "^7.35.2",
50
- "eslint-plugin-react-hooks": "^5.1.0-rc-7771d3a7-20240827",
51
- "eslint-plugin-react-refresh": "^0.4.11",
48
+ "eslint": "^9.11.1",
49
+ "eslint-plugin-react": "^7.36.1",
50
+ "eslint-plugin-react-hooks": "^5.1.0-rc-a99d8e8d-20240916",
51
+ "eslint-plugin-react-refresh": "^0.4.12",
52
52
  "eslint-plugin-vue": "^9.28.0",
53
53
  "vue-eslint-parser": "^9.4.3"
54
54
  },
55
55
  "peerDependencies": {
56
- "eslint-plugin-react": "^7.35.0",
56
+ "eslint-plugin-react": "^7.36.1",
57
57
  "eslint-plugin-react-hooks": "5.x",
58
- "eslint-plugin-react-refresh": "^0.4.9",
59
- "eslint-plugin-vue": "^9.27.0",
58
+ "eslint-plugin-react-refresh": "^0.4.12",
59
+ "eslint-plugin-vue": "^9.28.0",
60
60
  "vue-eslint-parser": "^9.4.3"
61
61
  },
62
62
  "peerDependenciesMeta": {
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "76721593a99d276664d330445c3be658d8fa0cdd"
82
+ "gitHead": "3434389df7c303ea7136de00ab8cb617006eadc0"
83
83
  }