Skip to content

Commit c41a04e

Browse files
committed
chore: lint .cjs files
- remove husky v8 remnants - make sure .cjs files are run through eslint and prettier
1 parent 305ac3b commit c41a04e

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

.husky/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.husky/pre-commit

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
#!/bin/sh
2-
3-
npx --no-install lint-staged
1+
npx --no-install lint-staged

.lintstagedrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"composer.json": "composer validate",
33
"package.json": "npmPkgJsonLint --allowEmptyTargets",
44
"*.md": ["markdownlint", "prettier --check"],
5-
"*.{js,json,jsx,mdx,ts,tsx}": ["eslint --no-error-on-unmatched-pattern", "prettier --check"],
5+
"*.{js,cjs,json,jsx,mdx,ts,tsx}": ["eslint --no-error-on-unmatched-pattern", "prettier --check"],
66
"*.{css,scss}": ["stylelint --allow-empty-input", "prettier --check"]
77
}

.prettierrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"overrides": [
33
{
4-
"files": ["*.js", "*.jsx"],
4+
"files": ["*.js", "*.jsx", "*.cjs"],
55
"options": {
66
"parser": "flow",
77
"printWidth": 120,

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@
4848
"clean": "lerna run clean",
4949
"lint": "npm-run-all --continue-on-error lint:** lint-workspaces",
5050
"lint:css": "stylelint --allow-empty-input '**/*.{css,scss}'",
51-
"lint:js": "eslint --ext '.js,.json,.jsx,.mdx,.ts,.tsx' --report-unused-disable-directives .",
51+
"lint:js": "eslint --ext .js,.cjs,.json,.jsx,.mdx,.ts,.tsx --report-unused-disable-directives .",
5252
"lint:md": "markdownlint '**/*.md'",
5353
"lint:package-json": "npmPkgJsonLint '**/package.json'",
5454
"lint:package-lock": "pnpm ls --recursive",
5555
"lint-fix": "npm-run-all --continue-on-error lint-fix:** prettier",
5656
"lint-fix:css": "stylelint --fix '**/*.{css,scss}'",
57-
"lint-fix:js": "eslint --ext '.js,.json,.jsx,.mdx,.ts,.tsx' --fix --report-unused-disable-directives .",
57+
"lint-fix:js": "eslint --ext .js,.cjs,.json,.jsx,.mdx,.ts,.tsx --fix --report-unused-disable-directives .",
5858
"lint-fix:md": "markdownlint --fix '**/*.md'",
5959
"lint-workspaces": "lerna run --no-bail lint",
6060
"lint-build": "lerna run --no-bail lint-build",

0 commit comments

Comments
 (0)