Skip to content

Commit

Permalink
fix: resolve changes from box/frontend (#3590)
Browse files Browse the repository at this point in the history
* fix: resolve changes from box/frontend

* fix: enable prettier on staged

* fix: remove react-hooks dependency
  • Loading branch information
tjuanitas authored Jul 25, 2024
1 parent 19432a8 commit 1d91171
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@box/frontend/prettier/prettierrc.js');
module.exports = require('@box/frontend/prettier');
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ If you have any questions, please visit our [developer forum](https://community.

# Copyright and License

Copyright 2016-present Box, Inc. All Rights Reserved.
Copyright 2016-present Box, Inc. All Rights Reserved.

Licensed under the Box Software License Agreement v.20170516.
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Box Software License Agreement v.20170516.
You may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://developer.box.com/docs/box-sdk-license
https://developer.box.com/docs/box-sdk-license

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
5 changes: 4 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const { FlatCompat } = require('@eslint/eslintrc');
const js = require('@eslint/js');

// Plugins
const cypress = require('eslint-plugin-cypress/flat');

const compat = new FlatCompat({ recommendedConfig: js.configs.recommended });

module.exports = [
Expand All @@ -16,7 +19,6 @@ module.exports = [
'reports/',
'styleguide/',
'**/__snapshots__/',
'**/*.e2e.cy.js', // fixme
'**/*.json',
'**/*.png',
],
Expand All @@ -27,6 +29,7 @@ module.exports = [
require.resolve('@box/frontend/eslint/typescript'),
require.resolve('@box/frontend/eslint/flow'),
),
cypress.configs.recommended,
{
rules: {
camelcase: 'off',
Expand Down
9 changes: 0 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@
"@svgr/plugin-svgo": "^5.1.0",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@types/classnames": "^2.2.9",
"@types/color": "^3.0.2",
"@types/enzyme": "^3.10.18",
Expand Down Expand Up @@ -211,18 +210,14 @@
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-cypress": "^3.3.0",
"eslint-plugin-formatjs": "^4.13.3",
"eslint-plugin-ft-flow": "^3.0.7",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-lodash": "^7.4.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-storybook": "^0.8.0",
"filesize": "^4.1.2",
"flow-bin": "^0.95.1",
"flow-copy-source": "^2.0.9",
Expand Down Expand Up @@ -364,10 +359,6 @@
"ip": "1.1.8"
},
"overrides": {
"draft-js": {
"react": "$react",
"react-dom": "$react-dom"
},
"react-tether": {
"react": "$react",
"react-dom": "$react-dom"
Expand Down
3 changes: 1 addition & 2 deletions scripts/cut_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ lint_and_test() {

# Tests
printf "${blue}Running tests...${end}"
unset OPENSSL_FORCE_FIPS_MODE
yarn test || return 1
printf "${green}Tests done!${end}"
}
Expand Down Expand Up @@ -247,7 +246,7 @@ push_new_release() {
fi

# Get the latest version from uncommitted package.json
VERSION=$(./node_modules/@box/frontend/shell/version.sh)

This comment has been minimized.

Copy link
@tjuanitas

tjuanitas Jul 25, 2024

Author Contributor

file no longer exists in the latest box/frontend release

VERSION=$(source ./scripts/version.sh)

# Make sure the version doesn't match the placeholder
if [[ $VERSION == "0.0.0-semantically-released" ]] ; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
'*.{js,ts,tsx}': ['eslint --fix', 'git add'],
'*.{js,ts,tsx}': ['prettier --write', 'eslint --fix', 'git add'],

This comment has been minimized.

Copy link
@tjuanitas

tjuanitas Jul 25, 2024

Author Contributor

latest box/frontend removes eslint-prettier plugin so adding this to run prettier again

'*.md': ['prettier --write --parser=markdown', 'git add'],
'*.json': ['prettier --write --parser=json', 'git add'],
'*.html': ['prettier --write --parser=html', 'git add'],
Expand Down
3 changes: 3 additions & 0 deletions scripts/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

node -pe 'JSON.parse(process.argv[1]).version' "$(cat package.json)"
7 changes: 0 additions & 7 deletions test/.eslintrc.json

This file was deleted.

Loading

0 comments on commit 1d91171

Please sign in to comment.