From a2ee9b86a3e59b9a935310e3340712f5d150d6f0 Mon Sep 17 00:00:00 2001 From: JesmoDev Date: Tue, 17 May 2022 13:03:27 +0200 Subject: [PATCH] lint and prettier update --- src/Umbraco.Web.UI.Client/.eslintcache | 1 + src/Umbraco.Web.UI.Client/.eslintignore | 2 ++ src/Umbraco.Web.UI.Client/.eslintrc.json | 3 +++ src/Umbraco.Web.UI.Client/.prettierrc.json | 3 --- src/Umbraco.Web.UI.Client/package.json | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/.eslintcache create mode 100644 src/Umbraco.Web.UI.Client/.eslintignore diff --git a/src/Umbraco.Web.UI.Client/.eslintcache b/src/Umbraco.Web.UI.Client/.eslintcache new file mode 100644 index 0000000000..aabdaf08ee --- /dev/null +++ b/src/Umbraco.Web.UI.Client/.eslintcache @@ -0,0 +1 @@ +[{"C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\index.html":"1","C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\auth\\login\\umb-login.element.ts":"2","C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\auth\\umb-auth-layout.element.ts":"3","C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\mocks\\browser.ts":"4","C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\mocks\\handlers.ts":"5","C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\umb-app.ts":"6","C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\vite-env.d.ts":"7","C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\vite.config.ts":"8"},{"size":439,"mtime":1652780722735,"results":"9","hashOfConfig":"10"},{"size":3548,"mtime":1652780966102,"results":"11","hashOfConfig":"12"},{"size":1583,"mtime":1652780143916,"results":"13","hashOfConfig":"12"},{"size":125,"mtime":1652778625829,"results":"14","hashOfConfig":"12"},{"size":1124,"mtime":1652778625830,"results":"15","hashOfConfig":"12"},{"size":1333,"mtime":1652784785309,"results":"16","hashOfConfig":"12"},{"size":38,"mtime":1652772071662,"results":"17","hashOfConfig":"12"},{"size":101,"mtime":1652777797494,"results":"18","hashOfConfig":"19"},{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":1,"fatalErrorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"19l7quh",{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1bd46in",{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","suppressedMessages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","suppressedMessages":"34","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","suppressedMessages":"37","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"38","messages":"39","suppressedMessages":"40","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"41","messages":"42","suppressedMessages":"43","errorCount":1,"fatalErrorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"yvcwes","C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\index.html",["44"],[],"C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\auth\\login\\umb-login.element.ts",[],[],"C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\auth\\umb-auth-layout.element.ts",[],[],"C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\mocks\\browser.ts",[],[],"C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\mocks\\handlers.ts",[],[],"C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\umb-app.ts",["45"],[],"C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\src\\vite-env.d.ts",[],[],"C:\\Users\\Umbraco\\Documents\\Git\\Umbraco.CMS.Backoffice\\vite.config.ts",["46"],[],{"ruleId":null,"fatal":true,"severity":2,"message":"47","line":1,"column":10},{"ruleId":"48","severity":1,"message":"49","line":25,"column":10,"nodeType":"50","messageId":"51","endLine":25,"endColumn":13,"suggestions":"52"},{"ruleId":null,"fatal":true,"severity":2,"message":"53"},"Parsing error: '>' expected.","@typescript-eslint/no-explicit-any","Unexpected any. Specify a different type.","TSAnyKeyword","unexpectedAny",["54","55"],"Parsing error: \"parserOptions.project\" has been set for @typescript-eslint/parser.\nThe file does not match your project config: vite.config.ts.\nThe file must be included in at least one of the projects provided.",{"messageId":"56","fix":"57","desc":"58"},{"messageId":"59","fix":"60","desc":"61"},"suggestUnknown",{"range":"62","text":"63"},"Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct.","suggestNever",{"range":"62","text":"64"},"Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.",[539,542],"unknown","never"] \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/.eslintignore b/src/Umbraco.Web.UI.Client/.eslintignore new file mode 100644 index 0000000000..1723d82cf5 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/.eslintignore @@ -0,0 +1,2 @@ +node_modules/ +.eslintrc.js diff --git a/src/Umbraco.Web.UI.Client/.eslintrc.json b/src/Umbraco.Web.UI.Client/.eslintrc.json index 9590ac91ba..943fa96dd2 100644 --- a/src/Umbraco.Web.UI.Client/.eslintrc.json +++ b/src/Umbraco.Web.UI.Client/.eslintrc.json @@ -1,4 +1,5 @@ { + "ignorePatterns": ["vite.*.ts"], "env": { "browser": true, "es2021": true @@ -11,6 +12,8 @@ ], "parser": "@typescript-eslint/parser", "parserOptions": { + "project": "./tsconfig.json", + "tsconfigRootDir": "./", "ecmaVersion": "latest", "sourceType": "module" }, diff --git a/src/Umbraco.Web.UI.Client/.prettierrc.json b/src/Umbraco.Web.UI.Client/.prettierrc.json index e2e424ec8b..093d881bf2 100644 --- a/src/Umbraco.Web.UI.Client/.prettierrc.json +++ b/src/Umbraco.Web.UI.Client/.prettierrc.json @@ -1,10 +1,7 @@ { "printWidth": 120, - "tabWidth": 2, - "useTabs": false, "singleQuote": true, "semi": true, - "trailingComma": "es5", "bracketSpacing": true, "bracketSameLine": true } diff --git a/src/Umbraco.Web.UI.Client/package.json b/src/Umbraco.Web.UI.Client/package.json index 29ef983961..e5eb810535 100644 --- a/src/Umbraco.Web.UI.Client/package.json +++ b/src/Umbraco.Web.UI.Client/package.json @@ -6,7 +6,7 @@ "dev": "vite", "build": "tsc && vite build", "test": "echo 'TODO: Implement test'", - "lint": "echo 'TODO: Implement lint'" + "lint": "eslint --cache --ext .ts . --ignore-path .gitignore" }, "dependencies": { "@umbraco-ui/uui": "^0.2.0",