mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-02 04:40:11 -05:00
49 lines
1.2 KiB
JavaScript
49 lines
1.2 KiB
JavaScript
import { FlatCompat } from '@eslint/eslintrc';
|
|
import nxEslintPlugin from '@nx/eslint-plugin';
|
|
import js from '@eslint/js';
|
|
import path from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
export const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
recommendedConfig: js.configs.recommended,
|
|
});
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
{ plugins: { '@nx': nxEslintPlugin } },
|
|
{
|
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
rules: {
|
|
'@nx/enforce-module-boundaries': [
|
|
'error',
|
|
{
|
|
enforceBuildableLibDependency: true,
|
|
allow: [],
|
|
depConstraints: [
|
|
{
|
|
sourceTag: '*',
|
|
onlyDependOnLibsWithTags: ['*'],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
...compat.config({ extends: ['plugin:@nx/typescript'] }).map((config) => ({
|
|
...config,
|
|
files: ['**/*.ts', '**/*.tsx'],
|
|
rules: {},
|
|
})),
|
|
...compat.config({ extends: ['plugin:@nx/javascript'] }).map((config) => ({
|
|
...config,
|
|
files: ['**/*.js', '**/*.jsx'],
|
|
rules: {},
|
|
})),
|
|
{
|
|
ignores: ['eslint.config.js', 'vite.config.{js,ts,mjs,mts}'],
|
|
}
|
|
];
|