Skip to content

Commit

Permalink
fix: add missing \n after imports in eslint.config.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
allohamora committed Jan 30, 2025
1 parent 244fe9b commit b26602c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions __tests__/categories/js/eslint/eslint.entrypoint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ __test2__,

const configFile = `// @ts-check
import globals from "globals";
export default tseslint.config(
{ignores: ["node_modules"]},
{files: ["src/**/*.ts"],languageOptions: {globals: {...globals.window},parserOptions: {"ecmaVersion":2020}},plugins: {'@typescript-eslint': eslintPluginTs},rules: {"no-console":"warn"}}
Expand Down
2 changes: 1 addition & 1 deletion src/categories/js/eslint/eslint.entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const optional = <T>(value: T | undefined, map: (value: T) => string) => (value
export const buildConfig = (config: Config) => {
const start = optional(config.typescript, () => '// @ts-check');

const imports = `${config.imports.map((item) => `${item};`).join('\n')}\n`.trim();
const imports = config.imports.map((item) => `${item};\n`).join('');

const exportStart = config.typescript ? `export default tseslint.config(` : `export default [`;
const exportEnd = config.typescript ? `);` : `];`;
Expand Down

0 comments on commit b26602c

Please sign in to comment.