Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Technical Debt Metrics #26442

Merged
merged 7 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/tech-debt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Upload Technical Debt Metrics to Google Sheets

on:
push:
branches:
- main
- master

jobs:
process-and-upload:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install Dependencies
run: npm install
working-directory: ./superset-frontend

- name: Run Script
env:
SPREADSHEET_ID: '1oABNnzxJYzwUrHjr_c9wfYEq9dFL1ScVof9LlaAdxvo'
SERVICE_ACCOUNT_KEY: ${{ secrets.GSHEET_KEY }}
run: npm run lint-stats
working-directory: ./superset-frontend
9 changes: 9 additions & 0 deletions superset-frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = {
'prettier',
'prettier/react',
'plugin:react-hooks/recommended',
'plugin:react-prefer-function-component/recommended',
],
parser: '@babel/eslint-parser',
parserOptions: {
Expand Down Expand Up @@ -74,6 +75,7 @@ module.exports = {
'lodash',
'theme-colors',
'translation-vars',
'react-prefer-function-component',
],
overrides: [
{
Expand Down Expand Up @@ -267,7 +269,12 @@ module.exports = {
message:
'Please use the theme directly from the ThemeProvider rather than importing supersetTheme.',
},
{
name: 'lodash/memoize',
message: 'Lodash Memoize is unsafe! Please use memoize-one instead',
},
],
patterns: ['antd/*'],
},
],
'no-shadow': 0, // re-enable up for discussion
Expand All @@ -276,6 +283,7 @@ module.exports = {
'prefer-object-spread': 1,
'prefer-destructuring': ['error', { object: true, array: false }],
'react/destructuring-assignment': 0, // re-enable up for discussion
'react/forbid-component-props': 1,
'react/forbid-prop-types': 0,
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
'react/jsx-fragments': 1,
Expand All @@ -289,6 +297,7 @@ module.exports = {
'react/require-default-props': 0,
'react/sort-comp': 0, // TODO: re-enable in separate PR
'react/static-property-placement': 0, // disabled temporarily
'react-prefer-function-component/react-prefer-function-component': 1,
'prettier/prettier': 'error',
},
ignorePatterns,
Expand Down
7 changes: 2 additions & 5 deletions superset-frontend/cypress-base/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@
*/
{
"parser": "@typescript-eslint/parser",
"plugins": ["cypress", "@typescript-eslint"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:cypress/recommended"
],
"plugins": ["cypress"],
"extends": ["plugin:cypress/recommended"],
"rules": {
"import/no-unresolved": 0,
"@typescript-eslint/explicit-function-return-type": 0,
Expand Down
3 changes: 2 additions & 1 deletion superset-frontend/cypress-base/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"noEmit": true
},
"files": ["cypress/support/index.d.ts", "./node_modules/@applitools/eyes-cypress/eyes-index.d.ts"],
"include": ["node_modules/cypress", "cypress/**/*.ts"]
"include": ["cypress/**/*.ts", "./cypress.config.ts"],
"exclude": ["node_modules"]
}
Loading
Loading