From 9157cbe8162c74321d3d708f3ae8d2ceb67aa9ad Mon Sep 17 00:00:00 2001 From: Bartosz Dotryw Date: Sun, 21 Nov 2021 15:14:09 +0100 Subject: [PATCH] naming-convention: allow react na hooks names --- eslint-config-base.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/eslint-config-base.js b/eslint-config-base.js index 9d7e0c9..a2442ee 100644 --- a/eslint-config-base.js +++ b/eslint-config-base.js @@ -72,11 +72,23 @@ module.exports = { 'modifiers': ['const', 'global'], 'format': ['camelCase', 'UPPER_CASE'] }, + { + 'selector': 'variable', + 'modifiers': ['const', 'global', 'exported'], + 'type': 'function', + 'format': ['camelCase', 'UPPER_CASE', 'PascalCase'] + }, { 'selector': 'function', 'modifiers': ['global'], 'format': ['camelCase', 'PascalCase'] }, + { + 'selector': 'function', + 'modifiers': ['const', 'global'], + 'filter': /^use/, + 'format': ['camelCase'] + }, { 'selector': 'parameter', 'modifiers': ['unused'],