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

Typescript update for the LockedSamplesList #1459

Draft
wants to merge 44 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a4c7385
chore: Adding airbnb typescript defaults and enforce return types
joshsadam Jan 25, 2023
27eb3d5
chore: Fixed file path
joshsadam Jan 25, 2023
541813c
chore: Updated eslint
joshsadam Jan 25, 2023
4215d22
chore: Updated path to tsconfig.json
joshsadam Jan 25, 2023
9ad0d74
chore: Updated running paths
joshsadam Jan 25, 2023
9d0cd9b
chore: Removed explicit function return type
joshsadam Jan 25, 2023
921556b
chore: Reset paths
joshsadam Jan 25, 2023
adf4d6a
Merge branch 'development' into react-eslint-rules
joshsadam Jan 26, 2023
c70de15
fix: Linting does not require dependencies
joshsadam Jan 26, 2023
b9b33aa
fix: Force error to by of type string
joshsadam Jan 26, 2023
5d66bb9
fix: Should not have removed the include path
joshsadam Jan 26, 2023
d6de9b8
fix: Still trying to et path to tsconfig
joshsadam Jan 26, 2023
e22dc35
fix: Removed dangling comma
joshsadam Jan 26, 2023
9482a46
chore: Updated CHANGELOG.md
joshsadam Jan 26, 2023
336a7b8
chore: Still sorting out the correct path for tslint
joshsadam Jan 26, 2023
a659322
chore: Still sorting out the correct path for tslint
joshsadam Jan 26, 2023
055afee
fix: Removed dangling comma
joshsadam Jan 26, 2023
8831651
fix: Fixed command to run lint
joshsadam Jan 26, 2023
0748ddb
chore: Updated eslint dependencies
joshsadam Jan 26, 2023
e7c97ad
fix: Added back pnpmIntsall
joshsadam Jan 26, 2023
6c18b73
fix: Fix error where tsonfig would not run on js files
joshsadam Jan 26, 2023
1801f5f
fix: Updated to lint common config files
joshsadam Jan 27, 2023
4979d61
chore: Let's lint everything
joshsadam Jan 27, 2023
8206861
fix: Typo
joshsadam Jan 27, 2023
e9ffcb8
chore: Removed unnecessary options
joshsadam Jan 27, 2023
72f242a
Merge branch 'development' into react-eslint-rules
joshsadam Jan 30, 2023
4c60246
chore: Removed old errors that are handled by new config
joshsadam Jan 30, 2023
c3d1639
chore: Base store cleanup
joshsadam Jan 31, 2023
6fe16ba
chore: Added typings for fetching paged samples
joshsadam Jan 31, 2023
c16870b
chore: Cleaned up types for paged tables
joshsadam Jan 31, 2023
c4e20df
chore: Moved store into it's own typescript file
joshsadam Jan 31, 2023
d50f86a
fix: Cleaned up eslint erros
joshsadam Jan 31, 2023
9ab4ef8
fix: Fixed typescript errors in MergeModal.tsx
joshsadam Feb 1, 2023
a525e35
fix: Removed logging statement
joshsadam Feb 1, 2023
82c69fe
fix: Cleaned up typescript linting errors
joshsadam Feb 1, 2023
49e4e37
chore: Removed redundant function
joshsadam Feb 1, 2023
e4219a9
chore: Fixed eslint errors in RemoveModal.tsx
joshsadam Feb 1, 2023
c98e297
chore: Fixed eslint errors in SamplesMenu.jsx
joshsadam Feb 1, 2023
d2c66a2
chore: Fixing param types
joshsadam Feb 1, 2023
19ba9b6
chore: Fixing param types for ShareSamplesList
joshsadam Feb 1, 2023
4cdca25
chore: Fixed typings for ShareSamples.tsx
joshsadam Feb 1, 2023
2221a8d
chore: Rename file to pass eslint
joshsadam Feb 1, 2023
ce0c353
chore: Fixed nested ternary operators
joshsadam Feb 1, 2023
41f35f3
fix: Fixed shadow variable
joshsadam Feb 1, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: tj-actions/eslint-changed-files@v18
with:
config_path: "src/main/webapp/.eslintrc.js"
extra_args: "--max-warnings=0"
extra_args: "--max-warnings=0 --parser-options project:src/main/webapp/tsconfig.json"
file_extensions: |
src/main/webapp/resources/js/**/*.ts
src/main/webapp/resources/js/**/*.tsx
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* [UI]: Fixed bug where the `User` column was named `User Group` on the admin User Groups page. [See PR 1450](https://github.com/phac-nml/irida/pull/1450)
* [Developer]: Replaced Apache OLTU with Nimbusds for performing OAuth2 authentication flow during syncing and Galaxy exporting. See [PR 1432](https://github.com/phac-nml/irida/pull/1432)
* [Developer/UI]: Performance enhancements to the metadata uploader. See [PR 1445](https://github.com/phac-nml/irida/pull/1445).
* [UI/Developer]: Updated Eslint config to use `airbnb`. [See PR 1454](https://github.com/phac-nml/irida/pull/1454)

## [22.09.7] - 2022/01/24
* [UI]: Fixed bugs on NCBI Export page preventing the NCBI `submission.xml` file from being properly written. See [PR 1451](https://github.com/phac-nml/irida/pull/1451)
Expand Down
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ tasks.register<PnpmTask>("cleanWebapp") {
pnpmCommand.set(listOf("clean"))
}

tasks.register<PnpmTask>("lintWebapp") {
dependsOn(":pnpmInstall")
pnpmCommand.set(listOf("lint"))
}

tasks.register<PnpmTask>("buildWebapp") {
inputs.files(fileTree("${project.projectDir}/src/main/webapp/resources"))
inputs.file("${project.projectDir}/src/main/webapp/package.json")
Expand Down
25 changes: 4 additions & 21 deletions src/main/webapp/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ module.exports = {
__webpack_public_path__: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"airbnb",
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
parserOptions: {
project: "./tsconfig.json",
ecmaFeatures: {
jsx: true,
},
Expand All @@ -31,22 +30,6 @@ module.exports = {
},
},
rules: {
"react/prop-types": 0,
"prefer-destructuring": [
"error",
{
array: true,
object: true,
},
{
enforceForRenamedProperties: false,
},
],
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
"@typescript-eslint/consistent-type-imports": "warn",
},
};
21 changes: 12 additions & 9 deletions src/main/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "run-z --then rm -rf dist/ pages/templates/i18n/",
"test": "run-z --then jest resources/js/**/*.test.js",
"test_watch": "run-z --then jest --watch resources/js/**/*.test.js",
"lint": "run-z --then eslint --ext resources/js/**/*.{js,jsx,ts,tsx}"
"lint": "run-z --then eslint --ext .js,.jsx,.ts,.tsx resources/js/"
},
"browserslist": [
"last 2 Chrome versions",
Expand Down Expand Up @@ -90,20 +90,23 @@
"@types/react-virtualized-auto-sizer": "^1.0.1",
"@types/react-window": "^1.8.5",
"@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"autoprefixer": "^10.4.4",
"babel-loader": "^8.2.4",
"babel-plugin-import": "^1.13.5",
"browserslist": "^4.20.2",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^3.4.1",
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.4.0",
"eslint": "^8.32.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.1",
"eslint-plugin-react-hooks": "^4.6.0",
"expose-loader": "^3.1.0",
"jest": "^27.5.1",
"less": "^4.1.2",
Expand Down
Loading