Skip to content

Commit

Permalink
Ignore unmatched files
Browse files Browse the repository at this point in the history
New Rails apps don't ship with any JavaScript
  • Loading branch information
stevepolitodesign committed Dec 11, 2023
1 parent 520834a commit c888832
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/generators/suspenders/lint_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def update_package_json
json["scripts"] ||= {}

json["scripts"]["lint"] = "run-p lint:eslint lint:stylelint lint:prettier"
json["scripts"]["lint:eslint"] = "eslint --max-warnings=0 'app/javascript/**/*.js'"
json["scripts"]["lint:eslint"] = "eslint --max-warnings=0 --no-error-on-unmatched-pattern 'app/javascript/**/*.js'"
json["scripts"]["lint:stylelint"] = "stylelint 'app/assets/stylesheets/**/*.css'"
json["scripts"]["lint:prettier"] = "prettier --check '**/*' --ignore-unknown"
json["scripts"]["fix:prettier"] = "prettier --write '**/*' --ignore-unknown"
Expand Down
2 changes: 1 addition & 1 deletion test/generators/suspenders/lint_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def expected_package_json
{
"scripts": {
"lint": "run-p lint:eslint lint:stylelint lint:prettier",
"lint:eslint": "eslint --max-warnings=0 'app/javascript/**/*.js'",
"lint:eslint": "eslint --max-warnings=0 --no-error-on-unmatched-pattern 'app/javascript/**/*.js'",
"lint:stylelint": "stylelint 'app/assets/stylesheets/**/*.css'",
"lint:prettier": "prettier --check '**/*' --ignore-unknown",
"fix:prettier": "prettier --write '**/*' --ignore-unknown"
Expand Down

0 comments on commit c888832

Please sign in to comment.