Skip to content

Commit

Permalink
Merge pull request #217 from SELab-2/linting-checks
Browse files Browse the repository at this point in the history
Linting checks
  • Loading branch information
BramMeir authored Apr 1, 2024
2 parents 2d01f62 + bcfecc3 commit 443aeb6
Show file tree
Hide file tree
Showing 75 changed files with 6,640 additions and 2,783 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/frontend-linting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: frontend-linting

on:
push:
branches: [main, development]
pull_request:
branches: [main, development]
workflow_dispatch:

jobs:
linting-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: cd frontend; npm install
- name: Run ESLint
run: cd frontend; npm run lint
43 changes: 43 additions & 0 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"standard-with-typescript",
"plugin:vue/vue3-essential",
"plugin:prettier/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script",
},
}
],
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser" ,
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["./tsconfig.json"],
"extraFileExtensions": [".vue"]
},
"plugins": [
"vue",
"prettier"
],
"rules": {
"vue/multi-word-component-names": "off", // Disable rule that requires multi-word component names in Vue files
"@typescript-eslint/no-floating-promises": "off", // Disable rule that flags floating promises in .ts files
"@typescript-eslint/no-extraneous-class": "off", // Disable rule that flags usage of unnecessary classes in the codebase
"@typescript-eslint/unbound-method": "off", // Disable rule that refuses unboud methods that could scope `this`
"prettier/prettier": "error"
}
}
7 changes: 7 additions & 0 deletions frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"tabWidth": 4,
"semi": false,
"trailingComma": "none",
"bracketSpacing": true,
"singleQuote": true
}
Loading

0 comments on commit 443aeb6

Please sign in to comment.