Skip to content

Commit

Permalink
feat: quality profile
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-marie broca authored and 69pmb committed Feb 1, 2024
1 parent 3f62b7a commit ab810f2
Show file tree
Hide file tree
Showing 23 changed files with 484 additions and 223 deletions.
178 changes: 102 additions & 76 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,81 +1,107 @@
{
"extends": [
"./node_modules/gts/",
"plugin:import/recommended",
"plugin:import/typescript",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended"
],
"settings": {
"import/resolver": {
"node": {
"extensions": [".ts", ".d.ts"]
"root": true,
"overrides": [
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {
"@angular-eslint/template/attributes-order": "error",
"@angular-eslint/template/button-has-type": "error",
"@angular-eslint/template/eqeqeq": "error",
"@angular-eslint/template/conditional-complexity": "error",
"@angular-eslint/template/no-negated-async": "error",
"@angular-eslint/template/banana-in-box": "error",
"@angular-eslint/template/no-duplicate-attributes": "error",
"@angular-eslint/template/use-track-by-function": "error",
"@angular-eslint/template/no-any": "error",
"@angular-eslint/template/no-distracting-elements": "error",
"@angular-eslint/template/no-interpolation-in-attributes": "error",
"@angular-eslint/template/no-positive-tabindex": "error"
}
}
},
"parser": "@typescript-eslint/parser",
"plugins": [
"eslint-plugin-import",
"eslint-plugin-prefer-arrow",
"@angular-eslint",
"@typescript-eslint"
],
"rules": {
"prefer-arrow/prefer-arrow-functions": [
"warn",
{
"disallowPrototype": true,
"singleReturnOnly": false,
"classPropertiesAllowed": false
}
],
"node/no-unpublished-import": ["error"],
"@typescript-eslint/member-ordering": [
"error",
{
"default": [
"signature",
"decorated-field",
"decorated-method",
"field",
"constructor",
"method"
},
{
"files": ["*.ts"],
"extends": [
"./node_modules/gts/",
"plugin:import/recommended",
"plugin:import/typescript",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended"
],
"settings": {
"import/resolver": {
"node": {
"extensions": [".ts", ".d.ts"]
}
}
},
"parser": "@typescript-eslint/parser",
"plugins": [
"eslint-plugin-import",
"eslint-plugin-prefer-arrow",
"@angular-eslint",
"@typescript-eslint"
],
"rules": {
"prefer-arrow/prefer-arrow-functions": [
"warn",
{
"disallowPrototype": true,
"singleReturnOnly": false,
"classPropertiesAllowed": false
}
],
"node/no-unpublished-import": ["error"],
"@typescript-eslint/member-ordering": [
"error",
{
"default": [
"signature",
"decorated-field",
"decorated-method",
"field",
"constructor",
"method"
]
}
],
"curly": ["warn"],
"complexity": ["error", 12],
"arrow-body-style": ["error", "as-needed"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true,
"allowedNames": ["ngOnInit", "ngAfterViewInit"]
}
],
"no-console": ["error", {"allow": ["warn", "error"]}],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", {"args": "all"}],
"max-lines-per-function": ["error", {"skipBlankLines": true}],
"lines-between-class-members": [
"error",
"always",
{"exceptAfterSingleLine": true}
],
"prefer-template": ["error"],
"@typescript-eslint/sort-type-constituents": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"no-useless-concat": ["error"],
"no-duplicate-imports": ["error"],
"import/no-unresolved": [
"error",
{"ignore": ["@utils", "@services", "@pipes"]}
],
"no-restricted-imports": [
"error",
{
"message": "Please import directly from 'rxjs' instead",
"name": "rxjs/Rx"
}
]
}
],
"curly": ["warn"],
"complexity": ["error", 12],
"arrow-body-style": ["error", "as-needed"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true,
"allowedNames": ["ngOnInit", "ngAfterViewInit"]
}
],
"no-console": ["error", {"allow": ["warn", "error"]}],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", {"args": "all"}],
"max-lines-per-function": ["error", {"skipBlankLines": true}],
"lines-between-class-members": [
"error",
"always",
{"exceptAfterSingleLine": true}
],
"prefer-template": ["error"],
"no-useless-concat": ["error"],
"no-duplicate-imports": ["error"],
"import/no-unresolved": [
"error",
{"ignore": ["@utils", "@services", "@pipes"]}
],
"no-restricted-imports": [
"error",
{
"message": "Please import directly from 'rxjs' instead",
"name": "rxjs/Rx"
}
]
}
}
]
}
47 changes: 24 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
"lint": "run-s lint:**",
"lint:format": "prettier --check .",
"lint:stylelint": "stylelint \"**/*.scss\" verbose",
"lint:ts": "gts lint",
"lint:ts": "eslint --max-warnings 0 .",
"fix": "run-s fix:**",
"fix:format": "prettier --write .",
"fix:stylelint": "stylelint --fix \"**/*.scss\" verbose",
"fix:fix": "gts fix",
"clean": "gts clean",
"fix:fix": "eslint --max-warnings 0 --fix .",
"compile": "tsc --noEmit",
"postinstall": "run-s postinstall:*",
"postinstall:husky": "husky install",
Expand All @@ -24,22 +23,22 @@
},
"private": true,
"dependencies": {
"@angular-devkit/build-angular": "15.2.10",
"@angular/animations": "15.2.10",
"@angular-devkit/build-angular": "~15.2",
"@angular/animations": "~15.2",
"@angular/cdk": "15.2.9",
"@angular/common": "15.2.10",
"@angular/compiler": "15.2.10",
"@angular/core": "15.2.10",
"@angular/forms": "15.2.10",
"@angular/material": "15.2.9",
"@angular/platform-browser": "15.2.10",
"@angular/platform-browser-dynamic": "15.2.10",
"@angular/common": "~15.2",
"@angular/compiler": "~15.2",
"@angular/core": "~15.2",
"@angular/forms": "~15.2",
"@angular/material": "~15.2",
"@angular/platform-browser": "~15.2",
"@angular/platform-browser-dynamic": "~15.2",
"@fortawesome/angular-fontawesome": "0.12.1",
"@fortawesome/fontawesome-common-types": "6.1.0",
"@fortawesome/fontawesome-svg-core": "6.1.0",
"@fortawesome/free-brands-svg-icons": "6.1.0",
"@fortawesome/free-regular-svg-icons": "6.1.0",
"@fortawesome/free-solid-svg-icons": "6.1.0",
"@fortawesome/fontawesome-common-types": "~6.1",
"@fortawesome/fontawesome-svg-core": "~6.1",
"@fortawesome/free-brands-svg-icons": "~6.1",
"@fortawesome/free-regular-svg-icons": "~6.1",
"@fortawesome/free-solid-svg-icons": "~6.1",
"core-js": "3.31.0",
"crypto-browserify": "^3.12.0",
"dexie": "2.0.4",
Expand All @@ -56,11 +55,13 @@
"zone.js": "0.13.1"
},
"devDependencies": {
"@angular-eslint/eslint-plugin": "~15.2.1",
"@angular/cli": "15.2.10",
"@angular/compiler-cli": "15.2.10",
"@angular/language-service": "15.2.10",
"@types/luxon": "~3.3.8",
"@angular-eslint/eslint-plugin": "~15.2",
"@angular-eslint/eslint-plugin-template": "~15.2",
"@angular-eslint/template-parser": "~15.2",
"@angular/cli": "~15.2",
"@angular/compiler-cli": "~15.2",
"@angular/language-service": "~15.2",
"@types/luxon": "~3.3",
"@types/node": "16.18.72",
"@types/xml2js": "^0.4.14",
"@typescript-eslint/eslint-plugin": "~5.62.0",
Expand All @@ -82,7 +83,7 @@
"typescript": "~4.9.5"
},
"lint-staged": {
"*.ts": "eslint --max-warnings 0 --fix --no-ignore",
"*.{ts, html}": "eslint --max-warnings 0 --fix",
"*": "prettier --ignore-unknown --write",
"*.scss": "stylelint --fix"
}
Expand Down
Loading

0 comments on commit ab810f2

Please sign in to comment.