From b2266e174b4599d409ca3b680ec8ca0986a02ef3 Mon Sep 17 00:00:00 2001 From: MrBr Date: Fri, 20 Jan 2017 14:55:36 +0100 Subject: [PATCH] Add configuration files - Configuration files for ESLint and Editor --- .editorconfig | 31 +++++++++++++++++++++++++++++++ .eslintignore | 6 ++++++ .eslintrc | 22 ++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 .editorconfig create mode 100644 .eslintignore create mode 100644 .eslintrc diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..18c52cc8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,31 @@ +# http://editorconfig.org +root = true + +# All files +[*] +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 + +# JS files +[*{.js,.jsx}] +indent_style = space +indent_size = 2 + +# JSON files +[*.json] +indent_style = space +indent_size = 2 + +# Java files +[*.java] +indent_style = space +indent_size = 4 + +# Objective C files +[*{.h,.m,.mm}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..7576bf63 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,6 @@ +**/dist/* +**/node_modules/* +**/server.js +**/webpack.config*.js +**/test-utils/setup.js + diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..f62efb19 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,22 @@ +{ + "extends": "airbnb", + "env": { + "mocha": true + }, + "plugins": [ + "react-native" + ], + "parser": "babel-eslint", + "rules": { + "no-empty-label": 0, + "no-console": 0, + "import/no-unresolved": 0, + "global-require": 0, + "no-underscore-dangle": 0, + "space-before-keywords": 0, + "space-after-keywords": 0, + "space-return-throw-case": 0, + "react-native/no-unused-styles": 2, + "react-native/split-platform-components": 2 + } +}