diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 340e771..745b6b3 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -2,6 +2,6 @@ "composer.json": "composer validate", "package.json": "npmPkgJsonLint --allowEmptyTargets", "*.md": ["markdownlint", "prettier --check"], - "*.{js,jsx,ts,tsx}": ["eslint --no-error-on-unmatched-pattern", "prettier --check"], + "*.{js,cjs,mjs,jsx,ts,tsx}": ["eslint --no-error-on-unmatched-pattern", "prettier --check"], "*.{css,scss}": ["stylelint --allow-empty-input", "prettier --check"] } diff --git a/.prettierrc.json b/.prettierrc.json index d0dbced..b44df1d 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,7 +1,7 @@ { "overrides": [ { - "files": ["*.js", "*.jsx"], + "files": ["*.js", "*.cjs", "*.mjs", "*.jsx"], "options": { "parser": "flow", "printWidth": 120, diff --git a/package.json b/package.json index 0548baf..7cff202 100644 --- a/package.json +++ b/package.json @@ -41,11 +41,11 @@ "build": "pnpm run --recursive --aggregate-output build", "clean": "pnpm run --recursive --aggregate-output --parallel clean", "lint": "npm-run-all --continue-on-error lint:** lint-workspaces", - "lint:js": "eslint --ext '.js,.json,.jsx,.mdx,.ts,.tsx' --report-unused-disable-directives .", + "lint:js": "eslint --ext .js,.cjs,.mjs,.json,.jsx,.mdx,.ts,.tsx --report-unused-disable-directives .", "lint:md": "markdownlint '**/*.md'", "lint:package-json": "npmPkgJsonLint '**/package.json'", "lint-fix": "npm-run-all --continue-on-error lint-fix:** prettier", - "lint-fix:js": "eslint --ext '.js,.json,.jsx,.mdx,.ts,.tsx' --fix --report-unused-disable-directives .", + "lint-fix:js": "eslint --ext .js,.cjs,.mjs,.json,.jsx,.mdx,.ts,.tsx --fix --report-unused-disable-directives .", "lint-fix:md": "markdownlint --fix '**/*.md'", "lint-workspaces": "pnpm run --recursive --aggregate-output --no-bail lint", "prepare": "husky",