From cd2968eefcb342c4be864b6611c24a899a0e9fce Mon Sep 17 00:00:00 2001 From: mat1th Date: Tue, 23 May 2017 16:01:48 +0200 Subject: [PATCH] add some linter and a bable files; --- .babelrc | 11 +++++++++++ .editorconfig | 14 ++++++++++++++ .eslintrc | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ .sass-lint.yml | 46 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 3 ++- 5 files changed, 124 insertions(+), 1 deletion(-) create mode 100755 .babelrc create mode 100755 .editorconfig create mode 100644 .eslintrc create mode 100644 .sass-lint.yml diff --git a/.babelrc b/.babelrc new file mode 100755 index 0000000..6a3f4fc --- /dev/null +++ b/.babelrc @@ -0,0 +1,11 @@ +{ + "presets": [ + "react", + "es2015", + "stage-2" + ], + "plugins": [ + "transform-class-properties", + "transform-es2015-modules-commonjs" + ] +} diff --git a/.editorconfig b/.editorconfig new file mode 100755 index 0000000..3b9cce8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = false + +[*.md] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..2275aa3 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,51 @@ +{ + "rules": { + "linebreak-style": [2, "unix"], + "eol-last": 1, + "quotes": [1, "single", "avoid-escape"], + "semi": [2, "always"], + "camelcase": [2, { + "properties": "never" + }], + "brace-style": [1, "1tbs", { + "allowSingleLine": true + }], + "no-nested-ternary": 1, + "no-unused-vars": [2, { + "argsIgnorePattern": "event" + }], + "no-console": 0, + "max-depth": [2, 4], + "dot-notation": 1, + "eqeqeq": 2, + "no-implied-eval": 2, + "no-loop-func": 1, + "radix": 2, + "no-magic-numbers": [1, { + "ignore": [0, 1, 2, -1, 10] + }], + "complexity": [2, 10], + "yoda": [2, "never"] + }, + "env": { + "browser": true, + "node": true, + "es6": true, + "webextensions": true + }, + "globals": { + "config": true, + "import": true, + "Promise": true, + "React": true, + "moment": true + }, + "parserOptions": { + "sourceType": "module" + }, + "extends": "eslint:recommended", + "ecmaFeatures": { + "jsx": true, + "modules": true + } +} diff --git a/.sass-lint.yml b/.sass-lint.yml new file mode 100644 index 0000000..17509a5 --- /dev/null +++ b/.sass-lint.yml @@ -0,0 +1,46 @@ +severity: error + +linters: + + BorderZero: + enabled: true + convention: zero + + BemDepth: + enabled: true + + DeclarationOrder: + enabled: false + + ExtendDirective: + enabled: true + + LeadingZero: + enabled: false + + NameFormat: + enabled: true + + PrivateNamingConvention: + enabled: true + prefix: _ + + PropertySortOrder: + enabled: false + + QualifyingElement: + enabled: false + + SelectorFormat: + enabled: true + convention: hyphenated_BEM + class_convention: ^(?!js-).* + class_convention_explanation: should not be written in the form js-* + + SingleLinePerProperty: + enabled: true + allow_single_line_rule_sets: false + + StringQuotes: + enabled: true + style: single_quotes diff --git a/package.json b/package.json index 74b6873..254896b 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "bowser": "^1.6.0", "react": "^15.5.4", "react-anime": "^0.3.4", - "react-dom": "^15.5.4" + "react-dom": "^15.5.4", + "scroll-to": "0.0.2" } }