Skip to content

Commit

Permalink
feat(eslint): support .cjs extensions (#1034)
Browse files Browse the repository at this point in the history
The `.cjs` extension is for CommonJS modules. See <https://nodejs.org/api/esm.html>.
  • Loading branch information
ybiquitous authored Aug 15, 2021
1 parent 0e43b45 commit f6bd459
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"prepare": "husky install"
},
"lint-staged": {
"*.{js,jsx,mjs,ts,tsx}": "eslint --cache --fix",
"*.{js,jsx,cjs,mjs,ts,tsx}": "eslint --cache --fix",
"!(*.snap)": "prettier --write",
"!(CHANGELOG).md": "remark --frail"
},
Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/init.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Object {
"!(*.snap)": "prettier --write",
"!(CHANGELOG).md": "remark --frail",
"*.css": "xyz",
"*.{js,jsx,mjs,ts,tsx}": "eslint --cache --fix",
"*.{js,jsx,cjs,mjs,ts,tsx}": "eslint --cache --fix",
},
"remarkConfig": Object {
"plugins": Array [
Expand Down Expand Up @@ -96,7 +96,7 @@ Object {
"lint-staged": Object {
"!(*.snap)": "prettier --write",
"!(CHANGELOG).md": "remark --frail",
"*.{js,jsx,mjs,ts,tsx}": "eslint --cache --fix",
"*.{js,jsx,cjs,mjs,ts,tsx}": "eslint --cache --fix",
},
"remarkConfig": Object {
"plugins": Array [
Expand Down

0 comments on commit f6bd459

Please sign in to comment.