@jsse/eslint-config 0.0.6 → 0.0.7

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
@@ -102,7 +102,7 @@ don't care anymore...
102
102
 
103
103
  ## License
104
104
 
105
- [MIT](./LICENSE) License © 2019-PRESENT [Anthony Fu](https://github.com/antfu)
105
+ [MIT](./LICENSE) License © 2023-PRESENT [jesse rubin](https://github.com/jessekrubin)
106
106
 
107
107
  [package-url]: https://www.npmjs.com/package/@jsse/eslint-config
108
108
  [npm-version-svg]: https://badge.fury.io/js/@jsse%2Feslint-config.svg
package/dist/cli.cjs CHANGED
@@ -616,7 +616,7 @@ var CAC = class extends import_events.EventEmitter {
616
616
  var cac = (name = "") => new CAC(name);
617
617
 
618
618
  // package.json
619
- var version = "0.0.6";
619
+ var version = "0.0.7";
620
620
 
621
621
  // src/cli.ts
622
622
  var cli = cac("jsselint");
package/dist/cli.js CHANGED
@@ -592,7 +592,7 @@ var CAC = class extends EventEmitter {
592
592
  var cac = (name = "") => new CAC(name);
593
593
 
594
594
  // package.json
595
- var version = "0.0.6";
595
+ var version = "0.0.7";
596
596
 
597
597
  // src/cli.ts
598
598
  var cli = cac("jsselint");
package/dist/index.cjs CHANGED
@@ -2498,6 +2498,7 @@ var GLOB_EXCLUDE = [
2498
2498
  "**/__snapshots__",
2499
2499
  "**/auto-import?(s).d.ts",
2500
2500
  "**/components.d.ts",
2501
+ "**/*.bak",
2501
2502
  "**/scratch",
2502
2503
  "**/tmp",
2503
2504
  "**/temp"
@@ -3064,7 +3065,7 @@ function parserOptionProject(tsconfigPath) {
3064
3065
  return tsconfigPath;
3065
3066
  }
3066
3067
  function typescriptLanguageOptions(options) {
3067
- const { parserOptions = {}, tsconfigPath, react: react2 } = options ?? {};
3068
+ const { parserOptions = {}, tsconfig, react: react2 } = options ?? {};
3068
3069
  if (react2) {
3069
3070
  return {
3070
3071
  parser: parserTs,
@@ -3073,8 +3074,8 @@ function typescriptLanguageOptions(options) {
3073
3074
  ecmaFeatures: { jsx: true, modules: true },
3074
3075
  jsxPragma: null,
3075
3076
  sourceType: "module",
3076
- ...tsconfigPath ? {
3077
- project: parserOptionProject(tsconfigPath),
3077
+ ...tsconfig ? {
3078
+ project: parserOptionProject(tsconfig),
3078
3079
  tsconfigRootDir: import_node_process.default.cwd()
3079
3080
  } : {},
3080
3081
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -3087,8 +3088,8 @@ function typescriptLanguageOptions(options) {
3087
3088
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
3088
3089
  parserOptions: {
3089
3090
  sourceType: "module",
3090
- ...tsconfigPath ? {
3091
- project: parserOptionProject(tsconfigPath),
3091
+ ...tsconfig ? {
3092
+ project: parserOptionProject(tsconfig),
3092
3093
  tsconfigRootDir: import_node_process.default.cwd()
3093
3094
  } : {},
3094
3095
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -3329,19 +3330,14 @@ function reactRecomendedRules() {
3329
3330
  };
3330
3331
  }
3331
3332
  function react(options) {
3332
- const {
3333
- parserOptions = {},
3334
- tsconfigPath,
3335
- react: react2,
3336
- reactRefresh
3337
- } = options ?? {};
3333
+ const { parserOptions = {}, tsconfig, react: react2, reactRefresh } = options ?? {};
3338
3334
  const config = [
3339
3335
  {
3340
3336
  files: [GLOB_SRC],
3341
3337
  languageOptions: typescriptLanguageOptions({
3342
3338
  parserOptions,
3343
3339
  react: react2,
3344
- tsconfigPath
3340
+ tsconfig
3345
3341
  }),
3346
3342
  name: "jsse:react:setup",
3347
3343
  plugins: {
@@ -4066,10 +4062,9 @@ function typescriptRulesTypeOblivious() {
4066
4062
  "no-duplicate-imports": "off"
4067
4063
  };
4068
4064
  }
4069
- function typescriptRules({
4070
- typeAware
4071
- }) {
4072
- if (typeAware) {
4065
+ function typescriptRules(props) {
4066
+ const { typeAware } = props ?? {};
4067
+ if (typeAware === true) {
4073
4068
  return {
4074
4069
  ...typescriptRulesTypeOblivious(),
4075
4070
  ...typescriptRulesTypeAware()
@@ -4084,13 +4079,13 @@ function typescript(options) {
4084
4079
  componentExts = [],
4085
4080
  overrides = {},
4086
4081
  parserOptions = {},
4087
- tsconfigPath,
4082
+ tsconfig: tsconfigPath,
4088
4083
  typeAware,
4089
4084
  react: react2,
4090
4085
  prefix
4091
4086
  } = options ?? {};
4092
4087
  const tsPrefix = prefix?.from ?? "@typescript-eslint";
4093
- const tsPrefixTo = prefix?.to ?? "ts";
4088
+ const tsPrefixTo = prefix?.to ?? "@typescript-eslint";
4094
4089
  const tsrules = {
4095
4090
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
4096
4091
  ...import_eslint_plugin2.default.configs["eslint-recommended"].overrides[0].rules,
@@ -4119,7 +4114,7 @@ function typescript(options) {
4119
4114
  languageOptions: typescriptLanguageOptions({
4120
4115
  parserOptions,
4121
4116
  react: react2,
4122
- tsconfigPath
4117
+ tsconfig: tsconfigPath
4123
4118
  })
4124
4119
  },
4125
4120
  {
@@ -11300,12 +11295,17 @@ function jsse(options = {}, ...userConfigs) {
11300
11295
  function jssestd() {
11301
11296
  return jsse({
11302
11297
  typescript: {
11303
- tsconfigPath: ["./tsconfig.json", "./tsconfig.eslint.json"]
11298
+ tsconfig: ["./tsconfig.json", "./tsconfig.eslint.json"]
11304
11299
  }
11305
11300
  });
11306
11301
  }
11307
11302
  function jsseReact() {
11308
- return jsse({ react: true });
11303
+ return jsse({
11304
+ react: true,
11305
+ typescript: {
11306
+ tsconfig: ["./tsconfig.json", "./tsconfig.eslint.json"]
11307
+ }
11308
+ });
11309
11309
  }
11310
11310
  // Annotate the CommonJS export names for ESM import in node:
11311
11311
  0 && (module.exports = {
package/dist/index.d.cts CHANGED
@@ -70,7 +70,7 @@ type OptionsTypeScriptWithTypes = {
70
70
  * When this options is provided, type aware rules will be enabled.
71
71
  * @see https://typescript-eslint.io/linting/typed-linting/
72
72
  */
73
- tsconfigPath?: string | string[];
73
+ tsconfig?: string | string[];
74
74
  typeAware?: boolean;
75
75
  };
76
76
  type OptionsHasTypeScript = {
package/dist/index.d.ts CHANGED
@@ -70,7 +70,7 @@ type OptionsTypeScriptWithTypes = {
70
70
  * When this options is provided, type aware rules will be enabled.
71
71
  * @see https://typescript-eslint.io/linting/typed-linting/
72
72
  */
73
- tsconfigPath?: string | string[];
73
+ tsconfig?: string | string[];
74
74
  typeAware?: boolean;
75
75
  };
76
76
  type OptionsHasTypeScript = {
package/dist/index.js CHANGED
@@ -2422,6 +2422,7 @@ var GLOB_EXCLUDE = [
2422
2422
  "**/__snapshots__",
2423
2423
  "**/auto-import?(s).d.ts",
2424
2424
  "**/components.d.ts",
2425
+ "**/*.bak",
2425
2426
  "**/scratch",
2426
2427
  "**/tmp",
2427
2428
  "**/temp"
@@ -2988,7 +2989,7 @@ function parserOptionProject(tsconfigPath) {
2988
2989
  return tsconfigPath;
2989
2990
  }
2990
2991
  function typescriptLanguageOptions(options) {
2991
- const { parserOptions = {}, tsconfigPath, react: react2 } = options ?? {};
2992
+ const { parserOptions = {}, tsconfig, react: react2 } = options ?? {};
2992
2993
  if (react2) {
2993
2994
  return {
2994
2995
  parser: parserTs,
@@ -2997,8 +2998,8 @@ function typescriptLanguageOptions(options) {
2997
2998
  ecmaFeatures: { jsx: true, modules: true },
2998
2999
  jsxPragma: null,
2999
3000
  sourceType: "module",
3000
- ...tsconfigPath ? {
3001
- project: parserOptionProject(tsconfigPath),
3001
+ ...tsconfig ? {
3002
+ project: parserOptionProject(tsconfig),
3002
3003
  tsconfigRootDir: process2.cwd()
3003
3004
  } : {},
3004
3005
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -3011,8 +3012,8 @@ function typescriptLanguageOptions(options) {
3011
3012
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
3012
3013
  parserOptions: {
3013
3014
  sourceType: "module",
3014
- ...tsconfigPath ? {
3015
- project: parserOptionProject(tsconfigPath),
3015
+ ...tsconfig ? {
3016
+ project: parserOptionProject(tsconfig),
3016
3017
  tsconfigRootDir: process2.cwd()
3017
3018
  } : {},
3018
3019
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -3253,19 +3254,14 @@ function reactRecomendedRules() {
3253
3254
  };
3254
3255
  }
3255
3256
  function react(options) {
3256
- const {
3257
- parserOptions = {},
3258
- tsconfigPath,
3259
- react: react2,
3260
- reactRefresh
3261
- } = options ?? {};
3257
+ const { parserOptions = {}, tsconfig, react: react2, reactRefresh } = options ?? {};
3262
3258
  const config = [
3263
3259
  {
3264
3260
  files: [GLOB_SRC],
3265
3261
  languageOptions: typescriptLanguageOptions({
3266
3262
  parserOptions,
3267
3263
  react: react2,
3268
- tsconfigPath
3264
+ tsconfig
3269
3265
  }),
3270
3266
  name: "jsse:react:setup",
3271
3267
  plugins: {
@@ -3990,10 +3986,9 @@ function typescriptRulesTypeOblivious() {
3990
3986
  "no-duplicate-imports": "off"
3991
3987
  };
3992
3988
  }
3993
- function typescriptRules({
3994
- typeAware
3995
- }) {
3996
- if (typeAware) {
3989
+ function typescriptRules(props) {
3990
+ const { typeAware } = props ?? {};
3991
+ if (typeAware === true) {
3997
3992
  return {
3998
3993
  ...typescriptRulesTypeOblivious(),
3999
3994
  ...typescriptRulesTypeAware()
@@ -4008,13 +4003,13 @@ function typescript(options) {
4008
4003
  componentExts = [],
4009
4004
  overrides = {},
4010
4005
  parserOptions = {},
4011
- tsconfigPath,
4006
+ tsconfig: tsconfigPath,
4012
4007
  typeAware,
4013
4008
  react: react2,
4014
4009
  prefix
4015
4010
  } = options ?? {};
4016
4011
  const tsPrefix = prefix?.from ?? "@typescript-eslint";
4017
- const tsPrefixTo = prefix?.to ?? "ts";
4012
+ const tsPrefixTo = prefix?.to ?? "@typescript-eslint";
4018
4013
  const tsrules = {
4019
4014
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
4020
4015
  ...default3.configs["eslint-recommended"].overrides[0].rules,
@@ -4043,7 +4038,7 @@ function typescript(options) {
4043
4038
  languageOptions: typescriptLanguageOptions({
4044
4039
  parserOptions,
4045
4040
  react: react2,
4046
- tsconfigPath
4041
+ tsconfig: tsconfigPath
4047
4042
  })
4048
4043
  },
4049
4044
  {
@@ -11221,12 +11216,17 @@ function jsse(options = {}, ...userConfigs) {
11221
11216
  function jssestd() {
11222
11217
  return jsse({
11223
11218
  typescript: {
11224
- tsconfigPath: ["./tsconfig.json", "./tsconfig.eslint.json"]
11219
+ tsconfig: ["./tsconfig.json", "./tsconfig.eslint.json"]
11225
11220
  }
11226
11221
  });
11227
11222
  }
11228
11223
  function jsseReact() {
11229
- return jsse({ react: true });
11224
+ return jsse({
11225
+ react: true,
11226
+ typescript: {
11227
+ tsconfig: ["./tsconfig.json", "./tsconfig.eslint.json"]
11228
+ }
11229
+ });
11230
11230
  }
11231
11231
  export {
11232
11232
  GLOB_ALL_SRC,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jsse/eslint-config",
3
3
  "type": "module",
4
- "version": "0.0.6",
4
+ "version": "0.0.7",
5
5
  "packageManager": "pnpm@8.8.0",
6
6
  "description": "jsse eslint config",
7
7
  "author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
@@ -28,12 +28,17 @@
28
28
  "peerDependencies": {
29
29
  "eslint": ">=8.0.0"
30
30
  },
31
+ "peerDependenciesMeta": {
32
+ "eslint": {
33
+ "optional": false
34
+ }
35
+ },
31
36
  "dependencies": {
32
- "@antfu/eslint-define-config": "^1.23.0-1",
37
+ "@antfu/eslint-define-config": "1.23.0-2",
33
38
  "@eslint/js": "~8.52.0",
34
- "@stylistic/eslint-plugin": "0.0.12",
35
- "@typescript-eslint/eslint-plugin": "^6.7.5",
36
- "@typescript-eslint/parser": "^6.7.5",
39
+ "@stylistic/eslint-plugin": "0.1.1",
40
+ "@typescript-eslint/eslint-plugin": "^6.9.0",
41
+ "@typescript-eslint/parser": "^6.9.0",
37
42
  "eslint-config-flat-gitignore": "^0.1.1",
38
43
  "eslint-define-config": "^1.24.1",
39
44
  "eslint-plugin-antfu": "1.0.0-beta.12",
@@ -50,23 +55,23 @@
50
55
  "eslint-plugin-tailwindcss": "^3.13.0",
51
56
  "eslint-plugin-unicorn": "^48.0.1",
52
57
  "eslint-plugin-unused-imports": "^3.0.0",
53
- "eslint-plugin-vitest": "^0.3.2",
58
+ "eslint-plugin-vitest": "^0.3.8",
54
59
  "eslint-plugin-yml": "^1.10.0",
55
- "jsonc-eslint-parser": "^2.3.0",
60
+ "jsonc-eslint-parser": "^2.4.0",
56
61
  "yaml-eslint-parser": "^1.2.2"
57
62
  },
58
63
  "optionalDependencies": {
59
- "tailwindcss": "^3.3.3"
64
+ "tailwindcss": "^3.3.4"
60
65
  },
61
66
  "devDependencies": {
62
67
  "@antfu/ni": "^0.21.8",
63
68
  "@types/eslint": "^8.44.6",
64
69
  "@types/eslint__js": "~8.42.2",
65
70
  "@types/fs-extra": "^11.0.3",
66
- "@types/node": "^20.8.7",
71
+ "@types/node": "^20.8.8",
67
72
  "bumpp": "^9.2.0",
68
73
  "cac": "^6.7.14",
69
- "eslint": "^8.51.0",
74
+ "eslint": "^8.52.0",
70
75
  "eslint-flat-config-viewer": "^0.1.0",
71
76
  "eslint-plugin-sort-keys": "^2.3.5",
72
77
  "execa": "~8.0.1",
@@ -75,6 +80,7 @@
75
80
  "globals": "^13.23.0",
76
81
  "local-pkg": "^0.5.0",
77
82
  "microdiff": "~1.3.2",
83
+ "prettier": "^3.0.3",
78
84
  "react": "~18.2.0",
79
85
  "rimraf": "^5.0.5",
80
86
  "tsup": "^7.2.0",