Ajout du plugin eslint standard

pull/2093/head
Jérémy Rialland 2022-04-04 15:47:07 +02:00 committed by Jérémy Rialland
parent ea782e7b5b
commit 5b713d1371
3 changed files with 215 additions and 10 deletions

View File

@ -54,6 +54,7 @@ module.exports = {
},
extends: [
'eslint:recommended',
'standard',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:react/recommended',
@ -82,8 +83,8 @@ module.exports = {
{ multiline: { delimiter: 'none' } },
],
// Auto fixable lint error
'prefer-const': 'error',
curly: 'error',
'padding-line-between-statements': [
'error',
// Require padding line before return statement

View File

@ -40,8 +40,12 @@
"@typescript-eslint/parser": "^5.16.0",
"eslint": "^8.12.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard": "^17.0.0-1",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-mocha": "^10.0.3",
"eslint-plugin-n": "^15.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.3.0",
"prettier": "^2.6.1",

218
yarn.lock
View File

@ -5562,6 +5562,13 @@ __metadata:
languageName: node
linkType: hard
"@types/json5@npm:^0.0.29":
version: 0.0.29
resolution: "@types/json5@npm:0.0.29"
checksum: e60b153664572116dfea673c5bda7778dbff150498f44f998e34b5886d8afc47f16799280e4b6e241c0472aef1bc36add771c569c68fc5125fc2ae519a3eb9ac
languageName: node
linkType: hard
"@types/lodash@npm:^4.14.167":
version: 4.14.179
resolution: "@types/lodash@npm:4.14.179"
@ -6956,7 +6963,7 @@ __metadata:
languageName: node
linkType: hard
"array.prototype.flat@npm:^1.2.1":
"array.prototype.flat@npm:^1.2.1, array.prototype.flat@npm:^1.2.5":
version: 1.2.5
resolution: "array.prototype.flat@npm:1.2.5"
dependencies:
@ -7808,6 +7815,15 @@ __metadata:
languageName: node
linkType: hard
"builtins@npm:^4.0.0":
version: 4.1.0
resolution: "builtins@npm:4.1.0"
dependencies:
semver: ^7.0.0
checksum: 3524f5a5898c3f77a73fee2e0046e676abbb0acc18db1e495676ee07fbef1537134b0e9c4da525f4cb12ba3cd1b430a26c373d32b59b80a5c048f8ace31b595f
languageName: node
linkType: hard
"bytes@npm:3.0.0":
version: 3.0.0
resolution: "bytes@npm:3.0.0"
@ -9160,7 +9176,7 @@ __metadata:
languageName: node
linkType: hard
"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.3.3, debug@npm:^2.6.0":
"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.3.3, debug@npm:^2.6.0, debug@npm:^2.6.9":
version: 2.6.9
resolution: "debug@npm:2.6.9"
dependencies:
@ -9181,7 +9197,7 @@ __metadata:
languageName: node
linkType: hard
"debug@npm:^3.0.0, debug@npm:^3.1.0":
"debug@npm:^3.0.0, debug@npm:^3.1.0, debug@npm:^3.2.7":
version: 3.2.7
resolution: "debug@npm:3.2.7"
dependencies:
@ -10543,6 +10559,38 @@ __metadata:
languageName: node
linkType: hard
"eslint-config-standard@npm:^17.0.0-1":
version: 17.0.0-1
resolution: "eslint-config-standard@npm:17.0.0-1"
peerDependencies:
eslint: ^8.0.1
eslint-plugin-import: ^2.25.2
eslint-plugin-n: ^14.0.0
eslint-plugin-promise: ^6.0.0
checksum: a690a14c9a0aaeba63897f204e443f91c4eb084e930facda441fba72e2c28cb81167449e57695f628687e27564a2d438490d965c9568e8eab90cc48161fe1604
languageName: node
linkType: hard
"eslint-import-resolver-node@npm:^0.3.6":
version: 0.3.6
resolution: "eslint-import-resolver-node@npm:0.3.6"
dependencies:
debug: ^3.2.7
resolve: ^1.20.0
checksum: 6266733af1e112970e855a5bcc2d2058fb5ae16ad2a6d400705a86b29552b36131ffc5581b744c23d550de844206fb55e9193691619ee4dbf225c4bde526b1c8
languageName: node
linkType: hard
"eslint-module-utils@npm:^2.7.2":
version: 2.7.3
resolution: "eslint-module-utils@npm:2.7.3"
dependencies:
debug: ^3.2.7
find-up: ^2.1.0
checksum: 77048263f309167a1e6a1e1b896bfb5ddd1d3859b2e2abbd9c32c432aee13d610d46e6820b1ca81b37fba437cf423a404bc6649be64ace9148a3062d1886a678
languageName: node
linkType: hard
"eslint-plugin-cypress@npm:^2.12.1":
version: 2.12.1
resolution: "eslint-plugin-cypress@npm:2.12.1"
@ -10554,6 +10602,41 @@ __metadata:
languageName: node
linkType: hard
"eslint-plugin-es@npm:^4.1.0":
version: 4.1.0
resolution: "eslint-plugin-es@npm:4.1.0"
dependencies:
eslint-utils: ^2.0.0
regexpp: ^3.0.0
peerDependencies:
eslint: ">=4.19.1"
checksum: 26b87a216d3625612b1d3ca8653ac8a1d261046d2a973bb0eb2759070267d2bfb0509051facdeb5ae03dc8dfb51a434be23aff7309a752ca901d637da535677f
languageName: node
linkType: hard
"eslint-plugin-import@npm:^2.25.4":
version: 2.25.4
resolution: "eslint-plugin-import@npm:2.25.4"
dependencies:
array-includes: ^3.1.4
array.prototype.flat: ^1.2.5
debug: ^2.6.9
doctrine: ^2.1.0
eslint-import-resolver-node: ^0.3.6
eslint-module-utils: ^2.7.2
has: ^1.0.3
is-core-module: ^2.8.0
is-glob: ^4.0.3
minimatch: ^3.0.4
object.values: ^1.1.5
resolve: ^1.20.0
tsconfig-paths: ^3.12.0
peerDependencies:
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
checksum: 0af24f5c7c6ca692f42e3947127f0ae7dfe44f1e02740f7cbe988b510a9c52bab0065d7df04e2d953dcc88a4595a00cbdcf14018acf8cd75cfd47b72efcbb734
languageName: node
linkType: hard
"eslint-plugin-mocha@npm:^10.0.3":
version: 10.0.3
resolution: "eslint-plugin-mocha@npm:10.0.3"
@ -10566,6 +10649,33 @@ __metadata:
languageName: node
linkType: hard
"eslint-plugin-n@npm:^15.1.0":
version: 15.1.0
resolution: "eslint-plugin-n@npm:15.1.0"
dependencies:
builtins: ^4.0.0
eslint-plugin-es: ^4.1.0
eslint-utils: ^3.0.0
ignore: ^5.1.1
is-core-module: ^2.3.0
minimatch: ^3.0.4
resolve: ^1.10.1
semver: ^6.3.0
peerDependencies:
eslint: ">=7.0.0"
checksum: 6c358fe29a511756617356a50a8867ec21e7ad426e2f6a1d179edbcfb8a8ded6c28b58bb5570dd198b66cb4f395e54e31c26cd9ac74d1df62901be7bbc7af2c1
languageName: node
linkType: hard
"eslint-plugin-promise@npm:^6.0.0":
version: 6.0.0
resolution: "eslint-plugin-promise@npm:6.0.0"
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
checksum: 7e761507c51267b77e4ad710e7c8938aa4f8f69b975886034e57497a1816e9527eda364e25aac03d1b4e0df2e738ba98e49ad075d028824fcfea533a1419751c
languageName: node
linkType: hard
"eslint-plugin-react-hooks@npm:^4.3.0":
version: 4.3.0
resolution: "eslint-plugin-react-hooks@npm:4.3.0"
@ -10629,6 +10739,15 @@ __metadata:
languageName: node
linkType: hard
"eslint-utils@npm:^2.0.0":
version: 2.1.0
resolution: "eslint-utils@npm:2.1.0"
dependencies:
eslint-visitor-keys: ^1.1.0
checksum: 27500938f348da42100d9e6ad03ae29b3de19ba757ae1a7f4a087bdcf83ac60949bbb54286492ca61fac1f5f3ac8692dd21537ce6214240bf95ad0122f24d71d
languageName: node
linkType: hard
"eslint-utils@npm:^3.0.0":
version: 3.0.0
resolution: "eslint-utils@npm:3.0.0"
@ -10640,6 +10759,13 @@ __metadata:
languageName: node
linkType: hard
"eslint-visitor-keys@npm:^1.1.0":
version: 1.3.0
resolution: "eslint-visitor-keys@npm:1.3.0"
checksum: 37a19b712f42f4c9027e8ba98c2b06031c17e0c0a4c696cd429bd9ee04eb43889c446f2cd545e1ff51bef9593fcec94ecd2c2ef89129fcbbf3adadbef520376a
languageName: node
linkType: hard
"eslint-visitor-keys@npm:^2.0.0":
version: 2.1.0
resolution: "eslint-visitor-keys@npm:2.1.0"
@ -11259,6 +11385,15 @@ __metadata:
languageName: node
linkType: hard
"find-up@npm:^2.1.0":
version: 2.1.0
resolution: "find-up@npm:2.1.0"
dependencies:
locate-path: ^2.0.0
checksum: 43284fe4da09f89011f08e3c32cd38401e786b19226ea440b75386c1b12a4cb738c94969808d53a84f564ede22f732c8409e3cfc3f7fb5b5c32378ad0bbf28bd
languageName: node
linkType: hard
"find-up@npm:^3.0.0":
version: 3.0.0
resolution: "find-up@npm:3.0.0"
@ -12553,7 +12688,7 @@ __metadata:
languageName: node
linkType: hard
"ignore@npm:^5.1.4, ignore@npm:^5.1.8, ignore@npm:^5.2.0":
"ignore@npm:^5.1.1, ignore@npm:^5.1.4, ignore@npm:^5.1.8, ignore@npm:^5.2.0":
version: 5.2.0
resolution: "ignore@npm:5.2.0"
checksum: 6b1f926792d614f64c6c83da3a1f9c83f6196c2839aa41e1e32dd7b8d174cef2e329d75caabb62cb61ce9dc432f75e67d07d122a037312db7caa73166a1bdb77
@ -12868,7 +13003,7 @@ __metadata:
languageName: node
linkType: hard
"is-core-module@npm:^2.2.0, is-core-module@npm:^2.8.1":
"is-core-module@npm:^2.2.0, is-core-module@npm:^2.3.0, is-core-module@npm:^2.8.0, is-core-module@npm:^2.8.1":
version: 2.8.1
resolution: "is-core-module@npm:2.8.1"
dependencies:
@ -13946,6 +14081,16 @@ __metadata:
languageName: node
linkType: hard
"locate-path@npm:^2.0.0":
version: 2.0.0
resolution: "locate-path@npm:2.0.0"
dependencies:
p-locate: ^2.0.0
path-exists: ^3.0.0
checksum: 02d581edbbbb0fa292e28d96b7de36b5b62c2fa8b5a7e82638ebb33afa74284acf022d3b1e9ae10e3ffb7658fbc49163fcd5e76e7d1baaa7801c3e05a81da755
languageName: node
linkType: hard
"locate-path@npm:^3.0.0":
version: 3.0.0
resolution: "locate-path@npm:3.0.0"
@ -14556,6 +14701,13 @@ __metadata:
languageName: node
linkType: hard
"minimist@npm:^1.2.6":
version: 1.2.6
resolution: "minimist@npm:1.2.6"
checksum: d15428cd1e11eb14e1233bcfb88ae07ed7a147de251441d61158619dfb32c4d7e9061d09cab4825fdee18ecd6fce323228c8c47b5ba7cd20af378ca4048fb3fb
languageName: node
linkType: hard
"minipass-collect@npm:^1.0.2":
version: 1.0.2
resolution: "minipass-collect@npm:1.0.2"
@ -15358,6 +15510,15 @@ __metadata:
languageName: node
linkType: hard
"p-limit@npm:^1.1.0":
version: 1.3.0
resolution: "p-limit@npm:1.3.0"
dependencies:
p-try: ^1.0.0
checksum: 281c1c0b8c82e1ac9f81acd72a2e35d402bf572e09721ce5520164e9de07d8274451378a3470707179ad13240535558f4b277f02405ad752e08c7d5b0d54fbfd
languageName: node
linkType: hard
"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0":
version: 2.3.0
resolution: "p-limit@npm:2.3.0"
@ -15376,6 +15537,15 @@ __metadata:
languageName: node
linkType: hard
"p-locate@npm:^2.0.0":
version: 2.0.0
resolution: "p-locate@npm:2.0.0"
dependencies:
p-limit: ^1.1.0
checksum: e2dceb9b49b96d5513d90f715780f6f4972f46987dc32a0e18bc6c3fc74a1a5d73ec5f81b1398af5e58b99ea1ad03fd41e9181c01fa81b4af2833958696e3081
languageName: node
linkType: hard
"p-locate@npm:^3.0.0":
version: 3.0.0
resolution: "p-locate@npm:3.0.0"
@ -15437,6 +15607,13 @@ __metadata:
languageName: node
linkType: hard
"p-try@npm:^1.0.0":
version: 1.0.0
resolution: "p-try@npm:1.0.0"
checksum: 3b5303f77eb7722144154288bfd96f799f8ff3e2b2b39330efe38db5dd359e4fb27012464cd85cb0a76e9b7edd1b443568cb3192c22e7cffc34989df0bafd605
languageName: node
linkType: hard
"p-try@npm:^2.0.0":
version: 2.2.0
resolution: "p-try@npm:2.2.0"
@ -17083,7 +17260,7 @@ __metadata:
languageName: node
linkType: hard
"regexpp@npm:^3.2.0":
"regexpp@npm:^3.0.0, regexpp@npm:^3.2.0":
version: 3.2.0
resolution: "regexpp@npm:3.2.0"
checksum: a78dc5c7158ad9ddcfe01aa9144f46e192ddbfa7b263895a70a5c6c73edd9ce85faf7c0430e59ac38839e1734e275b9c3de5c57ee3ab6edc0e0b1bdebefccef8
@ -17347,7 +17524,7 @@ __metadata:
languageName: node
linkType: hard
"resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.3.2":
"resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.12.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.3.2":
version: 1.22.0
resolution: "resolve@npm:1.22.0"
dependencies:
@ -17377,7 +17554,7 @@ __metadata:
languageName: node
linkType: hard
"resolve@patch:resolve@^1.10.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.12.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.14.2#~builtin<compat/resolve>, resolve@patch:resolve@^1.19.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.20.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.22.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.3.2#~builtin<compat/resolve>":
"resolve@patch:resolve@^1.10.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.10.1#~builtin<compat/resolve>, resolve@patch:resolve@^1.12.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.14.2#~builtin<compat/resolve>, resolve@patch:resolve@^1.19.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.20.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.22.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.3.2#~builtin<compat/resolve>":
version: 1.22.0
resolution: "resolve@patch:resolve@npm%3A1.22.0#~builtin<compat/resolve>::version=1.22.0&hash=07638b"
dependencies:
@ -17520,8 +17697,12 @@ __metadata:
"@typescript-eslint/parser": ^5.16.0
eslint: ^8.12.0
eslint-config-prettier: ^8.5.0
eslint-config-standard: ^17.0.0-1
eslint-plugin-cypress: ^2.12.1
eslint-plugin-import: ^2.25.4
eslint-plugin-mocha: ^10.0.3
eslint-plugin-n: ^15.1.0
eslint-plugin-promise: ^6.0.0
eslint-plugin-react: ^7.29.4
eslint-plugin-react-hooks: ^4.3.0
prettier: ^2.6.1
@ -17724,7 +17905,7 @@ __metadata:
languageName: node
linkType: hard
"semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5":
"semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5":
version: 7.3.5
resolution: "semver@npm:7.3.5"
dependencies:
@ -18543,6 +18724,13 @@ __metadata:
languageName: node
linkType: hard
"strip-bom@npm:^3.0.0":
version: 3.0.0
resolution: "strip-bom@npm:3.0.0"
checksum: 8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b
languageName: node
linkType: hard
"strip-eof@npm:^1.0.0":
version: 1.0.0
resolution: "strip-eof@npm:1.0.0"
@ -19193,6 +19381,18 @@ __metadata:
languageName: node
linkType: hard
"tsconfig-paths@npm:^3.12.0":
version: 3.14.1
resolution: "tsconfig-paths@npm:3.14.1"
dependencies:
"@types/json5": ^0.0.29
json5: ^1.0.1
minimist: ^1.2.6
strip-bom: ^3.0.0
checksum: 8afa01c673ebb4782ba53d3a12df97fa837ce524f8ad38ee4e2b2fd57f5ac79abc21c574e9e9eb014d93efe7fe8214001b96233b5c6ea75bd1ea82afe17a4c6d
languageName: node
linkType: hard
"tslib@npm:2.3.1, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.2.0":
version: 2.3.1
resolution: "tslib@npm:2.3.1"