Browse Source

Merge pull request #669 from RooVetGit/revert_lint_changes

Revert "chore: update eslint config and quiet lint output"
Matt Rubens 11 months ago
parent
commit
a10bb20af2
3 changed files with 12 additions and 44 deletions
  1. 10 42
      .eslintrc.json
  2. 1 1
      package.json
  3. 1 1
      webview-ui/package.json

+ 10 - 42
.eslintrc.json

@@ -1,56 +1,24 @@
 {
 	"root": true,
-	"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
 	"parser": "@typescript-eslint/parser",
 	"parserOptions": {
-		"ecmaVersion": 2021,
-		"sourceType": "module",
-		"project": "./tsconfig.json"
+		"ecmaVersion": 6,
+		"sourceType": "module"
 	},
 	"plugins": ["@typescript-eslint"],
 	"rules": {
-		"@typescript-eslint/naming-convention": ["warn"],
-		"@typescript-eslint/no-explicit-any": "off",
-		"@typescript-eslint/no-unused-vars": [
+		"@typescript-eslint/naming-convention": [
 			"warn",
 			{
-				"argsIgnorePattern": "^_",
-				"varsIgnorePattern": "^_",
-				"caughtErrorsIgnorePattern": "^_"
+				"selector": "import",
+				"format": ["camelCase", "PascalCase"]
 			}
 		],
-		"@typescript-eslint/explicit-function-return-type": [
-			"warn",
-			{
-				"allowExpressions": true,
-				"allowTypedFunctionExpressions": true
-			}
-		],
-		"@typescript-eslint/explicit-member-accessibility": [
-			"warn",
-			{
-				"accessibility": "explicit"
-			}
-		],
-		"@typescript-eslint/no-non-null-assertion": "warn",
+		"@typescript-eslint/semi": "off",
+		"eqeqeq": "warn",
 		"no-throw-literal": "warn",
-		"semi": ["off", "always"],
-		"quotes": ["warn", "double", { "avoidEscape": true }],
-		"@typescript-eslint/ban-types": "off",
-		"@typescript-eslint/no-var-requires": "warn",
-		"no-extra-semi": "warn",
-		"prefer-const": "warn",
-		"no-mixed-spaces-and-tabs": "warn",
-		"no-case-declarations": "warn",
-		"no-useless-escape": "warn",
-		"require-yield": "warn",
-		"no-empty": "warn",
-		"no-control-regex": "warn",
-		"@typescript-eslint/ban-ts-comment": "warn"
-	},
-	"env": {
-		"node": true,
-		"es2021": true
+		"semi": "off",
+		"react-hooks/exhaustive-deps": "off"
 	},
-	"ignorePatterns": ["dist/**", "out/**", "webview-ui/**", "**/*.js"]
+	"ignorePatterns": ["out", "dist", "**/*.d.ts"]
 }

+ 1 - 1
package.json

@@ -214,7 +214,7 @@
 		"compile": "npm run check-types && npm run lint && node esbuild.js",
 		"compile-tests": "tsc -p . --outDir out",
 		"install:all": "npm install && cd webview-ui && npm install",
-		"lint": "eslint src --ext ts --quiet && npm run lint --prefix webview-ui",
+		"lint": "eslint src --ext ts && npm run lint --prefix webview-ui",
 		"package": "npm run build:webview && npm run check-types && npm run lint && node esbuild.js --production",
 		"pretest": "npm run compile-tests && npm run compile && npm run lint",
 		"start:webview": "cd webview-ui && npm run start",

+ 1 - 1
webview-ui/package.json

@@ -8,7 +8,7 @@
 		"build": "tsc && vite build",
 		"preview": "vite preview",
 		"test": "jest",
-		"lint": "eslint src --ext ts,tsx --quiet"
+		"lint": "eslint src --ext ts,tsx"
 	},
 	"dependencies": {
 		"@vscode/webview-ui-toolkit": "^1.4.0",