Use eslint-plugin-fp on warn level for a major future refactoring

This commit is contained in:
uwap 2018-09-01 13:28:51 +02:00
parent fe2383f138
commit 7a04979907
3 changed files with 59 additions and 3 deletions

View file

@ -17,7 +17,7 @@ module.exports = {
"sourceType": "module" "sourceType": "module"
}, },
"plugins": [ "plugins": [
"react", "flowtype" "react", "flowtype", "fp"
], ],
"globals": { "globals": {
"require": false "require": false
@ -140,6 +140,27 @@ module.exports = {
// flow // flow
"flowtype/no-dupe-keys": "error", "flowtype/no-dupe-keys": "error",
"flowtype/no-weak-types": "warn", "flowtype/no-weak-types": "warn",
"flowtype/require-variable-type": "off" // wait for https://github.com/gajus/eslint-plugin-flowtype/issues/198 to be resolved "flowtype/require-variable-type": "off", // wait for https://github.com/gajus/eslint-plugin-flowtype/issues/198 to be resolved
// fp
// TODO: Import fp/recommended after resolving the warnings
"fp/no-arguments": "warn",
"fp/no-class": "warn",
"fp/no-delete": "warn",
"fp/no-events": "warn",
"fp/no-get-set": "warn",
"fp/no-let": "warn",
"fp/no-loops": "warn",
"fp/no-mutating-assign": "warn",
"fp/no-mutating-methods": "warn",
"fp/no-mutation": "warn",
"fp/no-nil": "warn",
"fp/no-proxy": "warn",
"fp/no-rest-parameters": "warn",
"fp/no-this": "warn",
"fp/no-throw": "warn",
"fp/no-unused-expression": "warn",
"fp/no-valueof-field": "warn",
"no-var": "warn"
} }
}; };

View file

@ -39,6 +39,7 @@
"css-loader": "^1.0.0", "css-loader": "^1.0.0",
"eslint": "^5.0.1", "eslint": "^5.0.1",
"eslint-plugin-flowtype": "^2.42.0", "eslint-plugin-flowtype": "^2.42.0",
"eslint-plugin-fp": "^2.3.0",
"eslint-plugin-react": "^7.6.1", "eslint-plugin-react": "^7.6.1",
"file-loader": "^1.1.5", "file-loader": "^1.1.5",
"flow": "^0.2.3", "flow": "^0.2.3",

View file

@ -1747,6 +1747,12 @@ create-ecdh@^4.0.0:
bn.js "^4.1.0" bn.js "^4.1.0"
elliptic "^6.0.0" elliptic "^6.0.0"
create-eslint-index@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/create-eslint-index/-/create-eslint-index-1.0.0.tgz#d954372d86d5792fcd67e9f2b791b1ab162411bb"
dependencies:
lodash.get "^4.3.0"
create-hash@^1.1.0, create-hash@^1.1.2: create-hash@^1.1.0, create-hash@^1.1.2:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196"
@ -2225,12 +2231,28 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5" version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
eslint-ast-utils@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz#3d58ba557801cfb1c941d68131ee9f8c34bd1586"
dependencies:
lodash.get "^4.4.2"
lodash.zip "^4.2.0"
eslint-plugin-flowtype@^2.42.0: eslint-plugin-flowtype@^2.42.0:
version "2.50.0" version "2.50.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.0.tgz#953e262fa9b5d0fa76e178604892cf60dfb916da" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.0.tgz#953e262fa9b5d0fa76e178604892cf60dfb916da"
dependencies: dependencies:
lodash "^4.17.10" lodash "^4.17.10"
eslint-plugin-fp@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-fp/-/eslint-plugin-fp-2.3.0.tgz#376d2a108710e981980bdc3875e3b9920da0489c"
dependencies:
create-eslint-index "^1.0.0"
eslint-ast-utils "^1.0.0"
lodash "^4.13.1"
req-all "^0.1.0"
eslint-plugin-react@^7.6.1: eslint-plugin-react@^7.6.1:
version "7.10.0" version "7.10.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.10.0.tgz#af5c1fef31c4704db02098f9be18202993828b50" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.10.0.tgz#af5c1fef31c4704db02098f9be18202993828b50"
@ -3700,7 +3722,15 @@ lodash.debounce@^4.0.8:
version "4.0.8" version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0: lodash.get@^4.3.0, lodash.get@^4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
lodash.zip@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020"
lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0:
version "4.17.10" version "4.17.10"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
@ -4970,6 +5000,10 @@ repeating@^2.0.0:
dependencies: dependencies:
is-finite "^1.0.0" is-finite "^1.0.0"
req-all@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/req-all/-/req-all-0.1.0.tgz#130051e2ace58a02eacbfc9d448577a736a9273a"
require-directory@^2.1.1: require-directory@^2.1.1:
version "2.1.1" version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"