@ofk/eslint-config 0.0.3 → 0.0.5

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 CHANGED
@@ -6,6 +6,12 @@
6
6
 
7
7
  ```sh
8
8
  npm install --save-dev @ofk/eslint-config
9
+ npm install --save-dev $(npm info @ofk/eslint-config peerDependencies --json | jq -r 'to_entries | map("\(.key)@\(.value)") | join(" ")')
10
+ ```
11
+
12
+ or
13
+
14
+ ```sh
9
15
  npx install-peerdeps --dev @ofk/eslint-config
10
16
  ```
11
17
 
@@ -18,7 +24,7 @@ import config from '@ofk/eslint-config';
18
24
  export default config();
19
25
  ```
20
26
 
21
- Customization is possible.
27
+ You can customize it. For example:
22
28
 
23
29
  ```js
24
30
  import config from '@ofk/eslint-config';
package/dist/index.d.mts CHANGED
@@ -8,9 +8,13 @@ declare function imports({ defaultExportFiles, node, typescript, ...config }: Pi
8
8
  typescript?: boolean;
9
9
  }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
10
10
 
11
- declare function jsGlobals({ browser, es2024, node, }: {
11
+ declare function jsGlobals({ browser, es2021, es2022, es2023, es2024, es2025, node, }: {
12
12
  browser?: boolean;
13
+ es2021?: boolean;
14
+ es2022?: boolean;
15
+ es2023?: boolean;
13
16
  es2024?: boolean;
17
+ es2025?: boolean;
14
18
  node?: boolean;
15
19
  }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
16
20
  declare function js({ globals, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
package/dist/index.d.ts CHANGED
@@ -8,9 +8,13 @@ declare function imports({ defaultExportFiles, node, typescript, ...config }: Pi
8
8
  typescript?: boolean;
9
9
  }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
10
10
 
11
- declare function jsGlobals({ browser, es2024, node, }: {
11
+ declare function jsGlobals({ browser, es2021, es2022, es2023, es2024, es2025, node, }: {
12
12
  browser?: boolean;
13
+ es2021?: boolean;
14
+ es2022?: boolean;
15
+ es2023?: boolean;
13
16
  es2024?: boolean;
17
+ es2025?: boolean;
14
18
  node?: boolean;
15
19
  }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
16
20
  declare function js({ globals, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
package/dist/index.js CHANGED
@@ -468,13 +468,21 @@ var jsStrict = mergeRules(
468
468
  );
469
469
  function jsGlobals({
470
470
  browser = true,
471
+ es2021 = true,
472
+ es2022 = true,
473
+ es2023 = true,
471
474
  es2024 = true,
475
+ es2025 = true,
472
476
  node = true
473
477
  }) {
474
478
  return import_typescript_eslint2.default.config({
475
479
  languageOptions: {
476
480
  globals: {
481
+ ...es2021 ? import_globals.default.es2021 : {},
482
+ ...es2022 ? import_globals.default.es2022 : {},
483
+ ...es2023 ? import_globals.default.es2023 : {},
477
484
  ...es2024 ? import_globals.default.es2024 : {},
485
+ ...es2025 ? import_globals.default.es2025 : {},
478
486
  ...browser ? import_globals.default.browser : {},
479
487
  ...node ? import_globals.default.node : {}
480
488
  }
@@ -880,7 +888,7 @@ var tsStrict = import_typescript_eslint4.default.config(
880
888
  }
881
889
  );
882
890
  function ts({
883
- disableTypeChecked = false,
891
+ disableTypeChecked = true,
884
892
  parserOptions = {},
885
893
  strict = true,
886
894
  ...config
@@ -897,24 +905,7 @@ function ts({
897
905
  strict ? tsStrict : tsRecommended,
898
906
  config,
899
907
  disableTypeChecked ? {
900
- extends: [
901
- import_typescript_eslint4.default.configs.disableTypeChecked,
902
- // disabled unsafe rules for js files
903
- {
904
- rules: {
905
- "@typescript-eslint/no-unsafe-argument": "off",
906
- "@typescript-eslint/no-unsafe-assignment": "off",
907
- "@typescript-eslint/no-unsafe-call": "off",
908
- "@typescript-eslint/no-unsafe-declaration-merging": "off",
909
- "@typescript-eslint/no-unsafe-enum-comparison": "off",
910
- "@typescript-eslint/no-unsafe-function-type": "off",
911
- "@typescript-eslint/no-unsafe-member-access": "off",
912
- "@typescript-eslint/no-unsafe-return": "off",
913
- "@typescript-eslint/no-unsafe-type-assertion": "off",
914
- "@typescript-eslint/no-unsafe-unary-minus": "off"
915
- }
916
- }
917
- ],
908
+ extends: [import_typescript_eslint4.default.configs.disableTypeChecked],
918
909
  files: ["**/*.{js,jsx,mjs,cjs}"]
919
910
  } : {}
920
911
  );
package/dist/index.mjs CHANGED
@@ -432,13 +432,21 @@ var jsStrict = mergeRules(
432
432
  );
433
433
  function jsGlobals({
434
434
  browser = true,
435
+ es2021 = true,
436
+ es2022 = true,
437
+ es2023 = true,
435
438
  es2024 = true,
439
+ es2025 = true,
436
440
  node = true
437
441
  }) {
438
442
  return pluginTs2.config({
439
443
  languageOptions: {
440
444
  globals: {
445
+ ...es2021 ? globalVariables.es2021 : {},
446
+ ...es2022 ? globalVariables.es2022 : {},
447
+ ...es2023 ? globalVariables.es2023 : {},
441
448
  ...es2024 ? globalVariables.es2024 : {},
449
+ ...es2025 ? globalVariables.es2025 : {},
442
450
  ...browser ? globalVariables.browser : {},
443
451
  ...node ? globalVariables.node : {}
444
452
  }
@@ -844,7 +852,7 @@ var tsStrict = pluginTs4.config(
844
852
  }
845
853
  );
846
854
  function ts({
847
- disableTypeChecked = false,
855
+ disableTypeChecked = true,
848
856
  parserOptions = {},
849
857
  strict = true,
850
858
  ...config
@@ -861,24 +869,7 @@ function ts({
861
869
  strict ? tsStrict : tsRecommended,
862
870
  config,
863
871
  disableTypeChecked ? {
864
- extends: [
865
- pluginTs4.configs.disableTypeChecked,
866
- // disabled unsafe rules for js files
867
- {
868
- rules: {
869
- "@typescript-eslint/no-unsafe-argument": "off",
870
- "@typescript-eslint/no-unsafe-assignment": "off",
871
- "@typescript-eslint/no-unsafe-call": "off",
872
- "@typescript-eslint/no-unsafe-declaration-merging": "off",
873
- "@typescript-eslint/no-unsafe-enum-comparison": "off",
874
- "@typescript-eslint/no-unsafe-function-type": "off",
875
- "@typescript-eslint/no-unsafe-member-access": "off",
876
- "@typescript-eslint/no-unsafe-return": "off",
877
- "@typescript-eslint/no-unsafe-type-assertion": "off",
878
- "@typescript-eslint/no-unsafe-unary-minus": "off"
879
- }
880
- }
881
- ],
872
+ extends: [pluginTs4.configs.disableTypeChecked],
882
873
  files: ["**/*.{js,jsx,mjs,cjs}"]
883
874
  } : {}
884
875
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ofk/eslint-config",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": "ofk (https://github.com/ofk/)",
@@ -18,6 +18,8 @@
18
18
  "build": "tsup",
19
19
  "lint": "run-s lint:*",
20
20
  "lint:eslint": "eslint .",
21
+ "lint:prettier": "prettier --check .",
22
+ "lint:prettier-package-json": "prettier-package-json --list-different",
21
23
  "lint-fix": "run-s lint-fix:*",
22
24
  "lint-fix:eslint": "eslint --fix .",
23
25
  "lint-fix:prettier": "prettier --write .",
@@ -41,7 +43,7 @@
41
43
  "eslint-plugin-react-refresh": "^0.4.16",
42
44
  "eslint-plugin-unicorn": "^56.0.0",
43
45
  "eslint-plugin-unused-imports": "^4.1.1",
44
- "globals": "^15.4.0",
46
+ "globals": ">=14.0.0",
45
47
  "typescript-eslint": "^8.15.0"
46
48
  },
47
49
  "peerDependenciesMeta": {
@@ -88,6 +90,9 @@
88
90
  "optional": true
89
91
  }
90
92
  },
93
+ "optionalDependencies": {
94
+ "@rollup/rollup-linux-x64-gnu": "*"
95
+ },
91
96
  "devDependencies": {
92
97
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
93
98
  "@eslint/js": "^9.19.0",
@@ -106,7 +111,7 @@
106
111
  "eslint-plugin-react-refresh": "^0.4.18",
107
112
  "eslint-plugin-unicorn": "^56.0.1",
108
113
  "eslint-plugin-unused-imports": "^4.1.4",
109
- "globals": "^15.14.0",
114
+ "globals": "^15.15.0",
110
115
  "husky": "^9.1.7",
111
116
  "jiti": "^2.4.2",
112
117
  "lint-staged": "^15.4.3",