Skip to content

Commit

Permalink
style: eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
schoero committed Jan 30, 2025
1 parent e40a248 commit 31609cd
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 30 deletions.
9 changes: 5 additions & 4 deletions tests/e2e/commonjs/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const eslintParserHTML = require( "@html-eslint/parser");
const eslintPluginReadableTailwind = require( "eslint-plugin-readable-tailwind");
const eslintParserHTML = require("@html-eslint/parser");
const eslintPluginReadableTailwind = require("eslint-plugin-readable-tailwind");


module.exports = {
files: ["**/*.html"],
Expand All @@ -9,5 +10,5 @@ module.exports = {
plugins: {
"readable-tailwind": eslintPluginReadableTailwind
},
rules: eslintPluginReadableTailwind.configs.warning.rules,
}
rules: eslintPluginReadableTailwind.configs.warning.rules
};
26 changes: 14 additions & 12 deletions tests/e2e/commonjs/test.test.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
import { $ } from "readable-tailwind:build:utils.js";
import { beforeAll, describe, expect, it } from "vitest";

import { $ } from "readable-tailwind:build:utils.js";


describe("e2e/commonjs", async () => {
beforeAll(async () => {
await $`
cd ${import.meta.dirname} &&
npm i --no-package-lock
`
})
`;
});

it("should report all errors", async () => {
const json = await $`
cd ${import.meta.dirname} > /dev/null &&
npx eslint --config eslint.config.js --no-config-lookup --format json .
`
`;

expect(JSON.parse(json.toString())[1]).toMatchObject({
"errorCount": 0,
"fatalErrorCount": 0,
"fixableErrorCount": 0,
"fixableWarningCount": 2,
"warningCount": 2
errorCount: 0,
fatalErrorCount: 0,
fixableErrorCount: 0,
fixableWarningCount: 2,
warningCount: 2
});
})
})
});
});
5 changes: 3 additions & 2 deletions tests/e2e/esm/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import eslintParserHTML from "@html-eslint/parser";
import eslintPluginReadableTailwind from "eslint-plugin-readable-tailwind";


export default {
files: ["**/*.html"],
languageOptions: {
Expand All @@ -9,5 +10,5 @@ export default {
plugins: {
"readable-tailwind": eslintPluginReadableTailwind
},
rules: eslintPluginReadableTailwind.configs.warning.rules,
}
rules: eslintPluginReadableTailwind.configs.warning.rules
};
26 changes: 14 additions & 12 deletions tests/e2e/esm/test.test.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
import { $ } from "readable-tailwind:build:utils.js";
import { beforeAll, describe, expect, it } from "vitest";

import { $ } from "readable-tailwind:build:utils.js";


describe("e2e/esm", async () => {
beforeAll(async () => {
await $`
cd ${import.meta.dirname} &&
npm i --no-package-lock
`
})
`;
});

it("should report all errors", async () => {
const json = await $`
cd ${import.meta.dirname} > /dev/null &&
npx eslint --config eslint.config.js --no-config-lookup --format json .
`
`;

expect(JSON.parse(json.toString())[1]).toMatchObject({
"errorCount": 0,
"fatalErrorCount": 0,
"fixableErrorCount": 0,
"fixableWarningCount": 2,
"warningCount": 2
errorCount: 0,
fatalErrorCount: 0,
fixableErrorCount: 0,
fixableWarningCount: 2,
warningCount: 2
});
})
})
});
});

0 comments on commit 31609cd

Please sign in to comment.