Skip to content

Commit

Permalink
chore: Technical Debt Metrics (#26442)
Browse files Browse the repository at this point in the history
  • Loading branch information
rusackas committed Jan 26, 2024
1 parent 5e633d2 commit 3dcfbcc
Show file tree
Hide file tree
Showing 7 changed files with 605 additions and 6 deletions.
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

0 comments on commit 3dcfbcc

Please sign in to comment.