@isentinel/eslint-config 1.0.0-beta.2 → 1.0.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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/antfu>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/antfu>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -364,6 +364,23 @@ Go to your project root that contains `eslint.config.ts` and run:
364
364
  npx eslint-config-inspector
365
365
  ```
366
366
 
367
+ ## Versioning Policy
368
+
369
+ This project follows [Semantic Versioning](https://semver.org/) for releases. However, since this is just a config and involves opinions and many moving parts, we don't treat rules changes as breaking changes.
370
+
371
+ ### Changes Considered as Breaking Changes
372
+
373
+ - Node.js version requirement changes
374
+ - Huge refactors that might break the config
375
+ - Plugins made major changes that might break the config
376
+ - Changes that might affect most of the codebases
377
+
378
+ ### Changes Considered as Non-breaking Changes
379
+
380
+ - Enable/disable rules and plugins (that might become stricter)
381
+ - Rules options changes
382
+ - Version bumps of dependencies
383
+
367
384
  ### I prefer XXX...
368
385
 
369
386
  Sure, you can configure and override rules locally in your project to fit your
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.4.38_tsx@4.19.1_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/esm_shims.js
30
+ // node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postc_ec9de0a178a047416bf6071746f52631/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.4.38_tsx@4.19.1_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/esm_shims.js"() {
32
+ "node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postc_ec9de0a178a047416bf6071746f52631/node_modules/tsup/assets/esm_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_esm_shims
3
- } from "./chunk-27M5XGMB.js";
3
+ } from "./chunk-42NWHE66.js";
4
4
 
5
5
  // src/cli.ts
6
6
  init_esm_shims();
@@ -17,9 +17,10 @@ import { hideBin } from "yargs/helpers";
17
17
  init_esm_shims();
18
18
 
19
19
  // package.json
20
+ var version = "1.0.0";
20
21
  var package_default = {
21
22
  name: "@isentinel/eslint-config",
22
- version: "1.0.0-beta.2",
23
+ version,
23
24
  description: "iSentinel's ESLint config",
24
25
  keywords: [
25
26
  "eslint-config",
@@ -45,16 +46,17 @@ var package_default = {
45
46
  "dist"
46
47
  ],
47
48
  scripts: {
48
- build: "nr typegen && tsup --clean --dts",
49
+ build: "nr gen && tsup --clean --dts",
49
50
  "build:inspector": "pnpm build && npx @eslint/config-inspector build",
50
51
  dev: "npx @eslint/config-inspector --config eslint.config.ts",
52
+ gen: "tsx scripts/typegen.ts && tsx scripts/versiongen.ts",
53
+ postgen: "echo 'Generation complete!'",
51
54
  lint: "eslint",
52
55
  prepack: "nr build",
53
56
  prepare: "simple-git-hooks",
54
57
  release: "bumpp && pnpm publish --p",
55
58
  stub: "tsup",
56
59
  typecheck: "tsc --noEmit",
57
- typegen: "esno scripts/typegen.ts",
58
60
  watch: "tsup --watch"
59
61
  },
60
62
  "simple-git-hooks": {
@@ -64,81 +66,83 @@ var package_default = {
64
66
  "*": "eslint --fix"
65
67
  },
66
68
  dependencies: {
67
- "@antfu/install-pkg": "1.0.0",
68
- "@clack/prompts": "0.10.0",
69
- "@cspell/eslint-plugin": "8.17.5",
70
- "@eslint-community/eslint-plugin-eslint-comments": "4.4.1",
71
- "@eslint/compat": "1.2.7",
72
- "@eslint/markdown": "6.3.0",
73
- "@isentinel/dict-rbxts": "1.0.1",
74
- "@isentinel/dict-roblox": "1.0.3",
75
- "@shopify/eslint-plugin": "47.0.1",
76
- "@stylistic/eslint-plugin": "4.1.0",
77
- "@typescript-eslint/eslint-plugin": "8.25.0",
78
- "@typescript-eslint/parser": "8.25.0",
79
- ansis: "3.16.0",
80
- "eslint-config-flat-gitignore": "2.1.0",
81
- "eslint-config-prettier": "10.0.2",
82
- "eslint-flat-config-utils": "2.0.1",
83
- "eslint-merge-processors": "2.0.0",
84
- "eslint-plugin-antfu": "3.1.0",
85
- "eslint-plugin-arrow-return-style": "1.3.1",
86
- "eslint-plugin-better-max-params": "0.0.1",
87
- "eslint-plugin-comment-length": "2.1.1",
88
- "eslint-plugin-de-morgan": "1.2.0",
89
- "eslint-plugin-format": "1.0.1",
90
- "eslint-plugin-format-lua": "0.1.0",
91
- "eslint-plugin-import-x": "4.6.1",
92
- "eslint-plugin-jsdoc": "50.6.3",
93
- "eslint-plugin-jsonc": "2.19.1",
94
- "eslint-plugin-no-only-tests": "3.3.0",
95
- "eslint-plugin-package-json": "0.26.1",
96
- "eslint-plugin-perfectionist": "4.9.0",
97
- "eslint-plugin-promise": "7.2.1",
98
- "eslint-plugin-sonarjs": "3.0.2",
99
- "eslint-plugin-toml": "0.12.0",
100
- "eslint-plugin-unicorn": "57.0.0",
101
- "eslint-plugin-yml": "1.17.0",
102
- "isentinel-eslint-plugin-roblox-ts": "0.0.37",
103
- "jsonc-eslint-parser": "2.4.0",
104
- "local-pkg": "1.1.0",
105
- "parse-gitignore": "2.0.0",
106
- prettier: "3.5.2",
107
- "prettier-plugin-jsdoc": "1.3.2",
108
- prompts: "2.4.2",
109
- "toml-eslint-parser": "0.10.0",
110
- "yaml-eslint-parser": "1.3.0",
111
- yargs: "17.7.2"
69
+ "@antfu/install-pkg": "catalog:prod",
70
+ "@clack/prompts": "catalog:prod",
71
+ "@cspell/eslint-plugin": "catalog:prod",
72
+ "@eslint-community/eslint-plugin-eslint-comments": "catalog:prod",
73
+ "@eslint/compat": "catalog:prod",
74
+ "@eslint/markdown": "catalog:prod",
75
+ "@isentinel/dict-rbxts": "catalog:prod",
76
+ "@isentinel/dict-roblox": "catalog:prod",
77
+ "@shopify/eslint-plugin": "catalog:prod",
78
+ "@stylistic/eslint-plugin": "catalog:prod",
79
+ "@typescript-eslint/eslint-plugin": "catalog:prod",
80
+ "@typescript-eslint/parser": "catalog:prod",
81
+ ansis: "catalog:prod",
82
+ "eslint-config-flat-gitignore": "catalog:prod",
83
+ "eslint-config-prettier": "catalog:prod",
84
+ "eslint-flat-config-utils": "catalog:prod",
85
+ "eslint-merge-processors": "catalog:prod",
86
+ "eslint-plugin-antfu": "catalog:prod",
87
+ "eslint-plugin-arrow-return-style": "catalog:prod",
88
+ "eslint-plugin-better-max-params": "catalog:prod",
89
+ "eslint-plugin-comment-length": "catalog:prod",
90
+ "eslint-plugin-de-morgan": "catalog:prod",
91
+ "eslint-plugin-format": "catalog:prod",
92
+ "eslint-plugin-format-lua": "catalog:prod",
93
+ "eslint-plugin-import-x": "catalog:prod",
94
+ "eslint-plugin-jsdoc": "catalog:prod",
95
+ "eslint-plugin-jsonc": "catalog:prod",
96
+ "eslint-plugin-no-only-tests": "catalog:prod",
97
+ "eslint-plugin-package-json": "catalog:prod",
98
+ "eslint-plugin-perfectionist": "catalog:prod",
99
+ "eslint-plugin-pnpm": "catalog:prod",
100
+ "eslint-plugin-promise": "catalog:prod",
101
+ "eslint-plugin-sonarjs": "catalog:prod",
102
+ "eslint-plugin-toml": "catalog:prod",
103
+ "eslint-plugin-unicorn": "catalog:prod",
104
+ "eslint-plugin-yml": "catalog:prod",
105
+ "isentinel-eslint-plugin-roblox-ts": "catalog:prod",
106
+ "jsonc-eslint-parser": "catalog:prod",
107
+ "local-pkg": "catalog:prod",
108
+ "parse-gitignore": "catalog:prod",
109
+ prettier: "catalog:prod",
110
+ "prettier-plugin-jsdoc": "catalog:prod",
111
+ prompts: "catalog:prod",
112
+ "toml-eslint-parser": "catalog:prod",
113
+ "yaml-eslint-parser": "catalog:prod",
114
+ yargs: "catalog:prod"
112
115
  },
113
116
  devDependencies: {
114
- "@antfu/ni": "23.3.1",
115
- "@eslint-react/eslint-plugin": "1.14.3",
116
- "@eslint/config-inspector": "1.0.2",
117
+ "@antfu/ni": "catalog:dev",
118
+ "@eslint-react/eslint-plugin": "catalog:peer",
119
+ "@eslint/config-inspector": "catalog:dev",
117
120
  "@isentinel/eslint-config": "workspace:*",
118
- "@stylistic/eslint-plugin-migrate": "4.1.0",
119
- "@types/fs-extra": "11.0.4",
120
- "@types/node": "22.13.9",
121
- "@types/prompts": "2.4.9",
122
- "@types/yargs": "17.0.33",
123
- bumpp: "10.1.0",
124
- eslint: "9.21.0",
125
- "eslint-plugin-jest": "28.11.0",
126
- "eslint-plugin-react-roblox-hooks": "5.1.0-rbx.1",
127
- "eslint-plugin-simple-import-sort": "12.1.1",
128
- "eslint-typegen": "2.0.0",
129
- esno: "4.8.0",
130
- execa: "9.5.2",
131
- "fast-glob": "3.3.3",
132
- "fs-extra": "11.3.0",
133
- jiti: "2.4.2",
134
- "lint-staged": "15.4.3",
135
- rimraf: "6.0.1",
136
- "simple-git-hooks": "2.11.1",
137
- tsup: "8.4.0",
138
- typescript: "5.7.3"
121
+ "@stylistic/eslint-plugin-migrate": "catalog:dev",
122
+ "@types/fs-extra": "catalog:dev",
123
+ "@types/node": "catalog:dev",
124
+ "@types/prompts": "catalog:dev",
125
+ "@types/yargs": "catalog:dev",
126
+ bumpp: "catalog:dev",
127
+ eslint: "catalog:peer",
128
+ "eslint-plugin-jest": "catalog:peer",
129
+ "eslint-plugin-react-roblox-hooks": "catalog:peer",
130
+ "eslint-plugin-simple-import-sort": "catalog:dev",
131
+ "eslint-typegen": "catalog:dev",
132
+ esno: "catalog:dev",
133
+ execa: "catalog:dev",
134
+ "fast-glob": "catalog:dev",
135
+ "fs-extra": "catalog:dev",
136
+ jiti: "catalog:dev",
137
+ "lint-staged": "catalog:dev",
138
+ "pnpm-workspace-yaml": "catalog:dev",
139
+ rimraf: "catalog:dev",
140
+ "simple-git-hooks": "catalog:dev",
141
+ tsup: "catalog:dev",
142
+ typescript: "catalog:dev"
139
143
  },
140
144
  peerDependencies: {
141
- "@eslint-react/eslint-plugin": "^1.14.0",
145
+ "@eslint-react/eslint-plugin": "^1.45.0",
142
146
  eslint: "^9.10.0",
143
147
  "eslint-plugin-jest": "^28.9.0",
144
148
  "eslint-plugin-react-roblox-hooks": "^5.1.0-rbx.1"
@@ -154,15 +158,9 @@ var package_default = {
154
158
  optional: true
155
159
  }
156
160
  },
157
- packageManager: "pnpm@10.7.1",
161
+ packageManager: "pnpm@10.8.0",
158
162
  publishConfig: {
159
163
  access: "public"
160
- },
161
- pnpm: {
162
- onlyBuiltDependencies: [
163
- "esbuild",
164
- "simple-git-hooks"
165
- ]
166
164
  }
167
165
  };
168
166
 
@@ -261,14 +259,6 @@ import parse from "parse-gitignore";
261
259
  // src/cli/utils.ts
262
260
  init_esm_shims();
263
261
  import { execSync } from "node:child_process";
264
- function isGitClean() {
265
- try {
266
- execSync("git diff-index --quiet HEAD --");
267
- return true;
268
- } catch {
269
- return false;
270
- }
271
- }
272
262
  function getEslintConfigContent(mainConfig, additionalConfigs) {
273
263
  return `
274
264
  import style from '@isentinel/eslint-config'
@@ -280,6 +270,14 @@ ${config}
280
270
  }`)})
281
271
  `.trimStart();
282
272
  }
273
+ function isGitClean() {
274
+ try {
275
+ execSync("git diff-index --quiet HEAD --");
276
+ return true;
277
+ } catch {
278
+ return false;
279
+ }
280
+ }
283
281
 
284
282
  // src/cli/stages/update-eslint-files.ts
285
283
  async function updateEslintFiles() {
@@ -340,18 +338,28 @@ import ansis3 from "ansis";
340
338
  import fsp3 from "node:fs/promises";
341
339
  import path3 from "node:path";
342
340
  import process3 from "node:process";
341
+
342
+ // src/cli/constants-generated.ts
343
+ init_esm_shims();
344
+ var versionsMap = {
345
+ "@eslint-react/eslint-plugin": "1.47.1",
346
+ "eslint": "9.24.0",
347
+ "eslint-plugin-react-roblox-hooks": "5.1.0-rbx.1"
348
+ };
349
+
350
+ // src/cli/stages/update-package-json.ts
343
351
  async function updatePackageJson() {
344
352
  const cwd = process3.cwd();
345
353
  const pathPackageJSON = path3.join(cwd, "package.json");
346
- log3.step(ansis3.cyan(`Bumping @isentinel/eslint-config to v${package_default.version}`));
354
+ log3.step(ansis3.cyan(`Bumping @isentinel/eslint-config to v${version}`));
347
355
  const packageContent = await fsp3.readFile(pathPackageJSON, "utf-8");
348
356
  const package_ = JSON.parse(packageContent);
349
357
  package_.devDependencies ??= {};
350
- package_.devDependencies["@isentinel/eslint-config"] = `^${package_default.version}`;
351
- package_.devDependencies.eslint ??= package_default.devDependencies.eslint.replace("npm:eslint-ts-patch@", "").replace(/-\d+$/, "");
358
+ package_.devDependencies["@isentinel/eslint-config"] = `^${version}`;
359
+ package_.devDependencies.eslint ??= versionsMap.eslint;
352
360
  const addedPackages = [];
353
361
  for (const dep of dependenciesMap["react"]) {
354
- package_.devDependencies[dep] = package_default.devDependencies[dep];
362
+ package_.devDependencies[dep] = versionsMap[dep];
355
363
  addedPackages.push(dep);
356
364
  }
357
365
  if (addedPackages.length) {