Skip to content

Commit

Permalink
Convert coffeescript to javascript (cypress-io#1203)
Browse files Browse the repository at this point in the history
* Convert coffeescript to javascript

* remove coffee-script dep

* remove return statement

* Include cypress linter into tests + exclude from docs md files

* do not ignore files in cypress/support

* add missing repo.js (git was confused from gitignore)

* Fix broken if/else conversion from coffee -> js
  • Loading branch information
jennifer-shehane authored Dec 12, 2018
1 parent b4557ca commit f834460
Show file tree
Hide file tree
Showing 33 changed files with 1,372 additions and 1,090 deletions.
10 changes: 8 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"plugins": [
"cypress"
],
"extends": [
"plugin:cypress-dev/general"
"plugin:cypress-dev/general",
"plugin:cypress/recommended"
],
"env": {
"node": true
"es6": true,
"node": true,
"cypress/globals": true
}
}
32 changes: 17 additions & 15 deletions .eslintrc-textlint
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
"parserOptions": {
"ecmaVersion": 6
},
"rules": {
"comma-dangle": "off",
"indent": ["error", 2, { "MemberExpression": "off"}],
"no-console": "off",
"no-debugger": "off",
"no-empty": "off",
"no-multi-spaces": "off",
"no-undef": "off",
"no-unused-vars": "off",
"object-shorthand": "off",
"prefer-template": "off",
"quotes": ["error", "single"],
"semi": ["error", "never"],
"space-before-function-paren": "off"
}
"rules": {
"comma-dangle": "off",
"indent": ["error", 2, { "MemberExpression": "off"}],
"no-console": "off",
"no-debugger": "off",
"no-empty": "off",
"no-multi-spaces": "off",
"no-undef": "off",
"no-unused-vars": "off",
"object-shorthand": "off",
"prefer-template": "off",
"quotes": ["error", "single"],
"semi": ["error", "never"],
"space-before-function-paren": "off",
"cypress/no-assigning-return-values": "off",
"cypress/no-unnecessary-waiting": "off"
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public/
.DS_Store
.deploy*/
support
!cypress/support
.idea/

themes/cypress/source/css/vendor/
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"standard.enable": false,
"eslint.enable": true
}
10 changes: 0 additions & 10 deletions __snapshots__/helpers_spec.coffee.js

This file was deleted.

10 changes: 10 additions & 0 deletions __snapshots__/helpers_spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
exports['lib/helpers cheerio wraps document in html tag 1'] = '<html><head></head><body><p>foo</p></body></html>'

exports['lib/helpers cheerio does not wrap fragment in html tag 1'] = '<p>foo</p>'

exports['lib/helpers addPageAnchors is noop if no headings found 1'] = '<p>foo</p>'

exports['lib/helpers addPageAnchors does not wrap with <html> 1'] = '<h1 id="bar" class="article-heading">foo<a class="article-anchor" href="#bar" aria-hidden="true"></a></h1>'

exports['lib/helpers addPageAnchors does not wrap fragment in html tag 1'] = '<p>foo</p>'

File renamed without changes.
153 changes: 0 additions & 153 deletions cypress/integration/api_spec.coffee

This file was deleted.

Loading

0 comments on commit f834460

Please sign in to comment.