Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parserOptions": {
"ecmaVersion": 5
},
"extends": "eslint:recommended",
"env": {
"commonjs": true
},
"rules": {
"strict": [2, "global"],
"block-scoped-var": 2,
"consistent-return": 2,
"eqeqeq": [2, "smart"],
"guard-for-in": 2,
"no-caller": 2,
"no-extend-native": 2,
"no-loop-func": 2,
"no-new": 2,
"no-param-reassign": 2,
"no-return-assign": 2,
"no-unused-expressions": 2,
"no-use-before-define": 2,
"radix": [2, "always"],
"indent": [2, 2],
"quotes": [2, "double"],
"semi": [2, "always"]
}
}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/.*
!/.gitignore
!/.jscsrc
!/.jshintrc
!/.eslintrc.json
!/.travis.yml
/bower_components/
/node_modules/
Expand Down
17 changes: 0 additions & 17 deletions .jscsrc

This file was deleted.

20 changes: 0 additions & 20 deletions .jshintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
dist: trusty
sudo: required
node_js: 6
node_js: stable
env:
- PATH=$HOME/purescript:$PATH
install:
Expand Down
10 changes: 5 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"package.json"
],
"dependencies": {
"purescript-either": "^2.0.0",
"purescript-maybe": "^2.0.0",
"purescript-partial": "^1.1.2"
"purescript-either": "^3.0.0",
"purescript-maybe": "^3.0.0",
"purescript-partial": "^1.2.0"
},
"devDependencies": {
"purescript-assert": "^2.0.0",
"purescript-console": "^2.0.0"
"purescript-assert": "^3.0.0",
"purescript-console": "^3.0.0"
}
}
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
"private": true,
"scripts": {
"clean": "rimraf output && rimraf .pulp-cache",
"build": "jshint src && jscs src && pulp build --censor-lib --strict",
"build": "eslint src && pulp build -- --censor-lib --strict",
"test": "pulp test"
},
"devDependencies": {
"jscs": "^2.8.0",
"jshint": "^2.9.1",
"pulp": "^9.0.1",
"purescript-psa": "^0.3.9",
"rimraf": "^2.5.0"
"eslint": "^3.17.1",
"pulp": "^10.0.4",
"purescript-psa": "^0.5.0-rc.1",
"rimraf": "^2.6.1"
}
}
3 changes: 2 additions & 1 deletion src/Data/String.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ exports.drop = function (n) {

exports.count = function (p) {
return function (s) {
for (var i = 0; i < s.length && p(s.charAt(i)); i++); {}
var i = 0;
while (i < s.length && p(s.charAt(i))) i++;
return i;
};
};
Expand Down
2 changes: 1 addition & 1 deletion src/Data/String/Regex.purs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Data.String (Pattern(..), contains)
import Data.String.Regex.Flags (RegexFlags(..), RegexFlagsRec)

-- | Wraps Javascript `RegExp` objects.
foreign import data Regex :: *
foreign import data Regex :: Type

foreign import showRegex' :: Regex -> String

Expand Down
2 changes: 1 addition & 1 deletion test/Test/Data/Char.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Test.Data.Char (testChar) where

import Prelude (Unit, (==), ($), bind)
import Prelude (Unit, (==), ($), discard)

import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, log)
Expand Down
2 changes: 1 addition & 1 deletion test/Test/Data/String.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Test.Data.String (testString) where

import Prelude (Unit, Ordering(..), (==), ($), bind, negate, not, (/=), (&&))
import Prelude (Unit, Ordering(..), (==), ($), discard, negate, not, (/=), (&&))

import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, log)
Expand Down
2 changes: 1 addition & 1 deletion test/Test/Data/String/CaseInsensitive.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Test.Data.String.CaseInsensitive (testCaseInsensitiveString) where

import Prelude (Unit, (==), ($), bind, compare, Ordering(..))
import Prelude (Unit, (==), ($), discard, compare, Ordering(..))

import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, log)
Expand Down
2 changes: 1 addition & 1 deletion test/Test/Data/String/Regex.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Test.Data.String.Regex (testStringRegex) where

import Prelude (Unit, ($), (<>), bind, (==), not)
import Prelude (Unit, ($), (<>), discard, (==), not)

import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, log)
Expand Down
2 changes: 1 addition & 1 deletion test/Test/Data/String/Unsafe.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Test.Data.String.Unsafe (testStringUnsafe) where

import Prelude (Unit, (==), ($), bind)
import Prelude (Unit, (==), ($), discard)

import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, log)
Expand Down