Skip to content
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

Feature/add lint and tests #59

Merged
merged 7 commits into from Feb 15, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintignore
@@ -0,0 +1,3 @@
node_modules
lib
examples
21 changes: 21 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,21 @@
module.exports = {
"globals": {
"jest": false,
"describe": false,
"it": false,
"expect": false
},
"extends": "airbnb",
"plugins": [
"react",
"jsx-a11y",
"import"
],
"rules": {
"react/prefer-es6-class": "off",
"react/jsx-filename-extension": "off",
"react/jsx-boolean-value": "off",
"no-mixed-operators": "off",
"no-unused-expressions": ["error", {"allowShortCircuit": true}]
}
};
22 changes: 20 additions & 2 deletions package.json
Expand Up @@ -4,10 +4,18 @@
"description": "Swipe bindings for react",
"main": "lib/Swipeable.js",
"scripts": {
"build:lib": "babel src --out-dir lib",
"test": "jest && npm run lint",
"lint": "eslint .",
"build:lib": "babel src --out-dir lib --ignore __tests__ --no-comments",
"build:publish:examples": "./scripts/build_gh_pages.sh",
"prepublish": "npm run build:lib"
},
"jest": {
"testPathIgnorePatterns": [
"/node_modules/",
"/__tests__/helpers/"
]
},
"keywords": [
"swipe",
"flick",
Expand All @@ -31,10 +39,20 @@
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.3.17",
"babel-jest": "^18.0.0",
"babel-plugin-transform-object-rest-spread": "^6.3.13",
"babel-preset-es2015-loose": "^6.1.4",
"babel-preset-react": "^6.3.13",
"react": ">=0.12.x"
"enzyme": "^2.7.0",
"eslint": "^3.12.2",
"eslint-config-airbnb": "^13.0.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.8.0",
"jest": "^18.1.0",
"react": ">=0.12.x",
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2"
},
"peerDependencies": {
"react": ">=0.12.0 || ^15.0.0-0"
Expand Down