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" + } +} +