Skip to content

Commit 2eec99f

Browse files
committed
Reformat source code for consistent style
* Enable eslint and prettier config for validation during build * No functional code changes, source code format only
1 parent e583eb5 commit 2eec99f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3025
-2814
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ jobs:
2222
with:
2323
node-version: '22'
2424

25-
# Temporarily disabling this step due to formatting issues.
26-
# Linter and prettier) currently throws numerous warnings.
27-
# Code style checks will be re-enabled in a future PR that includes a codebase reformat.
28-
# - name: Check code style
29-
# run: npm run check:clean
25+
- name: Check code style
26+
run: npm run check:clean
3027

3128
- name: Build package
3229
run: npm run package:clean

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,15 @@ The local URL will be be displayed which you can open in your browser.
138138

139139
To build parser: `npm run antlr4ng`, as configured in **package.json**
140140

141+
### Linting and code formatting
142+
143+
To check code quality and formatting
144+
```shell
145+
npm run check
146+
```
147+
148+
This command runs both eslint and prettier, as defined in **package.json**
149+
141150
## Philosophy
142151

143152
This UI's purpose is to provide an environment where once the cluster is stood up, executing queries and exploring data sets can be done right away. The idended use cases are:

precise/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/generated/**

precise/.eslintrc.cjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@ module.exports = {
1414
'warn',
1515
{ allowConstantExport: true },
1616
],
17+
// ❗ Temporarily disabled due to widespread use of `any` an `unused vars` in the codebase.
18+
// Defining proper types will require significant effort.
19+
// We will address this incrementally in future pull requests.
20+
'@typescript-eslint/no-explicit-any': 'off',
21+
'@typescript-eslint/no-unused-vars': 'off',
1722
},
1823
}

precise/.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/generated/**

precise/.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 4,
4+
"semi": false,
5+
"singleQuote": true,
6+
"printWidth": 120
7+
}

precise/src/App.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
import { useState, useEffect } from 'react';
2-
import QueryApp from './QueryApp';
3-
4-
const defaultQuery = "-- enter your query here\n\nselect * from tpch.sf1.lineitem limit 2";
1+
import QueryApp from './QueryApp'
52

63
// for now this is a defacto Tab, but we will treat this tab more as a page in the future
74
function App() {
8-
9-
10-
return (
11-
<div className="page">
12-
<QueryApp />
13-
</div>
14-
);
5+
return (
6+
<div className="page">
7+
<QueryApp />
8+
</div>
9+
)
1510
}
1611

17-
export default App;
12+
export default App

0 commit comments

Comments
 (0)