Skip to content

Commit

Permalink
Fix "keyword 'const' is reserved" lint error
Browse files Browse the repository at this point in the history
```
/rails/actionview/test/ujs/public/test/data-method.js
  99:8  error  Parsing error: The keyword 'const' is reserved
```

This does not show up on main because the [conversion][1] of rails-ujs
to es6 accidentally stopped linting tests. The `parserOptions`
configuration aligns this branch's eslint configuration with
actionview/.eslintrc on main.

[1]: 7d116c9

Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
  • Loading branch information
skipkayhil and jonathanhefner committed Mar 17, 2023
1 parent 3a931c2 commit 76e2677
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions actionview/test/ujs/public/test/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ rules:
comma-spacing: 'error'
comma-dangle: 'off'
eol-last: 'error'
parserOptions:
ecmaVersion: 6
2 changes: 1 addition & 1 deletion actionview/test/ujs/public/test/data-method.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ asyncTest('do not interact with contenteditable elements', 6, function() {

collection = document.getElementsByTagName('form')
for (const item of collection) {
notEqual(item.action, "http://www.shouldnevershowindocument.com/")
notEqual(item.action, 'http://www.shouldnevershowindocument.com/')
}
})

Expand Down

0 comments on commit 76e2677

Please sign in to comment.