Skip to content

Commit

Permalink
chore: fix end-of-file (apache#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 committed Nov 25, 2021
1 parent c3f1fbb commit 062c4b0
Show file tree
Hide file tree
Showing 128 changed files with 1,437 additions and 61 deletions.
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 superset-frontend/temporary_superset_ui/superset-ui/.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
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
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.
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
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
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
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
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
"path": ".."
}
]
}
}
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
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
"path": ".."
}
]
}
}
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"path": "../superset-ui-core"
}
]
}
}
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
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
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
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
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
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

0 comments on commit 062c4b0

Please sign in to comment.