Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Prettify and Lint scripts for each sub-project and top level client #923

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions client/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
Expand All @@ -23,8 +25,22 @@
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
],
"@typescript-eslint/consistent-type-assertions": [
"error",
{
"assertionStyle": "never"
}
],
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"],
"extends": ["prettier"]
}
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
],
"extends": [
"prettier"
]
}
3 changes: 2 additions & 1 deletion client/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ dist/
# Webviews
## Ignoring these since they have their own settings
goal-view-ui
search-ui
search-ui
pp-display
8 changes: 5 additions & 3 deletions client/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"tabWidth": 4,
"plugins": ["prettier-plugin-organize-imports"]
}
"tabWidth": 2,
"plugins": [
"prettier-plugin-organize-imports"
]
}
47 changes: 47 additions & 0 deletions client/goal-view-ui/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off",
// note you must disable the base rule
// as it can report incorrect errors
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn", // or "error"
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"@typescript-eslint/consistent-type-assertions": [
"error",
{
"assertionStyle": "never"
}
],
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error"
},
"ignorePatterns": [
"build",
"node_modules",
"**/*.d.ts"
],
"extends": [
"prettier"
]
}
3 changes: 3 additions & 0 deletions client/goal-view-ui/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore artifacts:
build
node_modules
6 changes: 6 additions & 0 deletions client/goal-view-ui/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tabWidth": 2,
"plugins": [
"prettier-plugin-organize-imports"
]
}
14 changes: 11 additions & 3 deletions client/goal-view-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"start": "vite",
"build": "tsc && vite build",
"build:dev": "tsc && vite build -m development",
"preview": "vite preview"
"preview": "vite preview",
"lint": "eslint src --ext .ts,.tsx",
"prettify": "prettier --write ."
},
"dependencies": {
"@vscode/codicons": "^0.0.32",
Expand All @@ -21,8 +23,14 @@
"@types/react": "^17.0.33",
"@types/react-dom": "^17.0.10",
"@types/vscode-webview": "^1.57.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"@vitejs/plugin-react": "^1.0.7",
"typescript": "^4.4.4",
"eslint": "^8.28.0",
"eslint-config-prettier": "^9.1.0",
"prettier": "3.3.3",
"prettier-plugin-organize-imports": "^4.0.0",
"typescript": "^5.5.0",
"vite": "^2.9.18"
}
}
}
23 changes: 18 additions & 5 deletions client/goal-view-ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
{
"compilerOptions": {
"target": "esnext",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"useDefineForClassFields": true,
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
"jsx": "react-jsx",
"strict": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"strictBindCallApply": true,
"noImplicitAny": true,
"alwaysStrict": true
},
"include": ["./src"]
}
"include": [
"./src"
]
}
Loading
Loading