@jsse/eslint-config 0.1.22 → 0.2.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.js CHANGED
@@ -10569,7 +10569,7 @@ function typescriptRulesTypeAware() {
10569
10569
  "@typescript-eslint/no-unnecessary-qualifier": "error",
10570
10570
  "@typescript-eslint/no-unnecessary-type-arguments": "off",
10571
10571
  "@typescript-eslint/no-unnecessary-type-assertion": "error",
10572
- "@typescript-eslint/no-useless-template-literals": "error",
10572
+ // "@typescript-eslint/no-useless-template-literals": "error",
10573
10573
  "no-throw-literal": "off",
10574
10574
  "@typescript-eslint/only-throw-error": "error",
10575
10575
  "@typescript-eslint/no-unsafe-argument": "error",
@@ -10712,56 +10712,61 @@ function typescriptRulesTypeOblivious() {
10712
10712
  }
10713
10713
  ],
10714
10714
  "@typescript-eslint/adjacent-overload-signatures": "error",
10715
- "@typescript-eslint/ban-types": [
10716
- "warn",
10717
- {
10718
- extendDefaults: false,
10719
- types: {
10720
- String: {
10721
- message: 'Use "string" instead',
10722
- fixWith: "string"
10723
- },
10724
- Boolean: {
10725
- message: 'Use "boolean" instead',
10726
- fixWith: "boolean"
10727
- },
10728
- Number: {
10729
- message: 'Use "number" instead',
10730
- fixWith: "number"
10731
- },
10732
- BigInt: {
10733
- message: "Use `bigint` instead.",
10734
- fixWith: "bigint"
10735
- },
10736
- Object: {
10737
- message: "The `Object` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead. See https://github.com/typescript-eslint/typescript-eslint/pull/848",
10738
- fixWith: "Record<string, unknown>"
10739
- },
10740
- object: {
10741
- message: "The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848",
10742
- fixWith: "Record<string, unknown>"
10743
- },
10744
- Symbol: {
10745
- message: 'Use "symbol" instead',
10746
- fixWith: "symbol"
10747
- },
10748
- Function: {
10749
- message: 'The "Function" type accepts any function-like value.\nIt provides no type safety when calling the function, which can be a common source of bugs.\nIt also accepts things like class declarations, which will throw at runtime as they will not be called with "new".\nIf you are expecting the function to accept certain arguments, you should explicitly define the function shape.'
10750
- },
10751
- // eslint-disable-next-line @typescript-eslint/naming-convention
10752
- "{}": {
10753
- message: "The `{}` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead.",
10754
- fixWith: "Record<string, unknown>"
10755
- },
10756
- // eslint-disable-next-line @typescript-eslint/naming-convention
10757
- "[]": "Don't use the empty array type `[]`. It only allows empty arrays. Use `SomeType[]` instead.",
10758
- // eslint-disable-next-line @typescript-eslint/naming-convention
10759
- "[[]]": "Don't use `[[]]`. It only allows an array with a single element which is an empty array. Use `SomeType[][]` instead.",
10760
- // eslint-disable-next-line @typescript-eslint/naming-convention
10761
- "[[[]]]": "Don't use `[[[]]]`. Use `SomeType[][][]` instead."
10762
- }
10763
- }
10764
- ],
10715
+ // "@typescript-eslint/ban-types": [
10716
+ // "warn",
10717
+ // {
10718
+ // extendDefaults: false,
10719
+ // types: {
10720
+ // String: {
10721
+ // message: 'Use "string" instead',
10722
+ // fixWith: "string",
10723
+ // },
10724
+ // Boolean: {
10725
+ // message: 'Use "boolean" instead',
10726
+ // fixWith: "boolean",
10727
+ // },
10728
+ // Number: {
10729
+ // message: 'Use "number" instead',
10730
+ // fixWith: "number",
10731
+ // },
10732
+ // BigInt: {
10733
+ // message: "Use `bigint` instead.",
10734
+ // fixWith: "bigint",
10735
+ // },
10736
+ // Object: {
10737
+ // message:
10738
+ // "The `Object` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead. See https://github.com/typescript-eslint/typescript-eslint/pull/848",
10739
+ // fixWith: "Record<string, unknown>",
10740
+ // },
10741
+ // object: {
10742
+ // message:
10743
+ // "The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848",
10744
+ // fixWith: "Record<string, unknown>",
10745
+ // },
10746
+ // Symbol: {
10747
+ // message: 'Use "symbol" instead',
10748
+ // fixWith: "symbol",
10749
+ // },
10750
+ // Function: {
10751
+ // message:
10752
+ // 'The "Function" type accepts any function-like value.\nIt provides no type safety when calling the function, which can be a common source of bugs.\nIt also accepts things like class declarations, which will throw at runtime as they will not be called with "new".\nIf you are expecting the function to accept certain arguments, you should explicitly define the function shape.',
10753
+ // },
10754
+ // // eslint-disable-next-line @typescript-eslint/naming-convention
10755
+ // "{}": {
10756
+ // message:
10757
+ // "The `{}` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead.",
10758
+ // fixWith: "Record<string, unknown>",
10759
+ // },
10760
+ // // eslint-disable-next-line @typescript-eslint/naming-convention
10761
+ // "[]": "Don't use the empty array type `[]`. It only allows empty arrays. Use `SomeType[]` instead.",
10762
+ // // eslint-disable-next-line @typescript-eslint/naming-convention
10763
+ // "[[]]":
10764
+ // "Don't use `[[]]`. It only allows an array with a single element which is an empty array. Use `SomeType[][]` instead.",
10765
+ // // eslint-disable-next-line @typescript-eslint/naming-convention
10766
+ // "[[[]]]": "Don't use `[[[]]]`. Use `SomeType[][][]` instead.",
10767
+ // },
10768
+ // },
10769
+ // ],
10765
10770
  "@typescript-eslint/consistent-type-assertions": "error",
10766
10771
  "@typescript-eslint/consistent-type-definitions": ["error", "type"],
10767
10772
  "@typescript-eslint/member-ordering": [
@@ -10911,29 +10916,28 @@ function typescriptRulesTypeOblivious() {
10911
10916
  ],
10912
10917
  "default-param-last": "off",
10913
10918
  "@typescript-eslint/default-param-last": "error",
10914
- "func-call-spacing": "off",
10919
+ // "func-call-spacing": "off",
10915
10920
  "@typescript-eslint/func-call-spacing": ["error", "never"],
10916
- "keyword-spacing": "off",
10921
+ // "keyword-spacing": "off",
10917
10922
  "@typescript-eslint/keyword-spacing": "error",
10918
- "lines-between-class-members": "off",
10919
- "@typescript-eslint/lines-between-class-members": [
10920
- "error",
10921
- "always",
10922
- {
10923
- exceptAfterSingleLine: true
10924
- }
10925
- ],
10923
+ // "lines-between-class-members": "off",
10924
+ // "@typescript-eslint/lines-between-class-members": [
10925
+ // "error",
10926
+ // "always",
10927
+ // {
10928
+ // exceptAfterSingleLine: true,
10929
+ // },
10930
+ // ],
10926
10931
  "no-dupe-class-members": "off",
10927
10932
  "@typescript-eslint/no-dupe-class-members": "error",
10928
10933
  "no-empty-function": "off",
10929
10934
  "@typescript-eslint/no-empty-function": "error",
10930
- "no-extra-parens": "off",
10931
- "no-extra-semi": "off",
10935
+ // "no-extra-parens": "off",
10936
+ // "no-extra-semi": "off",
10932
10937
  "@typescript-eslint/no-extra-semi": "error",
10933
10938
  "no-loop-func": "off",
10934
10939
  "@typescript-eslint/no-loop-func": "error",
10935
10940
  "no-loss-of-precision": "off",
10936
- "@typescript-eslint/no-loss-of-precision": "error",
10937
10941
  "no-redeclare": "off",
10938
10942
  "@typescript-eslint/no-redeclare": "error",
10939
10943
  "no-restricted-imports": "off",
@@ -10952,17 +10956,17 @@ function typescriptRulesTypeOblivious() {
10952
10956
  ]
10953
10957
  }
10954
10958
  ],
10955
- "padding-line-between-statements": "off",
10959
+ // "padding-line-between-statements": "off",
10956
10960
  "@typescript-eslint/padding-line-between-statements": "off",
10957
- quotes: "off",
10961
+ // quotes: "off",
10958
10962
  "@typescript-eslint/quotes": "off",
10959
- "space-before-function-paren": "off",
10963
+ // "space-before-function-paren": "off",
10960
10964
  "@typescript-eslint/space-before-function-paren": "off",
10961
- "space-infix-ops": "off",
10965
+ // "space-infix-ops": "off",
10962
10966
  "@typescript-eslint/space-infix-ops": "error",
10963
- semi: "off",
10967
+ // semi: "off",
10964
10968
  "@typescript-eslint/semi": ["error", "always"],
10965
- "space-before-blocks": "off",
10969
+ // "space-before-blocks": "off",
10966
10970
  "@typescript-eslint/space-before-blocks": ["error", "always"],
10967
10971
  "no-undef": "off",
10968
10972
  "no-duplicate-imports": "off",
@@ -11264,7 +11268,16 @@ function typescriptLanguageOptions(options) {
11264
11268
  tsconfig
11265
11269
  } = options || {};
11266
11270
  const tsOptions = tsconfig ? {
11267
- project: Array.isArray(tsconfig) ? tsconfig : [tsconfig],
11271
+ // project: Array.isArray(tsconfig) ? tsconfig : [tsconfig],
11272
+ projectService: {
11273
+ allowDefaultProject: [
11274
+ "*.js",
11275
+ "tsconfig.json",
11276
+ "*.ts",
11277
+ "scripts/*.ts"
11278
+ ],
11279
+ defaultProject: tsconfig
11280
+ },
11268
11281
  tsconfigRootDir: process4.cwd()
11269
11282
  } : {};
11270
11283
  const parserOptions = {
@@ -11895,6 +11908,7 @@ var typescript = async (options) => {
11895
11908
  // only apply ts rules to ts files!
11896
11909
  files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
11897
11910
  name: "jsse/typescript/rules",
11911
+ // may not need to rename all rules here........
11898
11912
  rules: renameRules(tsrules || {}, tsPrefix, tsPrefixTo)
11899
11913
  },
11900
11914
  {
@@ -12393,6 +12407,24 @@ async function jsse(options = {}, ...userConfigs) {
12393
12407
  return res;
12394
12408
  }
12395
12409
  }
12410
+ for (const config of combinedConfigs) {
12411
+ if (config.plugins) {
12412
+ for (const [key, value] of Object.entries(config.plugins)) {
12413
+ if (key.startsWith("@typescript-eslint/")) {
12414
+ delete config.plugins[key];
12415
+ config.plugins[`${tsPrefix}/${key.slice("@typescript-eslint/".length)}`] = value;
12416
+ }
12417
+ }
12418
+ }
12419
+ if (config.rules) {
12420
+ for (const [key, value] of Object.entries(config.rules)) {
12421
+ if (key.startsWith("@typescript-eslint/")) {
12422
+ delete config.rules[key];
12423
+ config.rules[`${tsPrefix}/${key.slice("@typescript-eslint/".length)}`] = value;
12424
+ }
12425
+ }
12426
+ }
12427
+ }
12396
12428
  return combinedConfigs;
12397
12429
  }
12398
12430
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jsse/eslint-config",
3
3
  "type": "module",
4
- "version": "0.1.22",
4
+ "version": "0.2.0",
5
5
  "description": "@jsse/eslint-config ~ WYSIWYG",
6
6
  "author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
7
7
  "license": "MIT",
@@ -58,33 +58,33 @@
58
58
  }
59
59
  },
60
60
  "dependencies": {
61
- "@eslint/js": "~8.57.0",
61
+ "@eslint/js": "~9.8.0",
62
62
  "@stylistic/eslint-plugin": "2.6.1",
63
- "@typescript-eslint/eslint-plugin": "^7.18.0",
64
- "@typescript-eslint/parser": "^7.18.0",
63
+ "@typescript-eslint/eslint-plugin": "^8.0.1",
64
+ "@typescript-eslint/parser": "^8.0.1",
65
65
  "eslint-config-flat-gitignore": "^0.1.8",
66
66
  "eslint-define-config": "^2.1.0",
67
67
  "eslint-plugin-antfu": "^2.3.4",
68
68
  "eslint-plugin-eslint-comments": "^3.2.0",
69
69
  "eslint-plugin-import-x": "^3.1.0",
70
- "eslint-plugin-jsdoc": "^48.10.2",
70
+ "eslint-plugin-jsdoc": "^48.11.0",
71
71
  "eslint-plugin-jsonc": "^2.16.0",
72
72
  "eslint-plugin-markdown": "^5.1.0",
73
- "eslint-plugin-n": "^17.10.1",
73
+ "eslint-plugin-n": "^17.10.2",
74
74
  "eslint-plugin-no-only-tests": "^3.1.0",
75
- "eslint-plugin-perfectionist": "^3.0.0",
75
+ "eslint-plugin-perfectionist": "^3.1.2",
76
76
  "eslint-plugin-react": "~7.35.0",
77
77
  "eslint-plugin-react-hooks": "~4.6.2",
78
78
  "eslint-plugin-react-refresh": "~0.4.9",
79
79
  "eslint-plugin-toml": "^0.11.1",
80
80
  "eslint-plugin-tsdoc": "^0.3.0",
81
81
  "eslint-plugin-unicorn": "^55.0.0",
82
- "eslint-plugin-unused-imports": "^3.2.0",
82
+ "eslint-plugin-unused-imports": "^4.0.1",
83
83
  "eslint-plugin-vitest": "0.5.4",
84
84
  "eslint-plugin-yml": "^1.14.0",
85
85
  "jsonc-eslint-parser": "^2.4.0",
86
86
  "toml-eslint-parser": "^0.10.0",
87
- "typescript-eslint": "^7.18.0",
87
+ "typescript-eslint": "^8.0.1",
88
88
  "yaml-eslint-parser": "^1.2.3"
89
89
  },
90
90
  "optionalDependencies": {
@@ -96,14 +96,14 @@
96
96
  "@biomejs/biome": "1.8.3",
97
97
  "@changesets/cli": "^2.27.7",
98
98
  "@jsse/prettier-config": "^0.1.0",
99
- "@types/eslint": "^8.56.11",
99
+ "@types/eslint": "^9.6.0",
100
100
  "@types/eslint__js": "~8.42.3",
101
101
  "@types/fs-extra": "^11.0.4",
102
102
  "@types/node": "^20.14.13",
103
103
  "cac": "^6.7.14",
104
- "eslint": "^8.57.0",
105
- "eslint-flat-config-utils": "^0.2.5",
106
- "eslint-typegen": "^0.2.4",
104
+ "eslint": "^9.8.0",
105
+ "eslint-flat-config-utils": "^0.3.0",
106
+ "eslint-typegen": "^0.3.0",
107
107
  "execa": "~9.3.0",
108
108
  "fast-glob": "^3.3.2",
109
109
  "fs-extra": "^11.2.0",
@@ -112,7 +112,7 @@
112
112
  "prettier": "^3.3.3",
113
113
  "react": "~18.3.1",
114
114
  "rimraf": "^6.0.1",
115
- "tsup": "^8.2.3",
115
+ "tsup": "^8.2.4",
116
116
  "tsx": "^4.16.5",
117
117
  "typescript": "~5.5.4",
118
118
  "vitest": "^2.0.5"