Skip to content

Commit

Permalink
Add copyright header lint (MystenLabs#3615)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Mysten authored Jul 29, 2022
1 parent bc229c0 commit b5616f7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
9 changes: 9 additions & 0 deletions explorer/client/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

module.exports = {
plugins: ['header'],
extends: ['react-app', 'react-app/jest', 'prettier'],
rules: {
'react/jsx-no-bind': ['error'],
Expand Down Expand Up @@ -34,5 +35,13 @@ module.exports = {
},
],
'react/jsx-key': ['error', {}],
'header/header': [
2,
'line',
[
' Copyright (c) 2022, Mysten Labs, Inc.',
' SPDX-License-Identifier: Apache-2.0',
],
],
},
};
3 changes: 2 additions & 1 deletion explorer/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@types/react-dom": "^17.0.11",
"autoprefixer": "^10.4.2",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-header": "^3.1.1",
"jest-puppeteer": "^6.1.0",
"onchange": "^7.1.0",
"postcss": "^8.4.6",
Expand All @@ -30,9 +31,9 @@
},
"dependencies": {
"@mysten/sui.js": "file:../../sdk/typescript",
"@tanstack/react-table": "^8.1.4",
"@sentry/react": "^7.6.0",
"@sentry/tracing": "^7.6.0",
"@tanstack/react-table": "^8.1.4",
"bn.js": "^5.2.0",
"classnames": "^2.3.1",
"prism-react-renderer": "^1.3.5",
Expand Down
7 changes: 6 additions & 1 deletion explorer/client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@
integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==

"@mysten/sui.js@file:../../sdk/typescript":
version "0.3.0"
version "0.8.0"
dependencies:
bn.js "^5.2.0"
buffer "^6.0.3"
Expand Down Expand Up @@ -4291,6 +4291,11 @@ eslint-plugin-flowtype@^8.0.3:
lodash "^4.17.21"
string-natural-compare "^3.0.1"

eslint-plugin-header@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-header/-/eslint-plugin-header-3.1.1.tgz#6ce512432d57675265fac47292b50d1eff11acd6"
integrity sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==

eslint-plugin-import@^2.25.3:
version "2.26.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b"
Expand Down

0 comments on commit b5616f7

Please sign in to comment.