import globals from 'globals';
import nodePlugin from 'eslint-plugin-n';
import { importX as importPlugin, createNodeResolver } from 'eslint-plugin-import-x';
import nodeRules from '../rules/node.mjs';

export default [
  {
    languageOptions: {
      globals: {
        ...globals.node,
      },
    },
    plugins: {
      n: nodePlugin,
      'import-x': importPlugin,
    },
    settings: {
      'import-x/resolver-next': [createNodeResolver()],
    },
    rules: {
      ...nodeRules,
    },
  },
];
