-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[linting] Use eslint to lint code. + minor refactoring + Travis CI setup #1020
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
2fa2742
[lint] use eslint + standard rules to lint marked.js
Feder1co5oave 15bcca6
[lint] edit eslint rules to fit marked.js current code style
Feder1co5oave b2edbd6
[lint] refactor replace() with an OOP approach. ESlint is happier.
Feder1co5oave 7e1836f
[lint] add parens to empty constructor calls
Feder1co5oave 6f8922e
[lint] add eslint indent rule
Feder1co5oave 1a19028
[lint] fix whitespace
Feder1co5oave d9c471e
[lint] fix var declarations
Feder1co5oave 565b4a0
[lint] make the outer function a recognizable IIFE
Feder1co5oave 3bbcc88
[lint] fix already declared/unused variables
Feder1co5oave d79bbb6
[lint] add amd environment to eslint to declare `define` global
Feder1co5oave e5527fb
[lint] auto-fix code style with `npm run lint`
Feder1co5oave 560c5cb
Merge branch 'master' into lint
Feder1co5oave 08e0873
add peer dependencies
UziTech 05e770d
reformat text runner
UziTech 2ab2baf
build minified file
UziTech d73174d
set showdown version to *
UziTech 5c45ad6
use local copy of gulp to minify
Feder1co5oave 6d2369d
revert, local modules are put in PATH by npm automatically
Feder1co5oave 1bfed03
automatically lint test/index.js too
Feder1co5oave d4db0b2
[lint] remove unused variable
Feder1co5oave c345a82
lint es5 code only
Feder1co5oave a4644bf
[ci] update node versions in travis.yml
Feder1co5oave 555d851
[ci] replace octal literal and don't lint on node 0.10 in travis
Feder1co5oave df01551
[ci] cache npm packages on travis
Feder1co5oave 3b4e724
Merge remote-tracking branch 'marked/master' into lint
Feder1co5oave 2e2f547
require node>=0.10 in package.json
Feder1co5oave 9fd5192
fix test in browser. Remember to fix() beforehand.
Feder1co5oave d303e16
[lint] lint test/browser/index.js
Feder1co5oave ad6484b
!fixup 565b4a0e5b
Feder1co5oave 55ab987
Merge branch 'master' into lint
Feder1co5oave dfe3d1d
[ci] add latest node stable to travis
Feder1co5oave File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"extends": "standard", | ||
"plugins": [ | ||
"standard" | ||
], | ||
"parserOptions": { "ecmaVersion": 5 }, | ||
"rules": { | ||
"semi": "off", | ||
"indent": ["warn", 2, { | ||
"VariableDeclarator": { "var": 2 }, | ||
"SwitchCase": 1, | ||
"outerIIFEBody": 0 | ||
}], | ||
"space-before-function-paren": "off", | ||
"operator-linebreak": ["error", "before", { "overrides": { "=": "after" } }], | ||
"no-cond-assign": "off", | ||
"no-useless-escape": "off", | ||
"no-return-assign": "off", | ||
"one-var": "off", | ||
"no-control-regex": "off" | ||
}, | ||
"env": { | ||
"node": true, | ||
"browser": true, | ||
"amd": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
- "0.8" | ||
- "0.6" | ||
- "4" | ||
- "lts/*" | ||
- "node" | ||
script: | | ||
if [ `node --version | cut -d . -f 1,2` = "v0.10" ]; then | ||
sed -i s/0o755/0755/ test/index.js; | ||
npm test; | ||
else | ||
npm run lint && npm test; | ||
fi | ||
cache: | ||
directories: | ||
- node_modules |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably add
node
to the versions to get the latest stable version (Node 9.x right now)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added. I wanna leave the lts in there too since it is required by the selenium-webdriver which is something I'm working with to do cross-browser tests on Browserstack 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya the minimum I always test is
lts/*
andnode