Tooling
ESLint config
The shared ESLint flat config for Frigear packages and simple Node or Nuxt projects.
The shared ESLint flat config gives every package in the Frigear repository the same lint
rules. Its package is @frigear-nu/eslint-config. It wraps
@nuxt/eslint-config in standalone mode with the tooling, stylistic
and typescript features on, and ignores dist, .nuxt, .output, .data, .example and playground.
A module installed in a host app's
node_modules gets no auto-imports in its app code, so it imports from #imports.
The config turns on no-undef in src/runtime/**, outside src/runtime/server/**, so a missing import fails the lint.Quick setup
pnpm add -D @frigear-nu/eslint-config eslint
Inside the Frigear repository, use the workspace protocol instead: "@frigear-nu/eslint-config": "workspace:^".
eslint.config.mjs
export { default } from '@frigear-nu/eslint-config'
package.json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
A Nuxt app with
@nuxt/eslint should keep the config that module generates
(withNuxt from ./.nuxt/eslint.config.mjs), as apps/website does.Next steps
- Setup checklist – the
#importsrule in the context of a module.