Skip to content

Commit

Permalink
test: update test with eslint-config-xo (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Aug 4, 2024
1 parent f8d9c30 commit c76db1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
16 changes: 3 additions & 13 deletions tests/__snapshots__/config@eslint-config-xo
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
{
"configContent": "
import path from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
import pluginJs from "@eslint/js";
"configContent": "import config from "eslint-config-xo";

// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({baseDirectory: __dirname, recommendedConfig: pluginJs.configs.recommended});

export default [
...compat.extends("xo"),
...[].concat(config),
];",
"configFilename": "eslint.config.mjs",
"devDependencies": [
"eslint@>=8.56.0",
"eslint@>=9.8.0",
"eslint-config-xo",
"@eslint/eslintrc",
"@eslint/js",
],
"installFlags": [
"-D",
Expand Down
2 changes: 1 addition & 1 deletion tests/config-snapshots.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe("generate config for cjs projects", () => {
const inputs = [{
name: "config@eslint-config-xo",
answers: {
config: { packageName: "eslint-config-xo", type: "eslintrc" }
config: { packageName: "eslint-config-xo", type: "flat" }
}
},
{
Expand Down

0 comments on commit c76db1c

Please sign in to comment.