Commit Graph

51 Commits

Author SHA1 Message Date
Yongjie Zhao d8d47ce054
chore: reenable lint for test files (#17979)
* chore: reenable lint for test files

* fix comments
2022-01-11 14:22:56 +08:00
Yongjie Zhao cb97e37a92
refactor: import value name from root of superset-ui/core (#17947)
* chart

* index and number-format

* char-composition and color

* connection

* dimension and math-expression

* models

* query

* time-format

* residual modules

* change config of jest and eslint

config

* wip

update package.json

* fix lint

* WithLegend import from superset-ui/core
2022-01-08 09:16:24 +08:00
Yongjie Zhao ceecc7047b
chore: remove unused eslintrc (#17860)
* chore: remove unused eslintrc

* remove unused lint

* add comments

* change comments
2022-01-05 19:31:12 +08:00
Yongjie Zhao 3c41ff68a4
refactor(monorepo): move superset-ui to superset(stage 2) (#17552) 2021-11-30 08:29:57 +08:00
Yongjie Zhao 9070b6b19c
refactor(monorepo): stage 1 (#17427)
* skip geojson in pre-commit

update prettier

* update package.json

update package.json

u package

pkg

pkg2

* lint main repo 2

lint main repo

lint

* lintrc

lintrc 2

lintrc2

lintrc 3

lintrc

* fix import

* refresh lock file

* fix break line make @ts-ignore invalid

* update rat-excludes

rat-excludes

update rat-excludes

* update eslintrc.js

* lint lint lint
2021-11-17 15:31:36 +08:00
Yongjie Zhao b58f94ad2e
chore: bump @typescript-eslint/eslint-plugin to 5.3.0 (#17367) 2021-11-08 23:48:51 +08:00
Evan Rusackas 5f73ca85d5
feat(linting): restrict direct use of supersetTheme in favor of ThemeProvider (#17001)
* feat: restrict direct use of supersetTheme

* allowing a couple of safe instances of supersetTheme
2021-10-07 08:26:57 -06:00
David Aaron Suddjian 1cd0124fd5
chore: upgrade babel (#16885)
* upgrade babel versions

* upgrade babel eslint parser

* fix test
2021-10-05 15:02:57 -07:00
Michael S. Molina 1ab36c94f3
chore: Moves spec files to the src folder - iteration 7 (#16943) 2021-10-04 10:56:49 -03:00
Jesse Yang 3c62069bbb
refactor(explore): convert ControlPanelsContainer to typescript (#13221) 2021-02-28 10:10:15 -08:00
Michael S. Molina 42ab57850d
Migrate Bootstrap Alert to AntD (#12101) (#12122) 2021-02-21 20:50:18 -08:00
Michael S. Molina 86807e40b7
Improves RTL configuration (#13079)
- Adds plugin:jest-dom/recommended to ESLint plugins list to enforce tests best practices

- Moves import @testing-library/jest-dom/extend-expect; from setup.ts to testing-library.tsx to avoid matchers collision

- Adds @testing-library/user-event to help simulate users events
2021-02-11 15:32:22 -08:00
Jesse Yang 9acf48fd1e
chore: upgrade eslint, babel, and prettier (#12393) 2021-01-10 17:26:35 -08:00
Evan Rusackas 38b720b0a7
style: eslint curly rule (#11913)
* style: eslint curly rule

* curly for ts
2020-12-03 10:20:05 -08:00
Nikola Gigić 721f9119e1
chore: Enable jsx-a11y/anchor-is-valid (#11891)
* Enabling ancor-is-valid

* Remove comments since no longer applies
2020-12-02 10:14:56 -08:00
Jesse Yang a5af2ade0a
test: add React Testing Library (#11771) 2020-12-01 11:14:37 -08:00
Kamil Gabryjelski 07f87149e6
fix: Enable ESLint rule default-props-match-prop-types (#11058)
* Re-enable ESLint rule default-props-match-props-types

* Add cypress test for switching tabs

* fix

* Typo fix

* Test fix
2020-10-02 15:54:56 -07:00
Grace Guo f99753a800
Revert "ESLint: Re-enable rule default-props-match-prop-types (#10868)" (#11050)
This reverts commit 9f01a7fdf8.
2020-09-24 12:33:38 -07:00
Jesse Yang 220c410df4
build: add react-hooks linting (#11006)
Fixed a couple of criticle errors and left the warnings as is (mostly
from react-hooks/exhaustive-deps).

Let's fix the warnings in future PRs as sometimes unexhaustive deps
are intentional.
2020-09-22 15:09:22 -07:00
Kamil Gabryjelski 9f01a7fdf8
ESLint: Re-enable rule default-props-match-prop-types (#10868)
* Re-enable rule default-props-match-prop-types

* Restore default props and remove isRequired

* Remove unused props
2020-09-22 13:17:41 -07:00
Kamil Gabryjelski 4835d3b0a2
ESLint: Re-enable rule no-access-state-in-setstate (#10870)
* Re-enable rule no-access-state-in-setstate

* Move accessing event values out of async functions
2020-09-20 23:48:23 -07:00
Kamil Gabryjelski 557a303cc5
ESLint: Enable rule no-named-as-default (#10879)
* Enable rule no-named-as-default

* Fix wrong import
2020-09-18 13:41:01 -07:00
Kamil Gabryjelski ccfd293227
ESLint: no-restricted-syntax (#10889)
* Enable no-restricted syntax rule

* Fix webpack.config.js

* Remove unused function from utils/common.js

* Refactor triple nested for loop

* Fix loops in src/explore components

* Fix loops in SqlLab components

* Fix loops in AlteredSliceTag

* Fix loops in FilterableTable

* Add fixtures and uinit tests for findControlItem

* Add license
2020-09-18 09:05:57 -07:00
Kamil Gabryjelski 281305e0cf
Enable anchor-has-content rule (#10908) 2020-09-16 13:27:52 -07:00
Jesse Yang d4291edffa
build: optimize eslint import resolver configs (#10901)
Use `node` resolver and `node` env for `webpack.config.js`, use
`webpack` resolver only for `src`.
2020-09-16 09:26:14 -07:00
Jesse Yang 4eeee4c2eb
chore: enable eslint-import-resolver-typescript (#10895)
Let eslint understand tsconfig.json when importing modules, so we
can use `compilerOption.paths` to override where to find ts modules.
2020-09-15 15:33:49 -07:00
Kamil Gabryjelski 01f90107e1
ESLint: Re-enable rule no-unused-vars (#10865)
* Re-enable rule no-unused-vars

* fixup! Re-enable rule no-unused-vars
2020-09-14 15:42:06 -07:00
Kamil Gabryjelski e28f3d6220
Re-enable rule line-between-class-members (#10862) 2020-09-14 15:41:32 -07:00
Kamil Gabryjelski 91b8c8afc9
Re-enable rule state-in-constructor (#10873) 2020-09-14 13:31:11 -07:00
Kamil Gabryjelski 767044bfe5
ESLint: Re-enable rule control-has-associated-label (#10866)
* Re-enable rule control-has-associated-label

* Change aria-label message in DatasourceControl

Co-authored-by: Evan Rusackas <evan@preset.io>

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-09-14 13:00:39 -07:00
Kamil Gabryjelski 2d8f4e3aaf
Re-enable rule no-else-return (#10861) 2020-09-14 13:00:07 -07:00
Kamil Gabryjelski 76275ec410
Enable rule no-plusplus (#10876) 2020-09-14 11:59:32 -07:00
Kamil Gabryjelski d93b2b99b2
Re-enable rule sort-comp (#10872) 2020-09-14 10:45:05 -07:00
Kamil Gabryjelski a75c36281d
Re-enable rule jsx-curly-brace-presence (#10869) 2020-09-14 10:44:03 -07:00
Kamil Gabryjelski c5193ca018
Re-enable rule no-non-null-assertion (#10864) 2020-09-14 10:40:20 -07:00
Kamil Gabryjelski 1908a94c7e
ESLint: Re-enable rule no-restricted-globals (#10863)
* Re-enable rule no-restricted-globals

* Fix missing semicolons
2020-09-14 10:39:46 -07:00
Kamil Gabryjelski 7f1012360a
Re-enable no-useless-path-segments rule (#10860) 2020-09-14 10:38:18 -07:00
Kamil Gabryjelski 906a629b33
Re-enable rule no-unused-state (#10871) 2020-09-14 10:31:16 -07:00
Kamil Gabryjelski 352e8a1afd
Re-enable rule prefer-destructuring (only for objects) (#10867) 2020-09-14 10:11:20 -07:00
Kamil Gabryjelski c51168a30a
Re-enable no-confusing-arrow rule (#10874) 2020-09-14 10:03:37 -07:00
Kamil Gabryjelski 8a774d59ed
Eslint dependencies versions updates (#10839)
* Update eslint version to 7.8.1

* Give names to unnamed functions  to fix lint errors

* Update eslint-import-resolver-webpack

* Update eslint-plugin-cypress

* Add eslint-plugin-react-hooks

* Update necessary peer dependencies for eslint-config-airbnb

* Update eslint airbnb config and ts plugins

* Remove "this" from functional component

* Disable all rules that cause new errors

* Fix linting errors in tests

* Add licenses to .eslintrc files

* Add path and zlib to package.json

* Disable incompatible rule in eslint-plugin-cypress

* Remove redundant config for typescript linting

* Mark disabled rules with comments

* Remove path and zlib from deps, disable import rule for webpack files
2020-09-13 23:59:02 -07:00
ʈᵃᵢ b86c0e5727
feat(listview): skeleton loading states for table and card collections (#10606) 2020-08-21 10:32:37 -07:00
Evan Rusackas 878f06d133
feat: Getting fancier with Storybook (#10647)
* Niftier paddings

* upgrading storybook, fixing glob pattern

* moving a couple storybook dependencies to dev dependencies

* fixing annoying lint issue about dev dependencies needing to be dependencies

* adds essential addons, fixes backgrounds

* newline tweaks

* comment about no-extraneous-dependencies, higher specificity on that rule, other linting stuff

* a *python* linter doesn't like this whitespace?!

* putting the linespace back

* ugh, found the space causing CI issues... I think
2020-08-20 22:41:25 -07:00
Natalie Ruhe 51a88cb19b
feat: Add antd to the codebase (#10508) 2020-08-05 13:50:30 -07:00
Erik Ritter 5984df3522
chore: enable no-static-element-interactions eslint rule (#10351) 2020-07-17 09:19:16 -07:00
Erik Ritter 09de805017
chore: enable no-unused-vars and prefer-template eslint rules (#10350) 2020-07-16 19:13:59 -07:00
Jesse Yang d8de540e0c
[Build] Collect frontend code coverage from Cypress tests (#9555)
* build: collect code coverage from Cypress

Collect frontend code coverage reports from Cypress tests and add
proper tagging for all tests.

* Fix bash script lint error from shellcheck

* Revert Cypress to 4.3.0 to see if it fixes a failing test
2020-04-16 23:35:01 -07:00
Evan Rusackas 1cdfb829d7
Eslint prefer-object-spread (#9466)
* The rule.

* The result
2020-04-03 17:05:16 -07:00
Jianchao Yang c36a7e3ada
chore: allow webpack-dev-server proxy to any destination (#9296)
One of the pain points in developing Superset frontend code is the lack
of testing data. Local installation often do not have enough examples
setup to test all edge cases.

This change allows `webpack-dev-server` to proxy to any remote Superset
service, but the same time replaces frontend asset references in HTML
with links to local development version. This allows developers to test
with production data locally, tackling edge cases all while maintaining
the productivity of editing the code locally.
2020-03-17 15:37:07 -07:00
David Aaron Suddjian f6f40c815a
[Charts] Use the Edit Properties modal throughout React views (#9267)
* typescriptification

* use the chart edit modal on the react list view

* linting

* typings don't work on old react-bootstrap version

* lint

* remove duplicate field
2020-03-13 15:14:50 -07:00