Skip to content

Commit

Permalink
Ensure that .cjs files are checked by ESLint and Overcommit (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrictson authored Nov 16, 2023
1 parent 1039cfc commit 6b5e5da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nextgen/generators/eslint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
dev: true
)
add_package_json_scripts(
"lint:js": "eslint 'app/{components,frontend,javascript}/**/*.{js,jsx,ts,tsx}'",
"lint:js": "eslint 'app/{assets,components,frontend,javascript}/**/*.{cjs,js,jsx,ts,tsx}'",
"fix:js": "npm run -- lint:js --fix",
lint: "npm-run-all lint:**",
fix: "npm-run-all fix:**"
Expand Down
4 changes: 4 additions & 0 deletions template/.overcommit.yml.tt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ PreCommit:
required_executable: npx
command: ["npx", "--no-install", "eslint", "-f", "compact"]
include:
- app/assets/**/*.cjs
- app/components/**/*.cjs
- app/frontend/**/*.cjs
- app/javascript/**/*.cjs
- app/assets/**/*.js
- app/assets/**/*.jsx
- app/components/**/*.js
Expand Down

0 comments on commit 6b5e5da

Please sign in to comment.