Merge pull request #23 from moufmouf/eslint_front

Adding ESLint for front part
This commit is contained in:
David Négrier 2020-04-04 16:18:13 +02:00 committed by GitHub
commit 8cc8e2d554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 668 additions and 13 deletions

View File

@ -32,6 +32,10 @@ jobs:
API_URL: "http://localhost:8080" API_URL: "http://localhost:8080"
working-directory: "front" working-directory: "front"
- name: "Lint"
run: yarn run lint
working-directory: "front"
continuous-integration-back: continuous-integration-back:
name: "Continuous Integration Back" name: "Continuous Integration Back"

27
front/.eslintrc.json Normal file
View File

@ -0,0 +1,27 @@
{
"root": true,
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"no-unused-vars": "off"
}
}

View File

@ -4,6 +4,9 @@
"main": "index.js", "main": "index.js",
"license": "AGPL", "license": "AGPL",
"devDependencies": { "devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.26.0",
"@typescript-eslint/parser": "^2.26.0",
"eslint": "^6.8.0",
"ts-loader": "^6.2.2", "ts-loader": "^6.2.2",
"typescript": "^3.8.3", "typescript": "^3.8.3",
"webpack": "^4.42.1", "webpack": "^4.42.1",
@ -15,6 +18,7 @@
}, },
"scripts": { "scripts": {
"start": "webpack-dev-server --open", "start": "webpack-dev-server --open",
"build": "webpack" "build": "webpack",
"lint": "node_modules/.bin/eslint src/ . --ext .ts"
} }
} }

File diff suppressed because it is too large Load Diff