mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 13:02:50 +00:00
35 lines
1012 B
JavaScript
35 lines
1012 B
JavaScript
import { FlatCompat } from '@eslint/eslintrc';
|
|
import nxEslintPlugin from '@nx/eslint-plugin';
|
|
import js from '@eslint/js';
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: import.meta.dirname,
|
|
recommendedConfig: js.configs.recommended,
|
|
});
|
|
|
|
export default [
|
|
{ plugins: { '@nx': nxEslintPlugin } },
|
|
{
|
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
rules: {
|
|
'@nx/enforce-module-boundaries': [
|
|
'error',
|
|
{
|
|
enforceBuildableLibDependency: true,
|
|
allow: ['^.*/eslint(\\.base)?\\.config\\.[cm]?js$'],
|
|
depConstraints: [
|
|
{ sourceTag: '*', onlyDependOnLibsWithTags: ['*'] },
|
|
],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
...compat.config({
|
|
extends: ['plugin:@nx/typescript'],
|
|
}).map((c) => ({ ...c, files: ['**/*.ts', '**/*.tsx'] })),
|
|
...compat.config({
|
|
extends: ['plugin:@nx/javascript'],
|
|
}).map((c) => ({ ...c, files: ['**/*.js', '**/*.jsx'] })),
|
|
{ ignores: ['**/dist/**', '**/build/**', '**/.react-router/**'] },
|
|
];
|