From 66415d7724ce674a04864ba4d5516a03d6bf86d8 Mon Sep 17 00:00:00 2001 From: Andrey Bakhvalov Date: Mon, 22 Oct 2018 13:10:09 +0300 Subject: [PATCH] add eslint --- .eslintrc | 72 +++++++++++++++++++ package.json | 8 ++- src/Components/App/App.js | 70 +++++++++++------- src/Components/App/GlobalStyle.js | 7 +- src/Components/App/fontSize.js | 32 ++++----- src/Components/App/media.js | 10 +-- src/Components/App/viewportSize.js | 16 ++--- src/Components/Description/Description.js | 12 ++-- .../Description/DescriptionStyle.js | 5 +- src/Components/Description/index.js | 2 +- src/Components/Intro/Intro.js | 16 +++-- src/Components/Map/Filters/AvgTime.js | 2 +- .../Map/Filters/DayPicker/DayPicker.js | 5 -- src/Components/Map/Filters/Filters.js | 26 ++++--- src/Components/Map/Map.js | 48 +++++++------ src/index.js | 2 +- yarn.lock | 33 +++++++++ 17 files changed, 250 insertions(+), 116 deletions(-) create mode 100644 .eslintrc delete mode 100644 src/Components/Map/Filters/DayPicker/DayPicker.js diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..b7e19d1b --- /dev/null +++ b/.eslintrc @@ -0,0 +1,72 @@ +{ + "parser": "babel-eslint", + "extends": ["airbnb"], + "plugins": ["import", "react"], + "env": { + "browser": true, + "node": true, + "jest": true + }, + "rules": { + "arrow-parens": [ + "warn", + "as-needed", + { + "requireForBlockBody": true + } + ], + "comma-dangle": ["error", "never"], + "function-paren-newline": ["error", "consistent"], + "jsx-quotes": ["error", "prefer-single"], + "max-len": [ + "error", + { + "code": 80, + "ignoreUrls": true, + "ignoreStrings": true + } + ], + "no-return-assign": "warn", + "no-underscore-dangle": [ + "error", + { + "allowAfterThis": true, + "allow": ["_id"] + } + ], + "quotes": ["error", "single"], + "react/button-has-type": "off", + "react/destructuring-assignment": "off", + "react/prop-types": [ + 1, + { + "skipUndeclared": true + } + ], + "react/forbid-prop-types": [ + 1, + { + "forbid": ["any", "array"] + } + ], + "react/jsx-filename-extension": [ + 1, + { + "extensions": [".js", ".jsx"] + } + ], + "react/jsx-no-bind": "error", + "react/sort-comp": [ + 1, + { + "order": [ + "type-annotations", + "static-methods", + "lifecycle", + "everything-else", + "render" + ] + } + ] + } +} diff --git a/package.json b/package.json index be904e3c..ecf78970 100644 --- a/package.json +++ b/package.json @@ -9,14 +9,18 @@ "react": "16.5.2", "react-day-picker": "7.2.4", "react-dom": "16.5.2", - "react-scripts": "2.0.5", "styled-components": "4.0.2" }, + "devDependencies": { + "eslint-config-airbnb": "17.1.0", + "react-scripts": "2.0.5" + }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "lint": "eslint src" }, "eslintConfig": { "extends": "react-app" diff --git a/src/Components/App/App.js b/src/Components/App/App.js index 422161d0..50b63641 100644 --- a/src/Components/App/App.js +++ b/src/Components/App/App.js @@ -5,7 +5,7 @@ import GlobalStyle from './GlobalStyle'; import './index.css'; import octocat from './kotik.svg'; import urbica from './urbica-logo.svg'; -import arrowurbica from './arrow_urbica.svg' +import arrowurbica from './arrow_urbica.svg'; import Map from '../Map'; import Intro from '../Intro'; @@ -18,36 +18,58 @@ class App extends PureComponent { -
-
-

Turning Data into Vector Tiles

-

Martin creates Mapbox Vector Tiles from any PostGIS table or view

-
-
-

Generating Tiles with Functions

-

Martin is the only vector tile server capable of creating tiles using database functions directly

-
-
-

Filtering and Aggregating Data on the Fly

-

Martin is ideal for large datasets as it allows passing parameters from a URL into a user function to filter features and aggregate attribute values

-
+
+
+

+ Turning Data into Vector Tiles +

+

+ Martin creates Mapbox Vector Tiles from any PostGIS table or view +

+
+
+

+ Generating Tiles with Functions +

+

+ Martin is the only vector tile server capable of creating tiles + using database functions directly +

+
+
+

+ Filtering and Aggregating Data + on the Fly +

+

+ Martin is ideal for large datasets as it allows passing + parameters from a URL into a user function to filter features and + aggregate attribute values +

+
+
+
+ This is a demo of how Martin works. We used 2017 + New York City taxi trips dataset: about 114 million records and a 13GB + database. Martin uses a database function to filter the data by + selected dates, days of the week, and hours and to sum or average the + numbers by areas.
-
This is a demo of how Martin works. We used 2017 New York City taxi trips dataset: about 114 million records and a 13GB database. Martin uses a database function to filter the data by selected dates, days of the week, and hours and to sum or average the numbers by areas.
-
+
Start building with Martin!
- + View on Github - octocat + octocat
-