From 48db63a60e7e7e5ef21ed7ca2bc9e417cc2cefd6 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Wed, 3 Nov 2021 14:30:22 +0000 Subject: [PATCH] build(eslint): use an ignore file Rather than running ESLint on a single subfolder, this uses an ignore file to exclude files that aren't lint correctly. Refs #422 --- .eslintignore | 5 +++++ Dockerfile | 1 + package.json | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..24ec9cb5 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +/dist/ +/integration/ +/src/frontend/ +/test/ +/jest.config.ts diff --git a/Dockerfile b/Dockerfile index 68e6d86e..ac3386f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -101,6 +101,7 @@ FROM builder AS dev ENV NODE_ENV=development COPY \ + .eslintignore \ .eslintrc.json \ .gitignore \ .prettierignore \ diff --git a/package.json b/package.json index 6fde5d39..840cb9ec 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "scripts": { "format": "prettier --ignore-unknown --check '**'", - "lint": "eslint --ext .js,.jsx,.ts,.tsx --ignore-path .gitignore ./src/backend", + "lint": "eslint --ext .js,.jsx,.ts,.tsx .", "test": "jest", "build": "rimraf dist && npm run build:scripts && npm run build:backend && npm run build:hooks && npm run build:frontend", "build:dev": "rimraf dist && npm run build:scripts && npm run build:backend:dev && npm run build:hooks && npm run build:frontend:dev",