From d372f1117b0b6c91ae330db35111930801372d8f Mon Sep 17 00:00:00 2001 From: Mumtahin Farabi Date: Sat, 3 Aug 2024 23:56:28 -0400 Subject: [PATCH] chore(repo): add playwright eslint rules to config --- eslint.config.js | 6 ------ eslint.config.mjs | 12 ++++++++++++ tsconfig.json | 37 ++++++++++++++++++++++++++----------- 3 files changed, 38 insertions(+), 17 deletions(-) delete mode 100644 eslint.config.js create mode 100644 eslint.config.mjs diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index 109a811e..00000000 --- a/eslint.config.js +++ /dev/null @@ -1,6 +0,0 @@ -import antfu from '@antfu/eslint-config' - -export default antfu({ - formatters: true, - react: true, -}) diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..8d54bc17 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,12 @@ +import antfu from '@antfu/eslint-config' +import playwright from 'eslint-plugin-playwright' + +export default antfu( + { + formatters: true, + react: true, + }, + { + ...playwright.configs['flat/recommended'], + }, +) diff --git a/tsconfig.json b/tsconfig.json index 4f40fb9f..40a4bc32 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,24 +2,31 @@ "compilerOptions": { "incremental": true, "target": "es2022", - "jsx": "preserve", /* Bundled projects */ - "lib": ["dom", "dom.iterable", "ES2022"], + "lib": [ + "dom", + "dom.iterable", + "ES2022" + ], "moduleDetection": "force", - /* Path Aliases */ "baseUrl": ".", "module": "ESNext", "moduleResolution": "Bundler", "paths": { - "~/*": ["./src/*"], - "@/*": ["./src/*"], - "@root/*": ["./*"] + "~/*": [ + "./src/*" + ], + "@/*": [ + "./src/*" + ], + "@root/*": [ + "./*" + ] }, "resolveJsonModule": true, "allowJs": true, - "checkJs": true, /* Strictness */ "strict": true, @@ -29,7 +36,11 @@ "esModuleInterop": true, "isolatedModules": true, "skipLibCheck": true, - "plugins": [{ "name": "next" }] + "plugins": [ + { + "name": "next" + } + ] }, "include": [ ".eslintrc.cjs", @@ -40,7 +51,11 @@ "**/*.js", ".next/types/**/*.ts", "postcss.config.cjs", - "next.config.mjs" -, ".map.ts" ], - "exclude": ["node_modules"] + "next.config.mjs", + ".map.ts", + "eslint.config.mjs" + ], + "exclude": [ + "node_modules" + ] }