Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/components/SurahInfo/htmls/*
78 changes: 46 additions & 32 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,40 +1,54 @@
{
"parser": "babel-eslint",
"extends": "airbnb",
"env": {
"es6": true,
"node": true,
"browser": true,
"jquery": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"octalLiterals": true,
"regexUFlag": true,
"regexYFlag": true,
"spread": true,
"superInFunctions": true,
"templateStrings": true,
"unicodeCodePointEscapes": true,
"globalReturn": true,
"jsx": false
"node": true,
"mocha": true,
"es6": true
},
"rules": {
"strict": 0,
"indent": [2, 2],
"quotes": [2, "single"],
"no-unused-vars": 0
"react/no-multi-comp": 0,
"import/default": 0,
"import/no-duplicates": 0,
"import/named": 0,
"import/namespace": 0,
"import/no-unresolved": 0,
"import/no-named-as-default": 2,
// Temporarirly disabled due to a possible bug in babel-eslint (todomvc example)
"block-scoped-var": 0,
// Temporarily disabled for test/* until babel/babel-eslint#33 is resolved
"padded-blocks": 0,
"comma-dangle": 0, // not sure why airbnb turned this on. gross!
"indent": [2, 2, {"SwitchCase": 1}],
"no-console": 0,
"no-alert": 0,
"object-curly-spacing": 0,
"no-case-declarations": 0
},
"plugins": [
"react", "import"
],
"settings": {
"import/parser": "babel-eslint",
"import/resolve": {
moduleDirectory: ["node_modules", "src"]
}
},
"parserOptions":{
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
},
"plugins": ["react"]
"globals": {
"__DEVELOPMENT__": true,
"__CLIENT__": true,
"__SERVER__": true,
"__DISABLE_SSR__": true,
"__DEVTOOLS__": true,
"socket": true,
"webpackIsomorphicTools": true,
ga: true,
Raven: true
}
}
15 changes: 8 additions & 7 deletions client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*global document, window, $ */
/* global document, window, $ */
import 'babel-polyfill';

import React from 'react';
Expand All @@ -21,15 +21,15 @@ import createStore from './src/redux/create';
import routes from './src/routes';

const client = new ApiClient();
const store = createStore(browserHistory, client, window.__data);
const store = createStore(browserHistory, client, window.reduxData);
const history = syncHistoryWithStore(browserHistory, store);

Raven.config(config.sentryClient).install()
Raven.config(config.sentryClient).install();

window.quranDebug = debug;
window.ReactDOM = ReactDOM; // For chrome dev tool support

window.clearCookies = function() {
window.clearCookies = () => {
reactCookie.remove('quran');
reactCookie.remove('content');
reactCookie.remove('audio');
Expand All @@ -38,7 +38,7 @@ window.clearCookies = function() {

// Init tooltip
if (typeof window !== 'undefined') {
$(function () {
$(() => {
$(document.body).tooltip({
selector: '[data-toggle="tooltip"]',
animation: false
Expand Down Expand Up @@ -69,6 +69,7 @@ match({ history, routes: routes() }, (error, redirectLocation, renderProps) => {
<Provider store={store} key="provider">
{component}
</Provider>, mountNode, () => {
debug('client', 'React Rendered');
});
debug('client', 'React Rendered');
}
);
});
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "quran",
"version": "0.0.0",
"version": "1.0.0",
"private": true,
"scripts": {
"test": "./node_modules/karma/bin/karma start",
"test:ci:unit": "./node_modules/karma/bin/karma start --browsers PhantomJS --single-run",
"test:ci:unit": "./node_modules/karma/bin/karma start --browsers PhantomJS --single-run; npm run test:ci:lint",
"test:ci:functional": "node ./nightwatch.js -c ./nightwatch.json -e production",
"test:ci:lint": "eslint ./src/scripts/**/*.js",
"test:ci:lint": "eslint ./src/**/*.js",
"test:dev:unit": "./node_modules/karma/bin/karma start",
"test:dev:functional": "node ./nightwatch.js -c ./nightwatch.json",
"test:dev:lint": "eslint ./src/scripts/**/*.js",
Expand Down Expand Up @@ -117,9 +117,12 @@
"chromedriver": "^2.19.0",
"del": "^2.0.2",
"enzyme": "^2.2.0",
"eslint": "^1.4.1",
"eslint-loader": "^1.0.0",
"eslint-plugin-react": "^3.3.2",
"eslint": "^2.13.0",
"eslint-config-airbnb": "^9.0.1",
"eslint-loader": "^1.3.0",
"eslint-plugin-import": "^1.8.1",
"eslint-plugin-jsx-a11y": "^1.5.3",
"eslint-plugin-react": "^5.2.2",
"jscs": "^2.1.1",
"karma": "^0.13.9",
"karma-chai": "^0.1.0",
Expand Down
Loading