Skip to content

Commit

Permalink
Merge pull request #1328 from phac-nml/eslint-plugin-prettier
Browse files Browse the repository at this point in the history
Updated eslint prettier config so they work better together
  • Loading branch information
ericenns authored Jun 27, 2022
2 parents 7437587 + 8881ddf commit 46ef0b0
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* [Developer/UI]: Removed `styled-components` from page header and replaced with CSS variables. See [PR 1284](https://github.com/phac-nml/irida/pull/1284)
* [Developer/UI]: Updated eslint rule to check for object and array destructuring. See [PR 1322](https://github.com/phac-nml/irida/pull/1322)
* [UI]: Fixed user routes for admin panel. See [PR 1323](https://github.com/phac-nml/irida/pull/1323)
* [Developer/UI]: Added `eslint-prettier-pluggin`. See [PR 1328](https://github.com/phac-nml/irida/pull/1328)

## [22.05.4] - 2022/06/16
* [UI]: Fixed bug preventing filter samples by file to fail on invalid url. See [PR 1318](https://github.com/phac-nml/irida/pull/1318)
Expand Down
8 changes: 7 additions & 1 deletion src/main/webapp/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
],
parserOptions: {
ecmaFeatures: {
Expand All @@ -42,5 +42,11 @@ module.exports = {
enforceForRenamedProperties: false,
},
],
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
},
};
1 change: 1 addition & 0 deletions src/main/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"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",
"expose-loader": "^3.1.0",
Expand Down
32 changes: 32 additions & 0 deletions src/main/webapp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6343,6 +6343,21 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-prettier@npm:^4.0.0":
version: 4.0.0
resolution: "eslint-plugin-prettier@npm:4.0.0"
dependencies:
prettier-linter-helpers: ^1.0.0
peerDependencies:
eslint: ">=7.28.0"
prettier: ">=2.0.0"
peerDependenciesMeta:
eslint-config-prettier:
optional: true
checksum: 03d69177a3c21fa2229c7e427ce604429f0b20ab7f411e2e824912f572a207c7f5a41fd1f0a95b9b8afe121e291c1b1f1dc1d44c7aad4b0837487f9c19f5210d
languageName: node
linkType: hard

"eslint-plugin-react-hooks@npm:^4.4.0":
version: 4.4.0
resolution: "eslint-plugin-react-hooks@npm:4.4.0"
Expand Down Expand Up @@ -6620,6 +6635,13 @@ __metadata:
languageName: node
linkType: hard

"fast-diff@npm:^1.1.2":
version: 1.2.0
resolution: "fast-diff@npm:1.2.0"
checksum: 1b5306eaa9e826564d9e5ffcd6ebd881eb5f770b3f977fcbf38f05c824e42172b53c79920e8429c54eb742ce15a0caf268b0fdd5b38f6de52234c4a8368131ae
languageName: node
linkType: hard

"fast-glob@npm:^3.2.9":
version: 3.2.11
resolution: "fast-glob@npm:3.2.11"
Expand Down Expand Up @@ -7541,6 +7563,7 @@ __metadata:
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
expose-loader: ^3.1.0
Expand Down Expand Up @@ -11440,6 +11463,15 @@ __metadata:
languageName: node
linkType: hard

"prettier-linter-helpers@npm:^1.0.0":
version: 1.0.0
resolution: "prettier-linter-helpers@npm:1.0.0"
dependencies:
fast-diff: ^1.1.2
checksum: 00ce8011cf6430158d27f9c92cfea0a7699405633f7f1d4a45f07e21bf78e99895911cbcdc3853db3a824201a7c745bd49bfea8abd5fb9883e765a90f74f8392
languageName: node
linkType: hard

"prettier@npm:^2.6.2":
version: 2.6.2
resolution: "prettier@npm:2.6.2"
Expand Down

0 comments on commit 46ef0b0

Please sign in to comment.