From f6d3c5ca4f37b142842a6e6702a17bea16521122 Mon Sep 17 00:00:00 2001 From: Paul Marbach Date: Wed, 8 Apr 2020 12:03:25 -0400 Subject: [PATCH] test: update lint config to extend cli config explicitly for plugins --- packages/cli/templates/default-plugin/.eslintrc.js | 3 +++ .../ExampleFetchComponent.tsx.hbs | 1 - packages/core/.eslintrc.js | 10 +--------- plugins/home-page/.eslintrc.js | 3 +++ plugins/lighthouse/.eslintrc.js | 3 +++ .../src/components/AuditList/AuditListTable.tsx | 1 - .../src/components/AuditStatusIcon/index.tsx | 1 - .../src/components/CategoryTrendline/index.tsx | 1 - plugins/welcome/.eslintrc.js | 3 +++ 9 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 packages/cli/templates/default-plugin/.eslintrc.js create mode 100644 plugins/home-page/.eslintrc.js create mode 100644 plugins/lighthouse/.eslintrc.js create mode 100644 plugins/welcome/.eslintrc.js diff --git a/packages/cli/templates/default-plugin/.eslintrc.js b/packages/cli/templates/default-plugin/.eslintrc.js new file mode 100644 index 0000000000..dd47f29781 --- /dev/null +++ b/packages/cli/templates/default-plugin/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + extends: [require.resolve('@backstage/cli/config/eslint.js')], +}; diff --git a/packages/cli/templates/default-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs b/packages/cli/templates/default-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs index 3420cc9d5a..a198bfcc3f 100644 --- a/packages/cli/templates/default-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs +++ b/packages/cli/templates/default-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs @@ -1,4 +1,3 @@ -/* eslint-disable react/prop-types */ /* * Copyright 2020 Spotify AB * diff --git a/packages/core/.eslintrc.js b/packages/core/.eslintrc.js index c916fb4b8f..02b430e588 100644 --- a/packages/core/.eslintrc.js +++ b/packages/core/.eslintrc.js @@ -1,13 +1,5 @@ module.exports = { - overrides: [ - { - files: ['**/*.ts?(x)'], - rules: { - // TODO: add prop types and set to 1 - 'react/prop-types': 0, - }, - }, - ], + extends: [require.resolve('@backstage/cli/config/eslint.js')], rules: { // TODO: add prop types to JS and remove 'react/prop-types': 0, diff --git a/plugins/home-page/.eslintrc.js b/plugins/home-page/.eslintrc.js new file mode 100644 index 0000000000..dd47f29781 --- /dev/null +++ b/plugins/home-page/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + extends: [require.resolve('@backstage/cli/config/eslint.js')], +}; diff --git a/plugins/lighthouse/.eslintrc.js b/plugins/lighthouse/.eslintrc.js new file mode 100644 index 0000000000..dd47f29781 --- /dev/null +++ b/plugins/lighthouse/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + extends: [require.resolve('@backstage/cli/config/eslint.js')], +}; diff --git a/plugins/lighthouse/src/components/AuditList/AuditListTable.tsx b/plugins/lighthouse/src/components/AuditList/AuditListTable.tsx index dd9a168e46..52f3eeb5e2 100644 --- a/plugins/lighthouse/src/components/AuditList/AuditListTable.tsx +++ b/plugins/lighthouse/src/components/AuditList/AuditListTable.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/prop-types */ /* * Copyright 2020 Spotify AB * diff --git a/plugins/lighthouse/src/components/AuditStatusIcon/index.tsx b/plugins/lighthouse/src/components/AuditStatusIcon/index.tsx index ccab763603..bce917d428 100644 --- a/plugins/lighthouse/src/components/AuditStatusIcon/index.tsx +++ b/plugins/lighthouse/src/components/AuditStatusIcon/index.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/prop-types */ /* * Copyright 2020 Spotify AB * diff --git a/plugins/lighthouse/src/components/CategoryTrendline/index.tsx b/plugins/lighthouse/src/components/CategoryTrendline/index.tsx index 0370261f8a..95622ed918 100644 --- a/plugins/lighthouse/src/components/CategoryTrendline/index.tsx +++ b/plugins/lighthouse/src/components/CategoryTrendline/index.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/prop-types */ /* * Copyright 2020 Spotify AB * diff --git a/plugins/welcome/.eslintrc.js b/plugins/welcome/.eslintrc.js new file mode 100644 index 0000000000..dd47f29781 --- /dev/null +++ b/plugins/welcome/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + extends: [require.resolve('@backstage/cli/config/eslint.js')], +};