Skip to content

Commit

Permalink
chore: format/lint .cjs files
Browse files Browse the repository at this point in the history
Make sure Prettier, ESLint and lint-staged know about .cjs files
  • Loading branch information
matijs committed Mar 26, 2024
1 parent e381287 commit 06ca043
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,jsx,ts,tsx}": ["eslint --no-error-on-unmatched-pattern", "prettier --check"],
"*.{css,scss}": ["stylelint --allow-empty-input", "prettier --check"]
}
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"overrides": [
{
"files": ["*.js", "*.jsx"],
"files": ["*.js", "*.cjs", "*.jsx"],
"options": {
"parser": "flow",
"printWidth": 120,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,.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,.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",
Expand Down

0 comments on commit 06ca043

Please sign in to comment.