From 4f3f6a8e4a01090cb6d365e7d7d03d161f19a971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D1=8E=D1=82=D1=80=D1=8E=D0=BC=D0=BE=D0=B2=20=D0=A1?= =?UTF-8?q?=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9C=D0=B8=D1=85=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2=D0=B8=D1=87?= Date: Sun, 19 May 2024 01:04:18 +0300 Subject: [PATCH] lint --- .gitlab-ci.yml | 22 ++++++++++++++++++++++ notes-app/.eslintrc.json | 19 +++++++++++++++++++ notes-backend/.eslintrc.json | 19 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 notes-app/.eslintrc.json create mode 100644 notes-backend/.eslintrc.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7c3b84..f48cf77 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,25 @@ +lint_frontend: + stage: lint + image: node:18 + script: + - cd notes-app + - npm ci + - npm install eslint + - npx eslint . + only: + - feature/* + +lint_backend: + stage: lint + image: node:18 + script: + - cd notes-backend + - npm ci + - npm install eslint + - npx eslint . + only: + - feature/* + build-job: stage: build script: diff --git a/notes-app/.eslintrc.json b/notes-app/.eslintrc.json new file mode 100644 index 0000000..7304ab5 --- /dev/null +++ b/notes-app/.eslintrc.json @@ -0,0 +1,19 @@ +{ + "env": { + "browser": true, + "es2021": true + }, + "extends": ["eslint:recommended", "plugin:react/recommended"], + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": 12, + "sourceType": "module" + }, + "plugins": ["react"], + "rules": { + "react/prop-types": "off" + } +} + diff --git a/notes-backend/.eslintrc.json b/notes-backend/.eslintrc.json new file mode 100644 index 0000000..7304ab5 --- /dev/null +++ b/notes-backend/.eslintrc.json @@ -0,0 +1,19 @@ +{ + "env": { + "browser": true, + "es2021": true + }, + "extends": ["eslint:recommended", "plugin:react/recommended"], + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": 12, + "sourceType": "module" + }, + "plugins": ["react"], + "rules": { + "react/prop-types": "off" + } +} +