Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

Commit

Permalink
chore: enable eslint-import-resolver-typescript (apache#10895)
Browse files Browse the repository at this point in the history
Let eslint understand tsconfig.json when importing modules, so we
can use `compilerOption.paths` to override where to find ts modules.
  • Loading branch information
ktmud authored Sep 15, 2020
1 parent c43992b commit 4eeee4c
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 1 deletion.
5 changes: 4 additions & 1 deletion superset-frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ module.exports = {
'prettier/prettier': 'error',
},
settings: {
'import/resolver': 'webpack',
'import/resolver': {
webpack: {},
typescript: {},
},
react: {
version: 'detect',
},
Expand Down
53 changes: 53 additions & 0 deletions superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions superset-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"eslint": "^7.8.1",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-import-resolver-typescript": "^2.3.0",
"eslint-import-resolver-webpack": "^0.12.2",
"eslint-plugin-cypress": "^2.11.1",
"eslint-plugin-import": "^2.22.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default class TextAreaControl extends React.Component {
this.onAceChange(value);
}, 300);
}

onControlChange(event) {
this.props.onChange(event.target.value);
}
Expand Down
1 change: 1 addition & 0 deletions superset-frontend/src/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export type FeatureFlagMap = {
[key in FeatureFlag]?: boolean;
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
declare global {
interface Window {
featureFlags: FeatureFlagMap;
Expand Down

0 comments on commit 4eeee4c

Please sign in to comment.