Skip to content

Commit

Permalink
Additional typechecking with prettier update (rilldata#3774)
Browse files Browse the repository at this point in the history
* move code quality deps to root, update config, temporarily downgrade some errors to warnings

* cleanup

* update prettier config for prettier 3.x

* run prettier

* ignore vendored files, leave comment about that

* add rollup.config.js to ts checked files

* update prettier config

* fix review comments

* fix group-uris.ts

* fix dashboard-store-defaults

* prettier post-merge fixes
  • Loading branch information
bcolloran committed Jan 5, 2024
1 parent 8ab3a97 commit 1a16943
Show file tree
Hide file tree
Showing 392 changed files with 2,773 additions and 2,637 deletions.
6 changes: 5 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
web-admin/build
web-local/build
web-local/build
**/svelte.config.js

# ignored vendored files from shoelace in web-common/src/components/modal
web-common/src/components/modal/*.js
29 changes: 27 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
'plugin:svelte/recommended',
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:svelte/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
Expand All @@ -12,6 +13,8 @@ module.exports = {
sourceType: "module",
ecmaVersion: 2019,
extraFileExtensions: [".svelte"],
project: true,
tsconfigRootDir: __dirname,
},
env: {
browser: true,
Expand All @@ -23,7 +26,7 @@ module.exports = {
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
parser: '@typescript-eslint/parser',
}
}
],
Expand All @@ -32,6 +35,28 @@ module.exports = {
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/unbound-method": "warn",
"@typescript-eslint/require-await": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/no-redundant-type-constituents": "warn",
"@typescript-eslint/no-unsafe-enum-comparison": "warn",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/no-duplicate-enum-values": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/no-implied-eval": "warn",
"@typescript-eslint/no-base-to-string": "warn",
"svelte/no-at-html-tags": "warn",
},
};
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ proto/

.env
*.sql
*.bin
*.csv
*.csv.gz
*.tsv
Expand Down
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{ "files": "*.ts", "options": { "parser": "typescript" } },
{ "files": "*.svelte", "options": { "parser": "svelte" } }
]
}
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"clsx": "^1.1.1",
"docusaurus-gtm-plugin": "^0.0.2",
"prism-react-renderer": "^1.3.3",
"react-dom": "^17.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"redocusaurus": "^1.1.2",
"tailwindcss": "^3.0.23",
"typescript": "^4.6.4"
Expand Down
Loading

0 comments on commit 1a16943

Please sign in to comment.