lintmax 0.1.99 → 0.1.101

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +14 -8
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -936,11 +936,12 @@ const listCompactFiles = async ({ env, root }) => {
936
936
  const symlinkFlags = await Promise.all(entries.map(async (e) => isSymlinkSafe(join(root, e))));
937
937
  return entries.filter((_e, index) => !symlinkFlags[index]);
938
938
  };
939
- const runCompact = async ({ env, human = false, mode, root }) => {
940
- const files = await listCompactFiles({
939
+ const runCompact = async ({ env, human = false, isIgnored, mode, root }) => {
940
+ const listed = await listCompactFiles({
941
941
  env,
942
942
  root
943
943
  });
944
+ const files = isIgnored === void 0 ? listed : listed.filter((one) => !isIgnored(one));
944
945
  const results = await Promise.all(files.map(async (relativePath) => {
945
946
  if (!isCompactCandidate({ relativePath })) return {
946
947
  changed: false,
@@ -1812,11 +1813,12 @@ const createStepExecutor = ({ env, failures, root }) => {
1812
1813
  throw error;
1813
1814
  }
1814
1815
  };
1815
- const runCompactContinue = async ({ human = false, mode }) => {
1816
+ const runCompactContinue = async ({ human = false, isIgnored, mode }) => {
1816
1817
  try {
1817
1818
  await runCompact({
1818
1819
  env,
1819
1820
  human,
1821
+ isIgnored,
1820
1822
  mode,
1821
1823
  root
1822
1824
  });
@@ -1934,6 +1936,7 @@ const createCheckSteps = ({ biomeBin, dir, eslintArgs, eslintBin, oxlintBin, oxl
1934
1936
  });
1935
1937
  return steps;
1936
1938
  };
1939
+ const DESTRUCTIVE_FIX_OVERRIDES = ["--rule", "{\"@eslint-react/no-missing-context-display-name\":\"off\"}"];
1937
1940
  const createFixSteps = ({ biomeBin, dir, eslintArgs, eslintBin, hasFlowmark, oxlintBin, oxlintIgnorePatterns, prettierBin, prettierMarkdownTargets, sortPkgJson }) => {
1938
1941
  const oxlintCliAllow = [...OXLINT_CLI_ALLOW.flatMap((r) => ["--allow", r]), ...oxlintIgnorePatterns.flatMap((p) => ["--ignore-pattern", p])];
1939
1942
  const steps = [
@@ -1977,6 +1980,7 @@ const createFixSteps = ({ biomeBin, dir, eslintArgs, eslintBin, hasFlowmark, oxl
1977
1980
  args: [
1978
1981
  eslintBin,
1979
1982
  ...eslintArgs,
1983
+ ...DESTRUCTIVE_FIX_OVERRIDES,
1980
1984
  "--fix"
1981
1985
  ],
1982
1986
  label: "eslint",
@@ -2372,8 +2376,12 @@ const runLint = async ({ command, human = false }) => {
2372
2376
  failures,
2373
2377
  root: cwd
2374
2378
  });
2379
+ const oxlintIgnorePatternsEarly = await readOxlintIgnorePatterns({ dir });
2380
+ const ignoreGlobsEarly = oxlintIgnorePatternsEarly.map((p) => new Glob(p));
2381
+ const isIgnored = (filePath) => ignoreGlobsEarly.some((g) => g.match(filePath));
2375
2382
  if (command === "fix" && runtime.compact === true) await runCompactContinue({
2376
2383
  human,
2384
+ isIgnored,
2377
2385
  mode: "fix"
2378
2386
  });
2379
2387
  const eslintArgs = ["--config", joinPath(dir, "eslint.generated.mjs")];
@@ -2387,13 +2395,11 @@ const runLint = async ({ command, human = false }) => {
2387
2395
  env,
2388
2396
  root: cwd
2389
2397
  });
2390
- const allGitFiles = gitWorkTree ? await listCompactFiles({
2398
+ const allGitFiles = (gitWorkTree ? await listCompactFiles({
2391
2399
  env,
2392
2400
  root: cwd
2393
- }) : [];
2394
- const oxlintIgnorePatterns = await readOxlintIgnorePatterns({ dir });
2395
- const ignoreGlobs = oxlintIgnorePatterns.map((p) => new Glob(p));
2396
- const isIgnored = (filePath) => ignoreGlobs.some((g) => g.match(filePath));
2401
+ }) : []).filter((one) => !isIgnored(one));
2402
+ const oxlintIgnorePatterns = oxlintIgnorePatternsEarly;
2397
2403
  const prettierMarkdownTargets = await createPrettierMarkdownTargets({
2398
2404
  gitFiles: allGitFiles,
2399
2405
  gitWorkTree,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lintmax",
3
- "version": "0.1.99",
3
+ "version": "0.1.101",
4
4
  "description": "The #1 anti AI slop typescript tooling. Designed for coding agents, not humans.",
5
5
  "keywords": [
6
6
  "agent",