style: update import paths and ESLint configuration
This commit is contained in:
parent
2a2c4bc967
commit
ce7e1f2952
23 changed files with 57 additions and 29 deletions
|
@ -1,4 +1,5 @@
|
|||
import { FlatCompat } from '@eslint/eslintrc';
|
||||
import noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths';
|
||||
import { dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
|
@ -14,6 +15,21 @@ const eslintConfig = [
|
|||
{
|
||||
ignores: ['src/generated/**', '.next/**', 'public/**'],
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
'no-relative-import-paths': noRelativeImportPaths,
|
||||
},
|
||||
rules: {
|
||||
'no-relative-import-paths/no-relative-import-paths': [
|
||||
'error',
|
||||
{
|
||||
allowSameFolder: true,
|
||||
rootDir: 'src',
|
||||
prefix: "@",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export default eslintConfig;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue