From 0e6e702ca64ff7089f9064c32a9959eb3b8ab7e7 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sat, 20 Jan 2024 13:40:03 -0800 Subject: [PATCH 1/7] chore: fix GitHub 'Unchanged files with check annotations' reports in PR --- .github/workflows/superset-frontend.yml | 1 + .github/workflows/superset-websocket.yml | 3 ++ CONTRIBUTING.md | 3 ++ docs/docs/contributing/hooks-and-linting.mdx | 3 ++ .../cypress/e2e/dashboard/drillby.test.ts | 1 + .../cypress/e2e/dashboard/editmode.test.ts | 1 + .../cypress-base/cypress/support/e2e.ts | 2 ++ .../cypress-base/cypress/utils/index.ts | 29 +++++++++++-------- .../cypress-base/cypress/utils/vizPlugins.ts | 1 + superset-frontend/js_build.sh | 1 + superset-frontend/package.json | 7 +++-- superset-frontend/scripts/build.js | 1 + 12 files changed, 38 insertions(+), 15 deletions(-) diff --git a/.github/workflows/superset-frontend.yml b/.github/workflows/superset-frontend.yml index 35e1a989a4179..047d07bd8ad7b 100644 --- a/.github/workflows/superset-frontend.yml +++ b/.github/workflows/superset-frontend.yml @@ -41,6 +41,7 @@ jobs: working-directory: ./superset-frontend run: | npm run lint -- --quiet + npm run type npm run prettier-check - name: Build plugins packages if: steps.check.outcome == 'failure' diff --git a/.github/workflows/superset-websocket.yml b/.github/workflows/superset-websocket.yml index 73a532cb98108..84df2c5010d62 100644 --- a/.github/workflows/superset-websocket.yml +++ b/.github/workflows/superset-websocket.yml @@ -21,6 +21,9 @@ jobs: - name: lint working-directory: ./superset-websocket run: npm run lint + - name: typescript checks + working-directory: ./superset-websocket + run: npm run type - name: prettier working-directory: ./superset-websocket run: npm run prettier-check diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index de40865edc7da..5f72458d71a08 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -788,7 +788,10 @@ is configured as a pre-commit hook. There are also numerous [editor integrations ```bash cd superset-frontend npm ci +# run eslint checks npm run lint +# run tsc checks +npm run type ``` If using the eslint extension with vscode, put the following in your workspace `settings.json` file: diff --git a/docs/docs/contributing/hooks-and-linting.mdx b/docs/docs/contributing/hooks-and-linting.mdx index 509a12ac11127..b26701a0f1882 100644 --- a/docs/docs/contributing/hooks-and-linting.mdx +++ b/docs/docs/contributing/hooks-and-linting.mdx @@ -49,7 +49,10 @@ is configured as a pre-commit hook. There are also numerous [editor integrations ```bash cd superset-frontend npm ci +# run eslint checks npm run lint +# run tsc (typescript) checks +npm run type ``` If using the eslint extension with vscode, put the following in your workspace `settings.json` file: diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts index c365f66b4a463..50dd7180cf488 100644 --- a/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts +++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts @@ -77,6 +77,7 @@ const drillBy = (targetDrillByColumn: string, isLegacy = false) => { const verifyExpectedFormData = ( interceptedRequest: Interception, + // eslint-disable-next-line @typescript-eslint/no-explicit-any expectedFormData: Record, ) => { const actualFormData = interceptedRequest.request.body?.form_data; diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts index 62bab84d1b85c..228fa1ec0a5c0 100644 --- a/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts +++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts @@ -88,6 +88,7 @@ function visitEdit(sampleDashboard = SAMPLE_DASHBOARD_1) { } function resetTabbedDashboard(go = false) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any cy.getDashboard('tabbed_dash').then((r: Record) => { const jsonMetadata = r?.json_metadata || '{}'; const metadata = JSON.parse(jsonMetadata); diff --git a/superset-frontend/cypress-base/cypress/support/e2e.ts b/superset-frontend/cypress-base/cypress/support/e2e.ts index cccc7b2005737..6556d8e5eb92b 100644 --- a/superset-frontend/cypress-base/cypress/support/e2e.ts +++ b/superset-frontend/cypress-base/cypress/support/e2e.ts @@ -20,6 +20,8 @@ import '@cypress/code-coverage/support'; import '@applitools/eyes-cypress/commands'; import failOnConsoleError from 'cypress-fail-on-console-error'; +/* eslint-disable @typescript-eslint/no-explicit-any */ + require('cy-verify-downloads').addCustomCommand(); // fail on console error, allow config to override individual tests diff --git a/superset-frontend/cypress-base/cypress/utils/index.ts b/superset-frontend/cypress-base/cypress/utils/index.ts index 2f06efc22c25e..3ad7f7bb82bcd 100644 --- a/superset-frontend/cypress-base/cypress/utils/index.ts +++ b/superset-frontend/cypress-base/cypress/utils/index.ts @@ -41,12 +41,23 @@ export function clearAllInputs() { }); } -const toSlicelike = ($chart: JQuery): Slice => ({ - slice_id: parseInt($chart.attr('data-test-chart-id')!, 10), - form_data: { - viz_type: $chart.attr('data-test-viz-type')!, - }, -}); +const toSlicelike = ($chart: JQuery): Slice => { + const chartId = $chart.attr('data-test-chart-id'); + const vizType = $chart.attr('data-test-viz-type'); + + return { + slice_id: chartId ? parseInt(chartId, 10) : null, + form_data: { + viz_type: vizType || null, + }, + }; +}; + +export function getChartGridComponent({ name, viz }: ChartSpec) { + return cy + .get(`[data-test-chart-name="${name}"]`) + .should('have.attr', 'data-test-viz-type', viz); +} export function getChartAliasBySpec(chart: ChartSpec) { return getChartGridComponent(chart).then($chart => @@ -67,12 +78,6 @@ export function getChartAliasesBySpec(charts: readonly ChartSpec[]) { return cy.wrap(aliases); } -export function getChartGridComponent({ name, viz }: ChartSpec) { - return cy - .get(`[data-test-chart-name="${name}"]`) - .should('have.attr', 'data-test-viz-type', viz); -} - export function waitForChartLoad(chart: ChartSpec) { return getChartGridComponent(chart).then(gridComponent => { const chartId = gridComponent.attr('data-test-chart-id'); diff --git a/superset-frontend/cypress-base/cypress/utils/vizPlugins.ts b/superset-frontend/cypress-base/cypress/utils/vizPlugins.ts index 36a837476c396..c67da1afd5fd5 100644 --- a/superset-frontend/cypress-base/cypress/utils/vizPlugins.ts +++ b/superset-frontend/cypress-base/cypress/utils/vizPlugins.ts @@ -49,6 +49,7 @@ export function isLegacyChart(vizType: string): boolean { return !V1_PLUGINS.includes(vizType); } +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function isLegacyResponse(response: any): boolean { return !response.result; } diff --git a/superset-frontend/js_build.sh b/superset-frontend/js_build.sh index f664ffd59b371..cbd994dd51ea1 100755 --- a/superset-frontend/js_build.sh +++ b/superset-frontend/js_build.sh @@ -21,5 +21,6 @@ npm --version node --version time npm ci time npm run lint +time npm run check time npm run cover # this also runs the tests, so no need to 'npm run test' time npm run build diff --git a/superset-frontend/package.json b/superset-frontend/package.json index 8abd9dd955401..982eecd7f7922 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -37,7 +37,7 @@ "src/setup/*" ], "scripts": { - "_lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,tsx .", + "_lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,tsx", "_prettier": "prettier './({src,spec,cypress-base,plugins,packages,.storybook}/**/*{.js,.jsx,.ts,.tsx,.css,.less,.scss,.sass}|package.json)'", "build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production BABEL_ENV=\"${BABEL_ENV:=production}\" webpack --mode=production --color", "build-dev": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=development webpack --mode=development --color", @@ -51,8 +51,9 @@ "dev": "webpack --mode=development --color --watch", "dev-server": "cross-env NODE_ENV=development BABEL_ENV=development node --max_old_space_size=4096 ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode=development", "format": "npm run _prettier -- --write", - "lint": "npm run _lint && npm run type", - "lint-fix": "npm run _lint -- --fix && npm run type", + "lint": "npm run _lint -- .", + "lint-fix": "npm run _lint -- --fix", + "lint-file": "npm run _lint", "plugins:build": "node ./scripts/build.js", "plugins:build-assets": "node ./scripts/copyAssets.js", "plugins:build-storybook": "cd packages/superset-ui-demo && npm run build-storybook", diff --git a/superset-frontend/scripts/build.js b/superset-frontend/scripts/build.js index 0c327e8c50a3b..068aa01ef10ef 100644 --- a/superset-frontend/scripts/build.js +++ b/superset-frontend/scripts/build.js @@ -107,6 +107,7 @@ let scope = getPackages(glob); if (shouldLint) { run(`npm run lint --fix {packages,plugins}/${scope}/{src,test}`); + run(`npm run type`); } if (shouldCleanup) { From e105447471d20806dd89b83206e608bbf2d432b0 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sat, 20 Jan 2024 13:54:35 -0800 Subject: [PATCH 2/7] backward compatible npm run lint-fix --- superset-frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/package.json b/superset-frontend/package.json index 982eecd7f7922..26fb76aeb8245 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -52,7 +52,7 @@ "dev-server": "cross-env NODE_ENV=development BABEL_ENV=development node --max_old_space_size=4096 ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode=development", "format": "npm run _prettier -- --write", "lint": "npm run _lint -- .", - "lint-fix": "npm run _lint -- --fix", + "lint-fix": "npm run _lint . -- --fix", "lint-file": "npm run _lint", "plugins:build": "node ./scripts/build.js", "plugins:build-assets": "node ./scripts/copyAssets.js", From a254231e95aee2b68d694060021f2fe2e7bcc2fb Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sat, 20 Jan 2024 14:16:36 -0800 Subject: [PATCH 3/7] chore: improve/decouple eslint and tsc 'npm run' commands --- .github/workflows/superset-frontend.yml | 2 +- .github/workflows/superset-websocket.yml | 4 +-- CONTRIBUTING.md | 4 +-- .../cypress/e2e/dashboard/drillby.test.ts | 1 - .../cypress/e2e/dashboard/editmode.test.ts | 1 - .../cypress-base/cypress/utils/index.ts | 29 ++++++++----------- .../cypress-base/cypress/utils/vizPlugins.ts | 1 - superset-frontend/package.json | 7 ++--- superset-frontend/scripts/build.js | 1 - 9 files changed, 20 insertions(+), 30 deletions(-) diff --git a/.github/workflows/superset-frontend.yml b/.github/workflows/superset-frontend.yml index 047d07bd8ad7b..5054401b799c4 100644 --- a/.github/workflows/superset-frontend.yml +++ b/.github/workflows/superset-frontend.yml @@ -40,7 +40,7 @@ jobs: if: steps.check.outcome == 'failure' working-directory: ./superset-frontend run: | - npm run lint -- --quiet + npm run eslint -- . --quiet npm run type npm run prettier-check - name: Build plugins packages diff --git a/.github/workflows/superset-websocket.yml b/.github/workflows/superset-websocket.yml index 84df2c5010d62..4a330378cb53a 100644 --- a/.github/workflows/superset-websocket.yml +++ b/.github/workflows/superset-websocket.yml @@ -18,9 +18,9 @@ jobs: - name: Install dependencies working-directory: ./superset-websocket run: npm ci - - name: lint + - name: eslint working-directory: ./superset-websocket - run: npm run lint + run: npm run eslint -- . - name: typescript checks working-directory: ./superset-websocket run: npm run type diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5f72458d71a08..e95a766dc716b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -789,8 +789,8 @@ is configured as a pre-commit hook. There are also numerous [editor integrations cd superset-frontend npm ci # run eslint checks -npm run lint -# run tsc checks +npm run eslint -- . +# run tsc (typescript) checks npm run type ``` diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts index 50dd7180cf488..c365f66b4a463 100644 --- a/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts +++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts @@ -77,7 +77,6 @@ const drillBy = (targetDrillByColumn: string, isLegacy = false) => { const verifyExpectedFormData = ( interceptedRequest: Interception, - // eslint-disable-next-line @typescript-eslint/no-explicit-any expectedFormData: Record, ) => { const actualFormData = interceptedRequest.request.body?.form_data; diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts index 228fa1ec0a5c0..62bab84d1b85c 100644 --- a/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts +++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts @@ -88,7 +88,6 @@ function visitEdit(sampleDashboard = SAMPLE_DASHBOARD_1) { } function resetTabbedDashboard(go = false) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any cy.getDashboard('tabbed_dash').then((r: Record) => { const jsonMetadata = r?.json_metadata || '{}'; const metadata = JSON.parse(jsonMetadata); diff --git a/superset-frontend/cypress-base/cypress/utils/index.ts b/superset-frontend/cypress-base/cypress/utils/index.ts index 3ad7f7bb82bcd..2f06efc22c25e 100644 --- a/superset-frontend/cypress-base/cypress/utils/index.ts +++ b/superset-frontend/cypress-base/cypress/utils/index.ts @@ -41,23 +41,12 @@ export function clearAllInputs() { }); } -const toSlicelike = ($chart: JQuery): Slice => { - const chartId = $chart.attr('data-test-chart-id'); - const vizType = $chart.attr('data-test-viz-type'); - - return { - slice_id: chartId ? parseInt(chartId, 10) : null, - form_data: { - viz_type: vizType || null, - }, - }; -}; - -export function getChartGridComponent({ name, viz }: ChartSpec) { - return cy - .get(`[data-test-chart-name="${name}"]`) - .should('have.attr', 'data-test-viz-type', viz); -} +const toSlicelike = ($chart: JQuery): Slice => ({ + slice_id: parseInt($chart.attr('data-test-chart-id')!, 10), + form_data: { + viz_type: $chart.attr('data-test-viz-type')!, + }, +}); export function getChartAliasBySpec(chart: ChartSpec) { return getChartGridComponent(chart).then($chart => @@ -78,6 +67,12 @@ export function getChartAliasesBySpec(charts: readonly ChartSpec[]) { return cy.wrap(aliases); } +export function getChartGridComponent({ name, viz }: ChartSpec) { + return cy + .get(`[data-test-chart-name="${name}"]`) + .should('have.attr', 'data-test-viz-type', viz); +} + export function waitForChartLoad(chart: ChartSpec) { return getChartGridComponent(chart).then(gridComponent => { const chartId = gridComponent.attr('data-test-chart-id'); diff --git a/superset-frontend/cypress-base/cypress/utils/vizPlugins.ts b/superset-frontend/cypress-base/cypress/utils/vizPlugins.ts index c67da1afd5fd5..36a837476c396 100644 --- a/superset-frontend/cypress-base/cypress/utils/vizPlugins.ts +++ b/superset-frontend/cypress-base/cypress/utils/vizPlugins.ts @@ -49,7 +49,6 @@ export function isLegacyChart(vizType: string): boolean { return !V1_PLUGINS.includes(vizType); } -// eslint-disable-next-line @typescript-eslint/no-explicit-any export function isLegacyResponse(response: any): boolean { return !response.result; } diff --git a/superset-frontend/package.json b/superset-frontend/package.json index 26fb76aeb8245..f3f3639861852 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -37,7 +37,7 @@ "src/setup/*" ], "scripts": { - "_lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,tsx", + "eslint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,tsx", "_prettier": "prettier './({src,spec,cypress-base,plugins,packages,.storybook}/**/*{.js,.jsx,.ts,.tsx,.css,.less,.scss,.sass}|package.json)'", "build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production BABEL_ENV=\"${BABEL_ENV:=production}\" webpack --mode=production --color", "build-dev": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=development webpack --mode=development --color", @@ -51,9 +51,8 @@ "dev": "webpack --mode=development --color --watch", "dev-server": "cross-env NODE_ENV=development BABEL_ENV=development node --max_old_space_size=4096 ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode=development", "format": "npm run _prettier -- --write", - "lint": "npm run _lint -- .", - "lint-fix": "npm run _lint . -- --fix", - "lint-file": "npm run _lint", + "lint": "npm run eslint -- . && npm run type", + "lint-fix": "npm run eslint -- . --fix", "plugins:build": "node ./scripts/build.js", "plugins:build-assets": "node ./scripts/copyAssets.js", "plugins:build-storybook": "cd packages/superset-ui-demo && npm run build-storybook", diff --git a/superset-frontend/scripts/build.js b/superset-frontend/scripts/build.js index 068aa01ef10ef..0c327e8c50a3b 100644 --- a/superset-frontend/scripts/build.js +++ b/superset-frontend/scripts/build.js @@ -107,7 +107,6 @@ let scope = getPackages(glob); if (shouldLint) { run(`npm run lint --fix {packages,plugins}/${scope}/{src,test}`); - run(`npm run type`); } if (shouldCleanup) { From bba1863e7214fc9c90699ad18015e27eb71447e4 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sat, 20 Jan 2024 14:23:49 -0800 Subject: [PATCH 4/7] breaking down the steps in CI --- .github/workflows/superset-frontend.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/superset-frontend.yml b/.github/workflows/superset-frontend.yml index 5054401b799c4..ae5e6045f8e9d 100644 --- a/.github/workflows/superset-frontend.yml +++ b/.github/workflows/superset-frontend.yml @@ -36,12 +36,20 @@ jobs: uses: ./.github/actions/cached-dependencies with: run: npm-install - - name: lint + - name: eslint if: steps.check.outcome == 'failure' working-directory: ./superset-frontend run: | npm run eslint -- . --quiet + - name: tsc + if: steps.check.outcome == 'failure' + working-directory: ./superset-frontend + run: | npm run type + - name: prettier + if: steps.check.outcome == 'failure' + working-directory: ./superset-frontend + run: | npm run prettier-check - name: Build plugins packages if: steps.check.outcome == 'failure' From 7babe8c6b91a55d8c51fdc05995da2298e9ae333 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sat, 20 Jan 2024 14:27:17 -0800 Subject: [PATCH 5/7] fix --- docs/docs/contributing/hooks-and-linting.mdx | 2 +- superset-frontend/cypress-base/cypress/support/e2e.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/docs/contributing/hooks-and-linting.mdx b/docs/docs/contributing/hooks-and-linting.mdx index b26701a0f1882..68c9d28ca00b8 100644 --- a/docs/docs/contributing/hooks-and-linting.mdx +++ b/docs/docs/contributing/hooks-and-linting.mdx @@ -50,7 +50,7 @@ is configured as a pre-commit hook. There are also numerous [editor integrations cd superset-frontend npm ci # run eslint checks -npm run lint +npm run eslint -- . # run tsc (typescript) checks npm run type ``` diff --git a/superset-frontend/cypress-base/cypress/support/e2e.ts b/superset-frontend/cypress-base/cypress/support/e2e.ts index 6556d8e5eb92b..cccc7b2005737 100644 --- a/superset-frontend/cypress-base/cypress/support/e2e.ts +++ b/superset-frontend/cypress-base/cypress/support/e2e.ts @@ -20,8 +20,6 @@ import '@cypress/code-coverage/support'; import '@applitools/eyes-cypress/commands'; import failOnConsoleError from 'cypress-fail-on-console-error'; -/* eslint-disable @typescript-eslint/no-explicit-any */ - require('cy-verify-downloads').addCustomCommand(); // fail on console error, allow config to override individual tests From d2bdf184da88b78c5f2c872379e56138712752e8 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sat, 20 Jan 2024 14:35:47 -0800 Subject: [PATCH 6/7] touchups --- superset-frontend/js_build.sh | 2 +- superset-frontend/scripts/build.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/superset-frontend/js_build.sh b/superset-frontend/js_build.sh index cbd994dd51ea1..b140589da71ea 100755 --- a/superset-frontend/js_build.sh +++ b/superset-frontend/js_build.sh @@ -20,7 +20,7 @@ cd "$(dirname "$0")" npm --version node --version time npm ci -time npm run lint +time npm run eslint -- . time npm run check time npm run cover # this also runs the tests, so no need to 'npm run test' time npm run build diff --git a/superset-frontend/scripts/build.js b/superset-frontend/scripts/build.js index 0c327e8c50a3b..dcdce26b83683 100644 --- a/superset-frontend/scripts/build.js +++ b/superset-frontend/scripts/build.js @@ -106,7 +106,7 @@ function getPackages(packagePattern, tsOnly = false) { let scope = getPackages(glob); if (shouldLint) { - run(`npm run lint --fix {packages,plugins}/${scope}/{src,test}`); + run(`npm run eslint -- . --fix {packages,plugins}/${scope}/{src,test}`); } if (shouldCleanup) { From b2215e4172e0cebca6af0934eaa877fd98cafb3d Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sat, 20 Jan 2024 22:54:28 -0800 Subject: [PATCH 7/7] wot --- superset-frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/package.json b/superset-frontend/package.json index f3f3639861852..abe7d1a65d316 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -37,7 +37,6 @@ "src/setup/*" ], "scripts": { - "eslint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,tsx", "_prettier": "prettier './({src,spec,cypress-base,plugins,packages,.storybook}/**/*{.js,.jsx,.ts,.tsx,.css,.less,.scss,.sass}|package.json)'", "build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production BABEL_ENV=\"${BABEL_ENV:=production}\" webpack --mode=production --color", "build-dev": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=development webpack --mode=development --color", @@ -50,6 +49,7 @@ "cover": "cross-env NODE_ENV=test jest --coverage", "dev": "webpack --mode=development --color --watch", "dev-server": "cross-env NODE_ENV=development BABEL_ENV=development node --max_old_space_size=4096 ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode=development", + "eslint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,tsx", "format": "npm run _prettier -- --write", "lint": "npm run eslint -- . && npm run type", "lint-fix": "npm run eslint -- . --fix",