diff --git a/.eslintrc-webapp.json b/.eslintrc-webapp.json index 76196dfa..221956be 100644 --- a/.eslintrc-webapp.json +++ b/.eslintrc-webapp.json @@ -13,7 +13,8 @@ "parser": "babel-eslint", "plugins": [ "react", - "import" + "import", + "header" ], "env": { "browser": true, @@ -64,6 +65,7 @@ "generator-star-spacing": [2, {"before": false, "after": true}], "global-require": 2, "guard-for-in": 2, + "header/header": [2, "line", " Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n See LICENSE.txt for license information."], "id-blacklist": 0, "import/no-unresolved": 2, "import/order": ["error", {"newlines-between": "always-and-inside-groups", "groups": ["builtin", "external", ["internal", "parent"], "sibling", "index"]}], @@ -75,7 +77,6 @@ "linebreak-style": 2, "lines-around-comment": [2, { "beforeBlockComment": true, "beforeLineComment": true, "allowBlockStart": true, "allowBlockEnd": true }], "max-lines": [1, {"max": 450, "skipBlankLines": true, "skipComments": false}], - "max-nested-callbacks": [1, {"max":1}], "max-nested-callbacks": [2, {"max":2}], "max-statements-per-line": [2, {"max": 1}], "multiline-ternary": [1, "never"], @@ -251,7 +252,7 @@ "react/no-unused-prop-types": [1, {"skipShapeProps": true}], "react/prefer-es6-class": 2, "react/prefer-stateless-function": 0, - "react/prop-types": [2, { "ignore": ["match", "location", "history", "component"] }], + "react/prop-types": [2, { "ignore": ["location", "history", "component"] }], "react/require-default-props": 0, "react/require-optimization": 1, "react/require-render-return": 2, diff --git a/package.json b/package.json index 271a3ea0..216acefe 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "electron-builder-squirrel-windows": "~20.14.0", "electron-connect": "^0.6.3", "eslint": "^4.19.1", + "eslint-plugin-header": "^1.2.0", "eslint-plugin-import": "^2.12.0", "eslint-plugin-react": "^7.8.2", "file-loader": "^1.1.6", diff --git a/yarn.lock b/yarn.lock index 6038de8a..020723d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3964,6 +3964,10 @@ eslint-module-utils@^2.2.0: debug "^2.6.8" pkg-dir "^1.0.0" +eslint-plugin-header@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-header/-/eslint-plugin-header-1.2.0.tgz#f704779c6fbc7c668f180d835de1f462b0467c37" + eslint-plugin-import@^2.12.0: version "2.12.0" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.12.0.tgz#dad31781292d6664b25317fd049d2e2b2f02205d"