@isentinel/eslint-config 5.0.0-beta.3 → 5.0.0-beta.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/dist/index.mjs +8 -10
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -142,6 +142,7 @@ function isInGitHooksOrLintStaged() {
|
|
|
142
142
|
function isInAgentSession() {
|
|
143
143
|
return [
|
|
144
144
|
process.env["CLAUDECODE"],
|
|
145
|
+
process.env["CLAUDE_CODE_ENTRYPOINT"],
|
|
145
146
|
process.env["CODEX_THREAD_ID"],
|
|
146
147
|
process.env["CURSOR_AGENT"],
|
|
147
148
|
process.env["GEMINI_CLI"],
|
|
@@ -1871,20 +1872,17 @@ async function isentinel(options, ...userConfigs) {
|
|
|
1871
1872
|
let composer = new FlatConfigComposer();
|
|
1872
1873
|
composer = composer.append(...configs, ...userConfigs);
|
|
1873
1874
|
if (autoRenamePlugins) composer = composer.renamePlugins(defaultPluginRenaming);
|
|
1874
|
-
if (isInEditor) {
|
|
1875
|
-
const disableAutofixRules = [
|
|
1876
|
-
|
|
1877
|
-
"prefer-const",
|
|
1878
|
-
"
|
|
1879
|
-
|
|
1880
|
-
if (
|
|
1875
|
+
if (isInEditor || inAgentSession) {
|
|
1876
|
+
const disableAutofixRules = [];
|
|
1877
|
+
if (isInEditor) {
|
|
1878
|
+
disableAutofixRules.push("no-useless-return", "prefer-const", "unused-imports/no-unused-imports");
|
|
1879
|
+
if (enableRoblox) disableAutofixRules.push("unicorn/no-array-for-each");
|
|
1880
|
+
}
|
|
1881
|
+
if (inAgentSession) disableAutofixRules.push("ts/consistent-type-imports");
|
|
1881
1882
|
composer = composer.disableRulesFix(disableAutofixRules, { builtinRules: async () => {
|
|
1882
1883
|
return (await import("eslint/use-at-your-own-risk")).builtinRules;
|
|
1883
1884
|
} });
|
|
1884
1885
|
}
|
|
1885
|
-
if (inAgentSession) composer = composer.disableRulesFix(["ts/consistent-type-imports"], { builtinRules: async () => {
|
|
1886
|
-
return (await import("eslint/use-at-your-own-risk")).builtinRules;
|
|
1887
|
-
} });
|
|
1888
1886
|
if (defaultSeverity) composer = composer.onResolved((item) => {
|
|
1889
1887
|
for (const config of item) if (config.rules) config.rules = overrideRuleSeverity(config.rules, defaultSeverity);
|
|
1890
1888
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isentinel/eslint-config",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.5",
|
|
4
4
|
"description": "iSentinel's ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"type-fest": "5.4.4",
|
|
132
132
|
"typescript": "5.9.3",
|
|
133
133
|
"unplugin-unused": "0.5.7",
|
|
134
|
-
"@isentinel/eslint-config": "5.0.0-beta.
|
|
134
|
+
"@isentinel/eslint-config": "5.0.0-beta.5"
|
|
135
135
|
},
|
|
136
136
|
"peerDependencies": {
|
|
137
137
|
"@vitest/eslint-plugin": "^1.6.4",
|