From c61aefe4af2dc2b8059531a1a060070933ef78c9 Mon Sep 17 00:00:00 2001 From: Yongjie Zhao Date: Mon, 27 Dec 2021 17:01:08 +0800 Subject: [PATCH] remove unused lint --- superset-frontend/.eslintrc.js | 43 +--- superset-frontend/.prettierignore | 1 + .../cypress-base/cypress/plugins/index.js | 1 + superset-frontend/package-lock.json | 200 ++---------------- superset-frontend/package.json | 2 - 5 files changed, 23 insertions(+), 224 deletions(-) diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js index 9ef616a35a917..c35483cda0af7 100644 --- a/superset-frontend/.eslintrc.js +++ b/superset-frontend/.eslintrc.js @@ -16,7 +16,6 @@ * specific language governing permissions and limitations * under the License. */ - const packageConfig = require('./package'); const importCoreModules = []; @@ -52,12 +51,13 @@ module.exports = { }, env: { browser: true, + node: true, }, settings: { 'import/resolver': { - webpack: {}, node: { extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'], + moduleDirectory: ['node_modules', '.'], }, }, // Allow only core/src and core/test, avoid import modules from lib @@ -69,24 +69,6 @@ module.exports = { }, plugins: ['prettier', 'react', 'file-progress'], overrides: [ - { - files: ['cypress-base/**/*'], - rules: { - 'import/no-unresolved': 0, - 'global-require': 0, - }, - }, - { - files: ['webpack*.js'], - env: { - node: true, - }, - settings: { - 'import/resolver': { - node: {}, - }, - }, - }, { files: ['*.ts', '*.tsx'], parser: '@typescript-eslint/parser', @@ -160,7 +142,6 @@ module.exports = { }, settings: { 'import/resolver': { - webpack: {}, typescript: {}, }, react: { @@ -168,17 +149,6 @@ module.exports = { }, }, }, - { - files: ['*.stories.jsx', '*.stories.tsx'], - rules: { - // this is to keep eslint from complaining about storybook addons, - // since they are included as dev dependencies rather than direct dependencies. - 'import/no-extraneous-dependencies': [ - 'error', - { devDependencies: true }, - ], - }, - }, { files: [ '*.test.ts', @@ -221,15 +191,6 @@ module.exports = { 'jest-dom/prefer-to-have-style': 0, }, }, - { - files: './packages/generator-superset/**/*.test.*', - env: { - node: true, - }, - rules: { - 'jest/expect-expect': 0, - }, - }, ], rules: { camelcase: [ diff --git a/superset-frontend/.prettierignore b/superset-frontend/.prettierignore index 95c0127208d49..70521871e99b1 100644 --- a/superset-frontend/.prettierignore +++ b/superset-frontend/.prettierignore @@ -25,3 +25,4 @@ CHANGELOG.md *.geojson *-topo.json temporary_superset_ui/ +storybook-static/ diff --git a/superset-frontend/cypress-base/cypress/plugins/index.js b/superset-frontend/cypress-base/cypress/plugins/index.js index 4df323f823748..7fd557a0f3d49 100644 --- a/superset-frontend/cypress-base/cypress/plugins/index.js +++ b/superset-frontend/cypress-base/cypress/plugins/index.js @@ -20,6 +20,7 @@ // the project's config changing) module.exports = (on, config) => { + // eslint-disable-next-line global-require require('@cypress/code-coverage/task')(on, config); return config; }; diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index 7d025c8230f64..178175599a0c2 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -216,7 +216,6 @@ "eslint-config-airbnb": "^18.2.1", "eslint-config-prettier": "^7.1.0", "eslint-import-resolver-typescript": "^2.5.0", - "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-cypress": "^2.11.2", "eslint-plugin-file-progress": "^1.2.0", "eslint-plugin-import": "^2.24.2", @@ -230,7 +229,6 @@ "eslint-plugin-testing-library": "^3.10.1", "exports-loader": "^0.7.0", "fetch-mock": "^7.7.3", - "file-loader": "^6.0.0", "fork-ts-checker-webpack-plugin": "^6.3.3", "ignore-styles": "^5.0.1", "imports-loader": "^3.0.0", @@ -24377,12 +24375,6 @@ "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=", "dev": true }, - "node_modules/array-find": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz", - "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=", - "dev": true - }, "node_modules/array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -31901,20 +31893,6 @@ "objectorarray": "^1.0.5" } }, - "node_modules/enhanced-resolve": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", - "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.2.0", - "tapable": "^0.1.8" - }, - "engines": { - "node": ">=0.6" - } - }, "node_modules/enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -32658,65 +32636,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/eslint-import-resolver-webpack": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.2.tgz", - "integrity": "sha512-XodIPyg1OgE2h5BDErz3WJoK7lawxKTJNhgPNafRST6csC/MZC+L5P6kKqsZGRInpbgc02s/WZMrb4uGJzcuRg==", - "dev": true, - "dependencies": { - "array-find": "^1.0.0", - "debug": "^3.2.7", - "enhanced-resolve": "^0.9.1", - "find-root": "^1.1.0", - "has": "^1.0.3", - "interpret": "^1.4.0", - "is-core-module": "^2.7.0", - "is-regex": "^1.1.4", - "lodash": "^4.17.21", - "resolve": "^1.20.0", - "semver": "^5.7.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "eslint-plugin-import": ">=1.4.0", - "webpack": ">=1.11.0" - } - }, - "node_modules/eslint-import-resolver-webpack/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-import-resolver-webpack/node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/eslint-import-resolver-webpack/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/eslint-import-resolver-webpack/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/eslint-module-utils": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", @@ -34333,7 +34252,8 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.0.0.tgz", "integrity": "sha512-/aMOAYEFXDdjG0wytpTL5YQLfZnnTmLNjn+AIrJ/6HVnTfDqLsVKUUwkDf4I4kgex36BvjuXEn/TX9B/1ESyqQ==", - "devOptional": true, + "optional": true, + "peer": true, "dependencies": { "loader-utils": "^2.0.0", "schema-utils": "^2.6.5" @@ -34353,7 +34273,8 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", - "devOptional": true, + "optional": true, + "peer": true, "dependencies": { "minimist": "^1.2.5" }, @@ -34368,7 +34289,8 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "devOptional": true, + "optional": true, + "peer": true, "dependencies": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -34382,7 +34304,8 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", - "devOptional": true, + "optional": true, + "peer": true, "dependencies": { "@types/json-schema": "^7.0.4", "ajv": "^6.12.2", @@ -43896,12 +43819,6 @@ "map-or-similar": "^1.5.0" } }, - "node_modules/memory-fs": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", - "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", - "dev": true - }, "node_modules/meow": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", @@ -54080,15 +53997,6 @@ "minimist": "^1.1.0" } }, - "node_modules/tapable": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", - "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/tar": { "version": "4.4.19", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", @@ -61004,6 +60912,9 @@ "react": "^16.3.0-0" } }, + "spec": { + "extraneous": true + }, "src": { "version": "0.0.1", "extraneous": true @@ -80430,12 +80341,6 @@ "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=", "dev": true }, - "array-find": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz", - "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=", - "dev": true - }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -86337,17 +86242,6 @@ "objectorarray": "^1.0.5" } }, - "enhanced-resolve": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", - "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.2.0", - "tapable": "^0.1.8" - } - }, "enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -87107,54 +87001,6 @@ } } }, - "eslint-import-resolver-webpack": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.2.tgz", - "integrity": "sha512-XodIPyg1OgE2h5BDErz3WJoK7lawxKTJNhgPNafRST6csC/MZC+L5P6kKqsZGRInpbgc02s/WZMrb4uGJzcuRg==", - "dev": true, - "requires": { - "array-find": "^1.0.0", - "debug": "^3.2.7", - "enhanced-resolve": "^0.9.1", - "find-root": "^1.1.0", - "has": "^1.0.3", - "interpret": "^1.4.0", - "is-core-module": "^2.7.0", - "is-regex": "^1.1.4", - "lodash": "^4.17.21", - "resolve": "^1.20.0", - "semver": "^5.7.1" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, "eslint-module-utils": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", @@ -88201,7 +88047,8 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.0.0.tgz", "integrity": "sha512-/aMOAYEFXDdjG0wytpTL5YQLfZnnTmLNjn+AIrJ/6HVnTfDqLsVKUUwkDf4I4kgex36BvjuXEn/TX9B/1ESyqQ==", - "devOptional": true, + "optional": true, + "peer": true, "requires": { "loader-utils": "^2.0.0", "schema-utils": "^2.6.5" @@ -88211,7 +88058,8 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", - "devOptional": true, + "optional": true, + "peer": true, "requires": { "minimist": "^1.2.5" } @@ -88220,7 +88068,8 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "devOptional": true, + "optional": true, + "peer": true, "requires": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -88231,7 +88080,8 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", - "devOptional": true, + "optional": true, + "peer": true, "requires": { "@types/json-schema": "^7.0.4", "ajv": "^6.12.2", @@ -95586,12 +95436,6 @@ "map-or-similar": "^1.5.0" } }, - "memory-fs": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", - "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", - "dev": true - }, "meow": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", @@ -103652,12 +103496,6 @@ "minimist": "^1.1.0" } }, - "tapable": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", - "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", - "dev": true - }, "tar": { "version": "4.4.19", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", diff --git a/superset-frontend/package.json b/superset-frontend/package.json index 76a832e8d1efd..a8390b6dddb9f 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -276,7 +276,6 @@ "eslint-config-airbnb": "^18.2.1", "eslint-config-prettier": "^7.1.0", "eslint-import-resolver-typescript": "^2.5.0", - "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-cypress": "^2.11.2", "eslint-plugin-file-progress": "^1.2.0", "eslint-plugin-import": "^2.24.2", @@ -290,7 +289,6 @@ "eslint-plugin-testing-library": "^3.10.1", "exports-loader": "^0.7.0", "fetch-mock": "^7.7.3", - "file-loader": "^6.0.0", "fork-ts-checker-webpack-plugin": "^6.3.3", "ignore-styles": "^5.0.1", "imports-loader": "^3.0.0",