cli: remove unnecessary lint rules and fix issues
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -64,7 +64,7 @@ function createConfig(dir, extraConfig = {}) {
|
||||
...(extraExtends ?? []),
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['import', 'monorepo', ...(plugins ?? [])],
|
||||
plugins: ['import', ...(plugins ?? [])],
|
||||
env: {
|
||||
jest: true,
|
||||
...env,
|
||||
@@ -87,7 +87,6 @@ function createConfig(dir, extraConfig = {}) {
|
||||
'@typescript-eslint/no-shadow': 'error',
|
||||
'@typescript-eslint/no-redeclare': 'error',
|
||||
'no-undef': 'off',
|
||||
'monorepo/no-relative-import': 'error',
|
||||
'import/newline-after-import': 'error',
|
||||
'no-unused-expressions': 'off',
|
||||
'@typescript-eslint/no-unused-expressions': 'error',
|
||||
@@ -110,9 +109,6 @@ function createConfig(dir, extraConfig = {}) {
|
||||
...(restrictedSrcImports ?? []),
|
||||
],
|
||||
patterns: [
|
||||
// Avoid cross-package imports
|
||||
'**/../../**/*/src/**',
|
||||
'**/../../**/*/src',
|
||||
// Prevent imports of stories or tests
|
||||
'*.stories*',
|
||||
'*.test*',
|
||||
@@ -162,8 +158,6 @@ function createConfig(dir, extraConfig = {}) {
|
||||
...(restrictedImports ?? []),
|
||||
...(restrictedTestImports ?? []),
|
||||
],
|
||||
// Avoid cross-package imports
|
||||
patterns: ['**/../../**/*/src/**', '**/../../**/*/src'],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -76,7 +76,6 @@
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-jest": "^27.0.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||
"eslint-plugin-monorepo": "^0.3.2",
|
||||
"eslint-plugin-react": "^7.28.0",
|
||||
"eslint-plugin-react-hooks": "^4.3.0",
|
||||
"eslint-webpack-plugin": "^3.1.1",
|
||||
|
||||
@@ -19,7 +19,7 @@ import semver from 'semver';
|
||||
import { paths } from './paths';
|
||||
import { Lockfile } from './versioning';
|
||||
|
||||
/* eslint-disable monorepo/no-relative-import */
|
||||
/* eslint-disable @backstage/no-relative-monorepo-imports */
|
||||
|
||||
/*
|
||||
This is a list of all packages used by the templates. If dependencies are added or removed,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
// This is a bit of a hack that we use to avoid having to redeclare these types
|
||||
// within this package or have an explicit dependency on core-app-api.
|
||||
// These types end up being inlined and duplicated into this package at build time.
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
export type {
|
||||
BootErrorPageProps,
|
||||
SignInPageProps,
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
import { program } from 'commander';
|
||||
import { exitWithError } from './lib/errors';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { version } from '../../../package.json';
|
||||
import createApp from './createApp';
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable monorepo/no-relative-import */
|
||||
/* eslint-disable @backstage/no-relative-monorepo-imports */
|
||||
|
||||
/*
|
||||
This is a list of all packages used by the template. If dependencies are added or removed,
|
||||
|
||||
Reference in New Issue
Block a user