From f2c5bf033914f313c59dc550d350594b8125e2a1 Mon Sep 17 00:00:00 2001 From: Amir Szekely Date: Sat, 13 Jan 2024 15:12:01 -0500 Subject: [PATCH] auto eslint for setup files --- .projen/tasks.json | 2 +- .projenrc.js | 2 ++ setup/.eslintrc.json | 2 +- setup/src/main.ts | 10 +++++----- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.projen/tasks.json b/.projen/tasks.json index eb3ef8a5..87c65b60 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -393,7 +393,7 @@ "description": "Runs eslint against the codebase", "steps": [ { - "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ src test build-tools .projenrc.js", + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ src test build-tools setup/src/*.ts setup/src/*.svelte .projenrc.js", "receiveArgs": true } ] diff --git a/.projenrc.js b/.projenrc.js index 15d76ec8..1a691487 100644 --- a/.projenrc.js +++ b/.projenrc.js @@ -134,6 +134,8 @@ project.gitignore.addPatterns('/setup/dist'); project.addPackageIgnore('/setup'); project.bundler.bundleTask.exec('vite build setup'); project.bundler.bundleTask.exec('cp -r setup/dist/index.html assets/setup.lambda/index.html'); +project.eslint.addLintPattern('setup/src/*.ts'); +project.eslint.addLintPattern('setup/src/*.svelte'); // support integ:default:watch -- https://github.com/projen/projen/issues/1347 const cdkConfig = new CdkConfig(project, { diff --git a/setup/.eslintrc.json b/setup/.eslintrc.json index b89d322d..35fedfe3 100644 --- a/setup/.eslintrc.json +++ b/setup/.eslintrc.json @@ -7,7 +7,7 @@ "parserOptions": { "ecmaVersion": 2018, "sourceType": "module", - "project": "./tsconfig.json", + "project": "./setup/tsconfig.json", "extraFileExtensions": [ ".svelte" ] diff --git a/setup/src/main.ts b/setup/src/main.ts index 01b3af1d..e8b7f373 100644 --- a/setup/src/main.ts +++ b/setup/src/main.ts @@ -1,8 +1,8 @@ -import './app.scss' -import App from './App.svelte' +import './app.scss'; +import App from './App.svelte'; const app = new App({ - target: document.getElementById('app') -}) + target: document.getElementById('app'), +}); -export default app +export default app;