From 2582162cea2b3a59cd21c78f8b73cb03d0acad40 Mon Sep 17 00:00:00 2001 From: Pauline Date: Sat, 14 Oct 2023 22:27:27 -0400 Subject: refactor(trunk): refactor the entire project idk --- packages/config/eslint/web.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 packages/config/eslint/web.js (limited to 'packages/config/eslint/web.js') diff --git a/packages/config/eslint/web.js b/packages/config/eslint/web.js new file mode 100644 index 0000000..dc010b3 --- /dev/null +++ b/packages/config/eslint/web.js @@ -0,0 +1,22 @@ +/** @type {import('eslint').ESLint.ConfigData} */ +module.exports = { + extends: [require.resolve('./base.js'), require.resolve('./tailwind.js')], + ignorePatterns: ['public', 'vite.config.ts'], + env: { + browser: true, + node: true + }, + rules: { + 'no-restricted-syntax': [ + 'error', + { + selector: "CallExpression[callee.name='useParams']", + message: 'useParams is illegal, use useZodRouteParams!' + }, + { + selector: "CallExpression[callee.name='useSearchParams']", + message: 'useSearchParams is illegal, use useZodSearchParams!' + } + ] + } +}; -- cgit