Pārlūkot izejas kodu

🔧 improve ESLint rules

+upgrade deps
jmacura 4 gadi atpakaļ
vecāks
revīzija
90cecdabf1
3 mainītis faili ar 661 papildinājumiem un 59 dzēšanām
  1. 37 21
      .eslintrc.json
  2. 615 34
      package-lock.json
  3. 9 4
      package.json

+ 37 - 21
.eslintrc.json

@@ -3,29 +3,45 @@
     "browser": true,
     "es6": true
   },
-  "extends": [
-    "openlayers",
-    "plugin:@typescript-eslint/eslint-recommended",
-    "plugin:@typescript-eslint/recommended"
-  ],
-  "plugins": ["@typescript-eslint"],
-  "globals": {
-    "angular": "readonly"
-  },
-  "parser": "@typescript-eslint/parser",
-  "parserOptions": {
-    "ecmaVersion":  2018
-  },
-  "rules": {
-    "import/extensions": [
-      "error",
-      "ignorePackages",
-      {"js": "never", "ts": "never"}
-    ],
-    "@typescript-eslint/no-empty-function": ["error", {"allow": ["constructors"]}]
-  },
+  "globals": {},
   "overrides": [
     {
+      "files": ["*.ts"],
+      "extends": [
+        "openlayers",
+        "plugin:@typescript-eslint/eslint-recommended",
+        "plugin:@typescript-eslint/recommended",
+        "plugin:@angular-eslint/recommended",
+        "plugin:@angular-eslint/recommended--extra"
+      ],
+      "plugins": ["@typescript-eslint", "@angular-eslint"],
+      "parser": "@typescript-eslint/parser",
+      "parserOptions": {
+        "ecmaVersion":  2018
+      },
+      "rules": {
+        "import/extensions": [
+          "error",
+          "ignorePackages",
+          {"js": "never", "ts": "never"}
+        ],
+        "@typescript-eslint/no-empty-function": ["error", {"allow": ["constructors"]}]
+      }
+    },
+    {
+      "files": [
+        "*.html"
+      ],
+      "parser": "@angular-eslint/template-parser",
+      "extends": [
+        "plugin:@angular-eslint/template/recommended"
+      ],
+      "plugins": [
+        "@angular-eslint/template"
+      ],
+      "rules": {}
+    },
+    {
       "files": [
         "**/*.spec.js"
       ],

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 615 - 34
package-lock.json


+ 9 - 4
package.json

@@ -25,7 +25,7 @@
   ],
   "license": "MIT",
   "dependencies": {
-    "@angular/cdk": "^12.2.9",
+    "@angular/cdk": "^12.2.10",
     "@angular/common": "^12.2.10",
     "@angular/compiler": "^12.2.10",
     "@angular/core": "^12.2.10",
@@ -34,12 +34,12 @@
     "@angular/platform-browser": "^12.2.10",
     "@angular/platform-browser-dynamic": "^12.2.10",
     "@ng-bootstrap/ng-bootstrap": "^10.0.0",
-    "@ngx-translate/http-loader": "^5.0.0",
+    "@ngx-translate/core": "^13.0.0",
+    "@ngx-translate/http-loader": "^6.0.0",
     "bootstrap": "^4.5.3",
     "csvtojson": "^2.0.10",
     "dayjs": "^1.10.7",
     "deepmerge": "^4.2.2",
-    "file-loader": "^6.2.0",
     "geostyler-openlayers-parser": "^2.5.0",
     "geostyler-sld-parser": "^2.5.0",
     "geostyler-style": "^4.0.3",
@@ -63,15 +63,20 @@
   "devDependencies": {
     "@angular-builders/custom-webpack": "^12.1.3",
     "@angular-devkit/build-angular": "^12.2.10",
+    "@angular-eslint/builder": "^12.5.0",
+    "@angular-eslint/eslint-plugin": "^12.5.0",
+    "@angular-eslint/eslint-plugin-template": "^12.5.0",
+    "@angular-eslint/schematics": "^12.5.0",
+    "@angular-eslint/template-parser": "^12.5.0",
     "@angular/cli": "^12.2.10",
     "@angular/compiler-cli": "^12.2.10",
     "@angularclass/hmr": "^3.0.0",
-    "@ngx-translate/core": "^12.1.2",
     "eslint": "^7.10.0",
     "eslint-config-openlayers": "^14.0.0",
     "eslint-plugin-import": "^2.22.1",
     "eslint-plugin-node": "^11.1.0",
     "eslint-plugin-promise": "^4.2.1",
+    "file-loader": "^6.2.0",
     "ng-packagr": "^12.2.3",
     "sass": "^1.32.7",
     "typescript": "4.2",

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels