Skip to content

Commit

Permalink
chore: lint .cjs files
Browse files Browse the repository at this point in the history
- remove husky v8 remnants
- make sure .cjs files are run through eslint and prettier
  • Loading branch information
matijs committed Mar 25, 2024
1 parent 305ac3b commit c41a04e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 1 addition & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
#!/bin/sh

npx --no-install lint-staged
npx --no-install lint-staged
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,json,jsx,mdx,ts,tsx}": ["eslint --no-error-on-unmatched-pattern", "prettier --check"],
"*.{js,cjs,json,jsx,mdx,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", "*.jsx", "*.cjs"],
"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 @@ -48,13 +48,13 @@
"clean": "lerna run clean",
"lint": "npm-run-all --continue-on-error lint:** lint-workspaces",
"lint:css": "stylelint --allow-empty-input '**/*.{css,scss}'",
"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:package-lock": "pnpm ls --recursive",
"lint-fix": "npm-run-all --continue-on-error lint-fix:** prettier",
"lint-fix:css": "stylelint --fix '**/*.{css,scss}'",
"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": "lerna run --no-bail lint",
"lint-build": "lerna run --no-bail lint-build",
Expand Down

0 comments on commit c41a04e

Please sign in to comment.