@isentinel/eslint-config 1.0.0-beta.2 → 1.0.1
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 +21 -21
- package/README.md +17 -0
- package/dist/{chunk-27M5XGMB.js → chunk-42NWHE66.js} +2 -2
- package/dist/cli.js +101 -93
- package/dist/index.d.ts +1072 -517
- package/dist/index.js +254 -104
- package/package.json +38 -35
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.
|
|
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.
|
|
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-
|
|
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.1";
|
|
20
21
|
var package_default = {
|
|
21
22
|
name: "@isentinel/eslint-config",
|
|
22
|
-
version
|
|
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
|
|
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": "
|
|
68
|
-
"@clack/prompts": "
|
|
69
|
-
"@cspell/eslint-plugin": "
|
|
70
|
-
"@eslint-community/eslint-plugin-eslint-comments": "
|
|
71
|
-
"@eslint/compat": "
|
|
72
|
-
"@eslint/markdown": "
|
|
73
|
-
"@isentinel/dict-rbxts": "
|
|
74
|
-
"@isentinel/dict-roblox": "
|
|
75
|
-
"@shopify/eslint-plugin": "
|
|
76
|
-
"@stylistic/eslint-plugin": "
|
|
77
|
-
"@typescript-eslint/eslint-plugin": "
|
|
78
|
-
"@typescript-eslint/parser": "
|
|
79
|
-
ansis: "
|
|
80
|
-
"eslint-config-flat-gitignore": "
|
|
81
|
-
"eslint-config-prettier": "
|
|
82
|
-
"eslint-flat-config-utils": "
|
|
83
|
-
"eslint-merge-processors": "
|
|
84
|
-
"eslint-plugin-antfu": "
|
|
85
|
-
"eslint-plugin-arrow-return-style": "
|
|
86
|
-
"eslint-plugin-better-max-params": "
|
|
87
|
-
"eslint-plugin-comment-length": "
|
|
88
|
-
"eslint-plugin-de-morgan": "
|
|
89
|
-
"eslint-plugin-format": "
|
|
90
|
-
"eslint-plugin-format-lua": "
|
|
91
|
-
"eslint-plugin-import-x": "
|
|
92
|
-
"eslint-plugin-jsdoc": "
|
|
93
|
-
"eslint-plugin-jsonc": "
|
|
94
|
-
"eslint-plugin-no-only-tests": "
|
|
95
|
-
"eslint-plugin-package-json": "
|
|
96
|
-
"eslint-plugin-perfectionist": "
|
|
97
|
-
"eslint-plugin-
|
|
98
|
-
"eslint-plugin-
|
|
99
|
-
"eslint-plugin-
|
|
100
|
-
"eslint-plugin-
|
|
101
|
-
"eslint-plugin-
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"
|
|
111
|
-
|
|
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": "
|
|
115
|
-
"@eslint-react/eslint-plugin": "
|
|
116
|
-
"@eslint/config-inspector": "
|
|
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": "
|
|
119
|
-
"@types/fs-extra": "
|
|
120
|
-
"@types/node": "
|
|
121
|
-
"@types/prompts": "
|
|
122
|
-
"@types/yargs": "
|
|
123
|
-
bumpp: "
|
|
124
|
-
eslint: "
|
|
125
|
-
"eslint-plugin-jest": "
|
|
126
|
-
"eslint-plugin-react-roblox-hooks": "
|
|
127
|
-
"eslint-plugin-simple-import-sort": "
|
|
128
|
-
"eslint-typegen": "
|
|
129
|
-
esno: "
|
|
130
|
-
execa: "
|
|
131
|
-
"fast-glob": "
|
|
132
|
-
"fs-extra": "
|
|
133
|
-
jiti: "
|
|
134
|
-
"lint-staged": "
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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.
|
|
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.
|
|
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${
|
|
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"] = `^${
|
|
351
|
-
package_.devDependencies.eslint ??=
|
|
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] =
|
|
362
|
+
package_.devDependencies[dep] = versionsMap[dep];
|
|
355
363
|
addedPackages.push(dep);
|
|
356
364
|
}
|
|
357
365
|
if (addedPackages.length) {
|