Skip to content

Commit

Permalink
Add extra JS file extensions to prettier and eslint commands
Browse files Browse the repository at this point in the history
  • Loading branch information
i-like-robots committed Jan 9, 2024
1 parent 106813d commit 4428fab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
'**/*.{ts,tsx,js,jsx}': ['prettier --write', 'eslint --fix'],
'**/*.{json}': ['prettier --write'],
'**/*.{ts,tsx,js,cjs,mjs,jsx}': ['prettier --write', 'eslint --fix'],
'**/*.{json,yml}': ['prettier --write'],
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"exports": "./lib/snappy-snaps.js",
"types": "./lib/snappy-snaps.d.ts",
"scripts": {
"lint": "eslint . --ext js,jsx",
"format": "prettier --write '**/*.{ts,tsx,js,jsx,json,yml}'",
"lint": "eslint . --ext js,cjs,mjs,jsx",
"format": "prettier --write '**/*.{ts,tsx,js,cjs,mjs,jsx,json,yml}'",
"spec": "node --test --test-reporter spec",
"verify": "npm run lint && npm run format",
"test": "npm run verify && npm run spec",
Expand Down

0 comments on commit 4428fab

Please sign in to comment.