diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..abf8318e --- /dev/null +++ b/.eslintrc @@ -0,0 +1,3 @@ +{ + "extends": "metarhia" +} diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index 013026c8..00000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,186 +0,0 @@ -env: - node: true - es6: true -extends: 'eslint:recommended' -plugins: - - import -rules: - indent: - - error - - 2 - - SwitchCase: 1 - VariableDeclarator: - var: 2 - let: 2 - const: 3 - MemberExpression: 1 - linebreak-style: - - error - - unix - quotes: - - error - - single - semi: - - error - - always - eqeqeq: - - error - - always - no-loop-func: - - error - strict: - - error - - global - block-spacing: - - error - - always - brace-style: - - error - - 1tbs - - allowSingleLine: true - camelcase: - - error - comma-dangle: - - error - - always-multiline - comma-style: - - error - - last - comma-spacing: - - error - - before: false - after: true - eol-last: - - error - func-call-spacing: - - error - - never - handle-callback-err: - - error - - '^.*(e|E)rr' - key-spacing: - - error - - beforeColon: false - afterColon: true - mode: minimum - keyword-spacing: - - error - - before: true - after: true - overrides: - function: - after: false - max-len: - - error - - code: 80 - ignoreUrls: true - max-nested-callbacks: - - error - - max: 5 - new-cap: - - error - - newIsCap: true - capIsNew: true - properties: true - new-parens: - - error - no-lonely-if: - - error - no-trailing-spaces: - - error - no-unneeded-ternary: - - error - no-whitespace-before-property: - - error - object-curly-spacing: - - error - - always - operator-assignment: - - error - - always - operator-linebreak: - - error - - after - semi-spacing: - - error - - before: false - after: true - space-before-blocks: - - error - - always - space-before-function-paren: - - error - - never - space-in-parens: - - error - - never - space-infix-ops: - - error - space-unary-ops: - - error - - words: true - nonwords: false - overrides: - typeof: false - no-unreachable: - - error - no-global-assign: - - error - no-self-compare: - - error - no-unmodified-loop-condition: - - error - no-constant-condition: - - error - - checkLoops: false - no-console: - - off - no-useless-concat: - - error - no-useless-escape: - - error - no-shadow-restricted-names: - - error - no-use-before-define: - - error - - functions: false - arrow-parens: - - error - - as-needed - - requireForBlockBody: true - arrow-body-style: - - error - - as-needed - arrow-spacing: - - error - no-confusing-arrow: - - error - - allowParens: true - no-useless-computed-key: - - error - no-useless-rename: - - error - no-var: - - error - object-shorthand: - - error - - always - prefer-arrow-callback: - - error - prefer-const: - - error - prefer-numeric-literals: - - error - prefer-rest-params: - - error - prefer-spread: - - error - rest-spread-spacing: - - error - - never - template-curly-spacing: - - error - - never - import/no-unresolved: - - error - - commonjs: true diff --git a/package-lock.json b/package-lock.json index 93847424..03941d55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2428,9 +2428,9 @@ } }, "eslint": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.6.0.tgz", - "integrity": "sha1-mM7UpwaoervmMgeJXQAjo44lC74=", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.6.1.tgz", + "integrity": "sha1-3cf8f9cL+TIFsLNEm7FqHp59SVA=", "dev": true, "requires": { "ajv": "5.2.2", @@ -2534,6 +2534,12 @@ } } }, + "eslint-config-metarhia": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-metarhia/-/eslint-config-metarhia-1.0.0.tgz", + "integrity": "sha512-qVcKtHNe8aRYjjb4IxF8+DuphgGnoMxih8A7U49d/DL3kbk8+iHzow480Mh9zRPhGEpvMedSPTVc2FTwon9q/A==", + "dev": true + }, "eslint-import-resolver-node": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz", @@ -4060,9 +4066,9 @@ } }, "function-bind": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", - "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "function-loop": { @@ -4450,7 +4456,7 @@ "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "dev": true, "requires": { - "function-bind": "1.1.0" + "function-bind": "1.1.1" } }, "has-ansi": { diff --git a/package.json b/package.json index 992675f6..2a0be559 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,8 @@ "babel-loader": "^7.1.2", "babel-polyfill": "^6.26.0", "babel-preset-es2015": "^6.24.1", - "eslint": "^4.6.0", + "eslint": "^4.6.1", + "eslint-config-metarhia": "^1.0.0", "eslint-plugin-import": "^2.7.0", "gitbook": "^3.2.3", "gitbook-commander": "^1.1.2",