Merged in feat/add-no-relative-packages-rule (pull request #2356)
Add eslint rule no-relative-packages * Add eslint rule no-relative-packages Approved-by: Christian Andolf
This commit is contained in:
@@ -27,7 +27,7 @@ export default defineConfig([
|
||||
rules: {
|
||||
"no-unused-vars": "off",
|
||||
"react/function-component-definition": "error",
|
||||
|
||||
"import/no-relative-packages": "error",
|
||||
"simple-import-sort/imports": [
|
||||
"error",
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import typescriptEslint from "@typescript-eslint/eslint-plugin"
|
||||
import tsParser from "@typescript-eslint/parser"
|
||||
import { defineConfig } from "eslint/config"
|
||||
import simpleImportSort from "eslint-plugin-simple-import-sort"
|
||||
import importPlugin from "eslint-plugin-import"
|
||||
|
||||
const compat = new FlatCompat({
|
||||
recommendedConfig: js.configs.recommended,
|
||||
@@ -17,6 +18,7 @@ export default defineConfig([
|
||||
plugins: {
|
||||
"simple-import-sort": simpleImportSort,
|
||||
"@typescript-eslint": typescriptEslint,
|
||||
import: importPlugin,
|
||||
},
|
||||
|
||||
linterOptions: {
|
||||
@@ -29,7 +31,7 @@ export default defineConfig([
|
||||
|
||||
rules: {
|
||||
"no-unused-vars": "off",
|
||||
|
||||
"import/no-relative-packages": "error",
|
||||
"simple-import-sort/imports": [
|
||||
"error",
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import tsParser from '@typescript-eslint/parser'
|
||||
import reactRefresh from 'eslint-plugin-react-refresh'
|
||||
import { FlatCompat } from '@eslint/eslintrc'
|
||||
import js from '@eslint/js'
|
||||
import importPlugin from 'eslint-plugin-import'
|
||||
|
||||
const compat = new FlatCompat({
|
||||
recommendedConfig: js.configs.recommended,
|
||||
@@ -26,8 +27,10 @@ export default defineConfig([
|
||||
),
|
||||
plugins: {
|
||||
'react-refresh': reactRefresh,
|
||||
import: importPlugin,
|
||||
},
|
||||
rules: {
|
||||
'import/no-relative-packages': 'error',
|
||||
'react-refresh/only-export-components': [
|
||||
'warn',
|
||||
{
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
"copy-to-clipboard": "^3.3.3",
|
||||
"deepmerge-ts": "^7.1.5",
|
||||
"eslint": "^9",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.20",
|
||||
"eslint-plugin-storybook": "^0.12.0",
|
||||
|
||||
Reference in New Issue
Block a user