Commit 1caa294a authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Mise en place d'eslint et prettier pour typescript.

No related merge requests found
Showing with 32 additions and 23 deletions
+32 -23
.eslintrc.js 0 → 100644
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
},
extends: [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
// Doit rester en dernier :
"plugin:prettier/recommended"
],
rules: {
}
};
......@@ -7,3 +7,4 @@
.php_cs.*cache
.idea
composer.lock
package-lock.json
module.exports = {
semi: true,
trailingComma: "all",
singleQuote: true,
printWidth: 120,
tabWidth: 4
};
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -5,8 +5,10 @@
"main": "dist/index.js",
"directories": {},
"scripts": {
"lint": "eslint --fix '{src,tests}/**/*.{js,ts}' --quiet --fix",
"test": "echo \"Error: no test specified\" && exit 1",
"test:compile-generated": "tsc --project tsconfig.ci.json --pretty --noEmit"
"test:compile-generated": "tsc --project tsconfig.ci.json --pretty --noEmit",
"test:lint": "eslint '{src,tests}/**/*.{js,ts}'"
},
"repository": {
"type": "git",
......@@ -30,14 +32,13 @@
"devDependencies": {
"@angular/common": "^7.2.15",
"@angular/core": "^7.2.15",
"irstea-typescript-config": "^1.0.7",
"prettier": "^1.19.1",
"prettier-tslint": "^0.4.2",
"@typescript-eslint/eslint-plugin": "^4.15.1",
"@typescript-eslint/parser": "^4.15.1",
"eslint": "^7.20.0",
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-prettier": "^3.3.1",
"prettier": "^2.2.1",
"rxjs-marbles": "^5.0.3",
"rxjs-tslint-rules": "^4.26.1",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"typescript": "^3.7.2",
"zone.js": "~0.8.26"
}
......
{
"extends": [
"irstea-typescript-config"
],
"rulesDirectory": [
"node_modules/codelyzer"
],
"linterOptions": {
"exclude": [
"node_modules/**",
"dist/**",
"coverage/**"
]
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment