mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
[Tests] lint our markdown
This commit is contained in:
@@ -9,11 +9,11 @@ before_install:
|
||||
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
|
||||
- 'if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
|
||||
install:
|
||||
- 'cd "packages/${PACKAGE}"'
|
||||
- 'if [ -n "${PACKAGE-}" ]; then cd "packages/${PACKAGE}"; fi'
|
||||
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
|
||||
- 'if [ -n "${ESLINT}" ]; then npm install --no-save "eslint@${ESLINT}"; fi'
|
||||
script:
|
||||
- 'if [ -n "${PREPUBLISH-}" ]; then npm run pretravis && npm run prepublish && npm run posttravis; else npm run travis; fi'
|
||||
- 'if [ -n "${PREPUBLISH-}" ]; then npm run pretravis && npm run prepublish && npm run posttravis; elif [ -n "${LINT-}" ]; then npm run lint; else npm run travis; fi'
|
||||
sudo: false
|
||||
env:
|
||||
matrix:
|
||||
@@ -26,6 +26,8 @@ matrix:
|
||||
env: PREPUBLISH=true ESLINT=4 PACKAGE=eslint-config-airbnb
|
||||
- node_js: "node"
|
||||
env: PREPUBLISH=true ESLINT=4 PACKAGE=eslint-config-airbnb-base
|
||||
- node_js: "node"
|
||||
env: LINT=true
|
||||
allow_failures:
|
||||
- node_js: "7"
|
||||
- node_js: "5"
|
||||
|
||||
@@ -3169,7 +3169,7 @@ Other Style Guides
|
||||
eslint: [`no-restricted-globals`](http://eslint.org/docs/rules/no-restricted-globals)
|
||||
|
||||
> Why? The global `isNaN` coerces non-numbers to numbers, returning true for anything that coerces to NaN.
|
||||
If this behavior is desired, make it explicit.
|
||||
> If this behavior is desired, make it explicit.
|
||||
|
||||
```javascript
|
||||
// bad
|
||||
@@ -3186,7 +3186,7 @@ Other Style Guides
|
||||
eslint: [`no-restricted-globals`](http://eslint.org/docs/rules/no-restricted-globals)
|
||||
|
||||
> Why? The global `isFinite` coerces non-numbers to numbers, returning true for anything that coerces to a finite number.
|
||||
If this behavior is desired, make it explicit.
|
||||
> If this behavior is desired, make it explicit.
|
||||
|
||||
```javascript
|
||||
// bad
|
||||
|
||||
Reference in New Issue
Block a user