Skip to content

Commit 03366a6

Browse files
committed
Fix rails-ujs tests not being linted
Before rails-ujs was [updated][1] from coffeescript to es6, the lint task ran eslint on both the coffee files and the ujs test files. When it was updated to lint the new es6 files, the test files were erroneously left out. This commit fixes the task to lint the rails-ujs test files and fixes the lint errors that have been introduced since. [1]: 7d116c9
1 parent f91bd40 commit 03366a6

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

actionview/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"build": "rollup --config rollup.config.js",
1515
"pretest": "rollup --config rollup.config.test.js",
1616
"test": "karma start",
17-
"lint": "eslint app/javascript"
17+
"lint": "eslint app/javascript && eslint test/ujs/public/test"
1818
},
1919
"repository": {
2020
"type": "git",

actionview/test/ujs/public/test/call-ajax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import $ from 'jquery'
2-
import Rails from "../../../../app/javascript/rails-ujs/index"
2+
import Rails from '../../../../app/javascript/rails-ujs/index'
33

44
QUnit.module('call-ajax', {
55
beforeEach: function() {

actionview/test/ujs/public/test/data-method.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,6 @@ QUnit.test('do not interact with contenteditable elements', function(assert) {
103103

104104
var collection = document.getElementsByTagName('form')
105105
for (const item of collection) {
106-
assert.notEqual(item.action, "http://www.shouldnevershowindocument.com/")
106+
assert.notEqual(item.action, 'http://www.shouldnevershowindocument.com/')
107107
}
108108
})

actionview/test/ujs/public/test/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import $ from 'jquery';
1+
import $ from 'jquery'
22
import Rails from '../../../../app/javascript/rails-ujs/index'
33

44
$.rails = Rails

0 commit comments

Comments
 (0)