Skip to content

Commit

Permalink
update lint-staged config
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-stillman committed Sep 18, 2024
1 parent d41dd4c commit 287be7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/writeConfigs/getLintStagedConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export const getLintStagedConfig = (
stylelint: boolean
) => `/* eslint-disable @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions, no-undef */
module.exports = {
export const getLintStagedConfig = (stylelint: boolean) => `
export default {
'./src/**/*.{js,jsx,ts,tsx}': files => [
'tsc -p tsconfig.json --noEmit',
\`eslint \${files.join(' ')} --fix\`,
Expand Down
5 changes: 4 additions & 1 deletion src/writeConfigs/writeConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ export const writeLintStagedConfig = async ({
}: {
styleLint: boolean;
}) =>
writeLocalFileString('lint-staged.config.js', getLintStagedConfig(styleLint));
writeLocalFileString(
'lint-staged.config.mjs',
getLintStagedConfig(styleLint)
);

// TODO: update arguments
export const writeEslintConfig = async ({
Expand Down

0 comments on commit 287be7b

Please sign in to comment.