Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
chore: fix end-of-file (#1468)
Browse files Browse the repository at this point in the history
* chore: end of file fixer

* compress image

* lint without build

* lintrc improvment

* exporting

* update parallel-coordinates tsconfig

* add license to md file

* add license

* add eslintignore
  • Loading branch information
zhaoyongjie authored Nov 15, 2021
1 parent 5928355 commit 0d9ff3b
Show file tree
Hide file tree
Showing 128 changed files with 1,437 additions and 61 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ esm/
lib/
tmp/
dist/
temporary-plugins/
temporary-plugins/
storybook-static/
40 changes: 39 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,38 @@ module.exports = {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
// Allow core/src and core/test, not import modules from lib
'import/internal-regex': /^@superset-ui\/core\/(src|test)/,
'import/core-modules': [
'@superset-ui/core',
'@superset-ui/chart-controls',
'@superset-ui/legacy-plugin-chart-calendar',
'@superset-ui/legacy-plugin-chart-chord',
'@superset-ui/legacy-plugin-chart-country-map',
'@superset-ui/legacy-plugin-chart-event-flow',
'@superset-ui/legacy-plugin-chart-force-directed',
'@superset-ui/legacy-plugin-chart-heatmap',
'@superset-ui/legacy-plugin-chart-histogram',
'@superset-ui/legacy-plugin-chart-horizon',
'@superset-ui/legacy-plugin-chart-map-box',
'@superset-ui/legacy-plugin-chart-paired-t-test',
'@superset-ui/legacy-plugin-chart-parallel-coordinates',
'@superset-ui/legacy-plugin-chart-partition',
'@superset-ui/legacy-plugin-chart-pivot-table',
'@superset-ui/legacy-plugin-chart-rose',
'@superset-ui/legacy-plugin-chart-sankey',
'@superset-ui/legacy-plugin-chart-sankey-loop',
'@superset-ui/legacy-plugin-chart-sunburst',
'@superset-ui/legacy-plugin-chart-time-table',
'@superset-ui/legacy-plugin-chart-treemap',
'@superset-ui/legacy-plugin-chart-world-map',
'@superset-ui/legacy-preset-chart-big-number',
'@superset-ui/legacy-preset-chart-nvd3',
'@superset-ui/plugin-chart-echarts',
'@superset-ui/plugin-chart-table',
'@superset-ui/plugin-chart-word-cloud',
'@superset-ui/preset-chart-xy',
],
react: {
version: 'detect',
},
Expand Down Expand Up @@ -215,7 +247,13 @@ module.exports = {
},
},
{
files: ['*.test.*', './**/test/**/*'],
files: [
'*.test.ts',
'*.test.tsx',
'*.test.js',
'*.test.jsx',
'fixtures.*',
],
plugins: ['jest', 'jest-dom', 'no-only-tests', 'testing-library'],
env: {
'jest/globals': true,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Build packages
run: npm run build
- name: Run ESLint
run: npm run lint --quiet
- name: Build packages
run: npm run build
- name: Run unit tests
run: npm run test
- name: Build Storybook
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx .",
"lint:fix": "eslint --fix --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx .",
"format": "npm run prettier",
"prettier": "prettier --write .",
"prettier": "prettier --write './{plugins,packages}/**/*{.js,.jsx,.ts,.tsx,.css,.less,.scss,.sass}'",
"test": "npm run jest",
"test:watch": "npm run lint:fix && npm run jest --watch",
"type": "npm run build --no-babel",
Expand Down
19 changes: 19 additions & 0 deletions packages/generator-superset/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# Change Log

All notable changes to this project will be documented in this file.
Expand Down
19 changes: 19 additions & 0 deletions packages/generator-superset/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# generator-superset

[![Version](https://img.shields.io/npm/v/@superset-ui/generator-superset.svg?style=flat)](https://www.npmjs.com/package/@superset-ui/generator-superset)
Expand Down
19 changes: 19 additions & 0 deletions packages/generator-superset/generators/package/templates/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## @superset-ui/<%= name %>

[![Version](https://img.shields.io/npm/v/@superset-ui/<%= name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ Then use it via `SuperChart`. See [storybook](https://apache-superset.github.io/
│   └── index.test.ts
└── types
└── external.d.ts
```
```
2 changes: 1 addition & 1 deletion packages/generator-superset/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
"path": ".."
}
]
}
}
19 changes: 19 additions & 0 deletions packages/superset-ui-chart-controls/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# Change Log

All notable changes to this project will be documented in this file.
Expand Down
19 changes: 19 additions & 0 deletions packages/superset-ui-chart-controls/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## @superset-ui/chart-controls

[![Version](https://img.shields.io/npm/v/@superset-ui/chart-controls.svg?style=flat)](https://www.npmjs.com/package/@superset-ui/chart-controls)
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart-controls/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export type TabOverride = 'data' | 'customize' | boolean;
* show a warning based on the value of another component. It's also possible to bind
* arbitrary data from the redux store to the component this way.
* - tabOverride: set to 'data' if you want to force a renderTrigger to show up on the `Data`
tab, or 'customize' if you want it to show up on that tam. Otherwise sections with ALL
tab, or 'customize' if you want it to show up on that tam. Otherwise sections with ALL
`renderTrigger: true` components will show up on the `Customize` tab.
* - visibility: a function that uses control panel props to check whether a control should
* be visibile.
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart-controls/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
"path": ".."
}
]
}
}
8 changes: 6 additions & 2 deletions packages/superset-ui-chart-controls/test/types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@
* under the License.
*/
import { AdhocColumn } from '@superset-ui/core';
import { isAdhocColumn, isColumnMeta, isSavedExpression } from '../src';
import { ColumnMeta } from '../lib';
import {
isAdhocColumn,
isColumnMeta,
isSavedExpression,
ColumnMeta,
} from '../src';

const ADHOC_COLUMN: AdhocColumn = {
hasCustomLabel: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart-controls/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"path": "../superset-ui-core"
}
]
}
}
19 changes: 19 additions & 0 deletions packages/superset-ui-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# Change Log

All notable changes to this project will be documented in this file.
Expand Down
19 changes: 19 additions & 0 deletions packages/superset-ui-core/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## @superset-ui/core

[![Version](https://img.shields.io/npm/v/@superset-ui/core.svg?style=flat)](https://www.npmjs.com/package/@superset-ui/core)
Expand Down
19 changes: 19 additions & 0 deletions packages/superset-ui-core/src/connection/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## @superset-ui/core/connection

Connection modules for Superset:
Expand Down
19 changes: 19 additions & 0 deletions packages/superset-ui-core/src/number-format/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## @superset-ui/core/number-format

Description
Expand Down
19 changes: 19 additions & 0 deletions packages/superset-ui-core/src/query/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## @superset-ui/core/query

Utility to make API requests to Superset backend.
Expand Down
19 changes: 19 additions & 0 deletions packages/superset-ui-core/src/query/getColumnLabel.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { isPhysicalColumn, QueryFormColumn } from './types';

export default function getColumnLabel(column: QueryFormColumn): string {
Expand Down
Loading

1 comment on commit 0d9ff3b

@vercel
Copy link

@vercel vercel bot commented on 0d9ff3b Nov 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.