From 27e47b0a35999972de72abff340a6778f2269649 Mon Sep 17 00:00:00 2001 From: Fabien Basmaison Date: Mon, 5 Apr 2021 16:35:09 +0200 Subject: [PATCH] [lint] Update context for linting frontend files: - Lint files when pushing on the _frontend_ branch. - Lint files when eslint or stylelint config files are updated. - Use _strict_ parsing of JS files by default. This should make the JS linting test to fail. --- .eslintrc.js | 6 +++++- .github/workflows/lint-frontend.yaml | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d39859f19..b5f3c311f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,5 +6,9 @@ module.exports = { "es6": true }, - "extends": "eslint:recommended" + "extends": "eslint:recommended", + + "rules": { + "strict": "error" + } }; diff --git a/.github/workflows/lint-frontend.yaml b/.github/workflows/lint-frontend.yaml index 4c5e88234..f370d83bc 100644 --- a/.github/workflows/lint-frontend.yaml +++ b/.github/workflows/lint-frontend.yaml @@ -3,12 +3,14 @@ name: Lint Frontend on: push: - branches: [ main, ci ] + branches: [ main, ci, frontend ] paths: - '.github/workflows/**' - 'static/**' + - '.eslintrc' + - '.stylelintrc' pull_request: - branches: [ main, ci ] + branches: [ main, ci, frontend ] jobs: lint: