Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unused eslintrc #17860

Merged
merged 4 commits into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 11 additions & 61 deletions superset-frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/

const packageConfig = require('./package');

const importCoreModules = [];
Expand All @@ -26,7 +25,7 @@ Object.entries(packageConfig.dependencies).forEach(([pkg]) => {
}
});

// ignore files when running ForkTsCheckerWebpackPlugin
// ignore files in production mode
let ignorePatterns = [];
if (process.env.NODE_ENV === 'production') {
ignorePatterns = [
Expand All @@ -52,12 +51,14 @@ module.exports = {
},
env: {
browser: true,
node: true,
},
settings: {
'import/resolver': {
webpack: {},
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
// resolve modules from `/superset_frontend/node_modules` and `/superset_frontend`
moduleDirectory: ['node_modules', '.'],
},
},
// Allow only core/src and core/test, avoid import modules from lib
Expand All @@ -69,24 +70,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',
Expand Down Expand Up @@ -136,24 +119,6 @@ module.exports = {
'no-nested-ternary': 0,
'no-prototype-builtins': 0,
'no-restricted-properties': 0,
'no-restricted-imports': [
'warn',
{
paths: [
{
name: 'antd',
message:
'Please import Ant components from the index of common/components',
},
{
name: '@superset-ui/core',
importNames: ['supersetTheme'],
message:
'Please use the theme directly from the ThemeProvider rather than importing supersetTheme.',
},
],
},
],
'no-shadow': 0, // re-enable up for discussion
'no-use-before-define': 0, // disabled temporarily
'padded-blocks': 0,
Expand All @@ -178,25 +143,13 @@ module.exports = {
},
settings: {
'import/resolver': {
webpack: {},
typescript: {},
},
react: {
version: 'detect',
},
},
},
{
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',
Expand Down Expand Up @@ -239,15 +192,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: [
Expand Down Expand Up @@ -287,14 +231,20 @@ module.exports = {
'no-prototype-builtins': 0,
'no-restricted-properties': 0,
'no-restricted-imports': [
'error',
'warn',
{
paths: [
{
name: 'antd',
message:
'Please import Ant components from the index of common/components',
},
{
name: '@superset-ui/core',
importNames: ['supersetTheme'],
message:
'Please use the theme directly from the ThemeProvider rather than importing supersetTheme.',
},
],
},
],
Expand Down
1 change: 1 addition & 0 deletions superset-frontend/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ CHANGELOG.md
*.geojson
*-topo.json
temporary_superset_ui/
storybook-static/
1 change: 1 addition & 0 deletions superset-frontend/cypress-base/cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Loading