Skip to content

Commit

Permalink
Use .jsx file extension for JS components (jaegertracing#1218)
Browse files Browse the repository at this point in the history
* Split from jaegertracing#1212

This is to ease an eventual migration to Vite, since Vite by default
only supports JSX in files with the .jsx or .tsx extensions, and this is
surprisingly hard to override. Update the Prettier and ESLint
configurations accordingly.

Signed-off-by: Máté Szabó <[email protected]>
  • Loading branch information
mszabo-wikia authored and Benjamin Klein committed Apr 18, 2023
1 parent e89b341 commit b3bf586
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
settings: {
'import/resolver': {
node: {
extensions: ['.js', 'json', '.tsx'],
extensions: ['.js', '.jsx', 'json', '.tsx'],
},
},
},
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
"build": "lerna run build",
"check-license": "./scripts/check-license.sh",
"coverage": "lerna run coverage",
"eslint": "eslint --cache 'scripts/*.{js,ts,tsx}' 'packages/*/src/**/*.{js,ts,tsx}' 'packages/*/*.{js,ts,tsx}'",
"eslint": "eslint --cache 'scripts/*.{js,jsx,ts,tsx}' 'packages/*/src/**/*.{js,jsx,ts,tsx}' 'packages/*/*.{js,jsx,ts,tsx}'",
"fmt": "yarn prettier",
"lint": "npm-run-all -ln --parallel prettier-lint tsc-lint eslint check-license",
"prepare": "lerna run --stream --sort prepublishOnly",
"prettier": "prettier --write '{.,scripts}/*.{js,json,md,ts,tsx}' 'packages/*/{src,demo/src}/**/!(layout.worker.bundled|react-vis).{css,js,json,md,ts,tsx}' 'packages/*/*.{css,js,json,md,ts,tsx}'",
"prettier-lint": "prettier --list-different '{.,scripts}/*.{js,json,md,ts,tsx}' 'packages/*/{src,demo/src}/**/!(layout.worker.bundled|react-vis).{css,js,json,md,ts,tsx}' 'packages/*/*.{css,js,json,md,ts,tsx}'",
"prettier": "prettier --write '{.,scripts}/*.{js,jsx,json,md,ts,tsx}' 'packages/*/{src,demo/src}/**/!(layout.worker.bundled|react-vis).{css,js,jsx,json,md,ts,tsx}' 'packages/*/*.{css,js,jsx,json,md,ts,tsx}'",
"prettier-lint": "prettier --list-different '{.,scripts}/*.{js,jsx,json,md,ts,tsx}' 'packages/*/{src,demo/src}/**/!(layout.worker.bundled|react-vis).{css,js,jsx,json,md,ts,tsx}' 'packages/*/*.{css,js,jsx,json,md,ts,tsx}'",
"test": "lerna run test",
"tsc-lint": "tsc --build",
"tsc-lint-debug": "tsc --listFiles",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ export class SearchTracePageImpl extends Component {
</TabPane>
{!disableFileUploadControl && (
<TabPane tab="JSON File" key="fileLoader">
<FileLoader
loadJsonTraces={(fileList: FileList) => {
loadJsonTraces(fileList);
}}
/>
<FileLoader
loadJsonTraces={fileList => {
loadJsonTraces(fileList);
}}
/>
</TabPane>
)}
)}
</Tabs>
</div>
</Col>
Expand Down

0 comments on commit b3bf586

Please sign in to comment.